xport no chance Kategorie: Programmierung (von Günther - 9.02.2009 15:20) | |
| |
Hi, ich bekomme keine Kommunikation mit der CC2 über den XPort hin. Folgende Xport Konfig: MAC address 00204AB175AF Software version V6.5.0.7 (070919) XPTEXE Press Enter for Setup Mode *** basic parameters Hardware: Ethernet TPI IP addr 192.168.115.20, no gateway set,netmask 255.255.255.0 *** Security SNMP is enabled SNMP Community Name: public Telnet Setup is enabled TFTP Download is enabled Port 77FEh is enabled Web Server is enabled Web Setup is enabled ECHO is disabled Enhanced Password is disabled Port 77F0h is enabled *** Channel 1 Baudrate 57600, I/F Mode 4C, Flow 00 Port 10001 Connect Mode : D4 Send '+++' in Modem Mode disabled Show IP addr after 'RING' disabled Auto increment source port disabled Remote IP Adr: --- none ---, Port 00000 Disconn Mode : 40 (Telnet Com Port Cntrl Enabled) Disconn Time: 00:15 Flush Mode : 00 Terminal name: *** Expert TCP Keepalive : 45s ARP cache timeout: 600s CPU performance: Regular Monitor Mode @ bootup : enabled RS485 tx enable : active low HTTP Port Number : 80 SMTP Port Number : 25 MTU Size: 1400 Alternate MAC: disabled Ethernet connection type: auto-negotiate mit folgendem Programm (André's Proggies) string s_in,s_out,s; function monitor() { pcflcd.goto(1,0); pcflcd.print(s_out); pcflcd.goto(2,0); pcflcd.print(s_in); } function inputstr(byte s[]) returns int //---------------------------------------- {byte i,x; i=0; x=255; for i=0 ... 29 { wait hwcom.rxd(); x=hwcom.get(); if x==10 or x==13 break; s[i]=x; } if x==13 hwcom.get(); s[31]=i; mem.fillpos(s,i,30-i,0); return i; } byte fifo[512],x[2]; thread main { pcflcd.init(); pcflcd.setpcf(7); pcflcd.clear(); hwcom.init(); hwcom.setspeed(8); loop { //string s; hwcom.flush(); wait hwcom.rxd(); x[0]=hwcom.get(); if x[0]==254 { x[1]=hwcom.receive(x,1,1000); if x[0]==254 and x[1]==1 quit 1;// Hostmode einleiten, normal if x[0]==253 and x[1]==1 //Erweiterter Empfangspuffer hwcom.setbuf(fifo,512); // Hostmode einleiten XPort quit 256; // Schnittstellenparameter beibehalten } } inputstr(s); s_in=s;monitor(); if strx.comp(s,"GET / HTTP/1.0") { hwcom.flush(); s_out="HTTP/1.0 200 OKn"; hwcom.print(s_out); hwcom.print("Server: C-Control IIn"); hwcom.print("Content-Length: 90n"); hwcom.print("Content-Language: den"); hwcom.print("Content-Type: text/htmln"); hwcom.print("Connection: closenn"); hwcom.print("<html>n<body>n"); hwcom.print("<b>C-Control II</b> im Web<br>"); hwcom.print("n<font color=red>Es geht!!"); hwcom.print("</font><br>n"); hwcom.print("</body>n</html>n"); } hwcom.put(0); } Ich komme nicht weiter, kann auch über DLTool 2.3 nicht programmieren. Hilfe! | |
Antwort schreiben Antworten: Re: xport no chance (von Rolf Klinger - 12.02.2009 10:08) xport no chance 2. Teil (von Güenther - 9.02.2009 17:33) Re: xport no chance 2. Teil (von Güenther - 16.02.2009 16:03) |