[OT Uklid - pocitac

Admin HWnews hwnews na cncnet.info
Sobota Únor 16 20:52:55 CET 2013


No ja je pouzivam vetsinou jako klienty pro posilani dat na webservery, 
kde data ukladam. Takze takovy GET dotaz pak vypada takto - je to v 
podstate klasicka minimalisticka hlavicka HTTP dotazu:

const rvCR=13;
       rvLF=10;
       socket='192.168.0.116/80';
       host='192.168.0.116';
       skript='/skript.php?';

procedure SendToWeb;
begin
   Usart_Write_Text('ATDT');
   Usart_Write_Text(socket);
   Usart_Write(rvCR);
   Usart_Write_Text('GET ');
   Usart_Write_Text(skript);
   Usart_Write_Text('tep=');
   Usart_Write_Text(txt_teplota);
   Usart_Write_Text('&rh=');
   Usart_Write_Text(txt_rh);
   Usart_Write_Text('&tl=');
   Usart_Write_Text(txt_tlak);
   Usart_Write_Text('&ch1=');
   Usart_Write_Text(txt_ch1);
   Usart_Write_Text(' HTTP/1.1');
   Usart_Write(rvCR);
   Usart_Write(rvLF);
   Usart_Write_Text('Host: ');
   Usart_Write_Text(host);
   Usart_Write(rvCR);
   Usart_Write(rvLF);
   Usart_Write(rvCR);
   Usart_Write(rvLF);
   Usart_Write_Text('ATH');
   Usart_Write(rvCR);
end;

vysledkem je v podstate jako byste v browseru poslal neco takoveho:

http://192.168.0.116/skript.php?tep=5923&rh=2110&tl=59000&ch1=45000

RV

Dne 16.2.2013 18:58, Martin Záruba napsal(a):
> Protoze se v komunikaci pres Ethernet moc nevyznam, rad bych vas (nebo
> kohokoli znaleho) pozadal o lehce polopaticke vysvetleni, jak se s
> takovymi moduly komunikuje. Dovedu si predstavit jak dva moduly udelaji
> most RS232 pres Ethernet, ale predpokladam, ze je mozne, aby tento modul
> prevadel data do Ethernetu, kam by byl pripojen PC a ten by s nim
> komunikoval. Ale jak to udelat na strane PC? Umim udelat komunikaci pres
> fyzicky RS232 (nebo treba emulovany pres USB), ale jak komunikovat pres
> Ethernet? (Asi se ptam blbe, ale nevim jak to lepe rici.)
> Martin Zaruba
> ----- Original Message -----
>
>     *From:* Michal Gregor <mailto:a2x1nptda8 na email.cz>
>     *To:* HW-News <mailto:hw-list na list.hw.cz>
>     *Sent:* Saturday, February 16, 2013 6:08 PM
>     *Subject:* [OT Uklid - pocitac
>
>     Zdravim,
>     mam tady dva moduly Ethernet – RS232 Nano Socket LAN:
>     http://www.spezial.cz/news/connect-one-nano-lanreach-uart-usb-spi-rmii-ethernet-interface.html
>     100kc/ ks + postovne.
>     Michal Gregor
>
>     ------------------------------------------------------------------------
>
>     _______________________________________________
>     HW-list mailing list  -  sponsored by www.HW.cz
>     Hw-list na list.hw.cz
>     http://list.hw.cz/mailman/listinfo/hw-list
>
>
>
> _______________________________________________
> HW-list mailing list  -  sponsored by www.HW.cz
> Hw-list na list.hw.cz
> http://list.hw.cz/mailman/listinfo/hw-list
>


Další informace o konferenci Hw-list