I sucessful installed openwrt with ser2net to my Linksys WRT54GL.
I would like to use winsock from VB to control the serial of WRT54GL, but I don't know how to get start.
This is how my PC connect to the WRT54GL:
--------------- ------------ ------------------------
| PC-RS232 |-----------| MAX232 |---------| SERIAL-WRT54GL |
--------------- ------------- ------------------------
some of the configurations from WRT54GL:
vi /etc/init.d/setserial
START=15
boot() {
/usr/sbin/setserial /dev/tts/1 irq 3
/bin/stty -F /dev/tts/1 speed 9600 raw
/usr/sbin/ser2net -u &
}
vi /etc/ser2net.conf
# <TCP port>:<state>:<timeout>:<device>:<options>
1500:raw:3600:/dev/tts/1:9600 NONE 1STOPBIT 8DATABITS -XONXOFF LOCAL -RTSCTS
1. Run RealTerm (com1, baud rate:9600) & SSH (PuTTY)
2. When send data from SSH (echo xxx > /dev/tts/1), RealTerm is able to receive data
3. When send data from RealTerm, SSH (cat < /dev/tts/1) is able to receive data
I try to use socket programming from VB & Delphi 7, but failed to connect.