ZBus Serial Host: Unterschied zwischen den Versionen

Aus Ethersex_Wiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: == ZBus Serial Host == Because ZBus is based on the Usart feature, with have almost all ATmegas, we can simply attach an ZBus network interface to our computer. The se...)
(kein Unterschied)

Version vom 1. Mai 2009, 15:59 Uhr

ZBus Serial Host

Because ZBus is based on the Usart feature, with have almost all ATmegas, we can simply attach an ZBus network interface to our computer. The serial interface (aka COM-Port, aka R232) is only an normal usart with signal level converter ( -3V - +15V ). In order to make a RS485 interface, which is needed for ZBus, you will have to attach a MAX232 ( or similar ), to convert the RS232 signal back to an Usart TTL signal, and a RS485 interface chip to create the differential signal.

Some embedded device have some usarts on board, which are not soldered to a signal converter, so they provide the Usart TTL signal directly. You must only attach the RS485 chip and compile the driver for the architecture. The Linksys WRT54G is such an embedded device with an unsoldered Usart on board.

On the software side, i decided to write an userland driver with tun devices instead of writing a kernel module, because it is much more simpler to code and to debug. The programm provides an usual network interface, like your normal ethernet card, and can also be used like it (e.g. routing, different IP addresses and so on ). So you are very fexible with it. You can find the driver daemon at contrib/zbus-serial-host

zbus0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:192.168.9.1  P-t-P:192.168.9.1  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:174  Metric:1
          RX packets:16418 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16423 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:1381934 (1.3 MiB)  TX bytes:1379532 (1.3 MiB)

An open source rs232 to rs485 converter you can be found at RS485 Converter.

[[Category::ZBus]]