Hello,
I am currently running Ubuntu 8.10 and have been trying to use Open2300 to read data from a Lacrosse WS-2310 weather station and report it to the WUnderground server. The program compiles fine but when I try to run it, it does one of two things: usually it pauses for about 4 minutes, then prints "could not reset" to the screen. But sometimes it just hangs forever. It seems like my computer is unable to communicate with the weather station.
I have set the serial port as /dev/ttyS0 in the open2300.conf file and i have also tried /dev/ttyS1, /dev/ttyS2, etc with the same result. As far as I can tell, there are no other settings regarding how Open2300 communicates with the device. Is my serial port locked somehow?
It could be something as simple as an incorrect configuration for my serial port or something, but I would have no idea how to check that or change the configuration. Any help would be greatly appreciated.
thanks,
Gawain
EDIT:
I tried some tests that i found online and everything seems to be working with my serial port...
gawain@gawain:~$ ls -l /dev/ttyS*
crw-rw---- 1 root dialout 4, 64 2009-07-09 10:01 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2009-07-09 08:56 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2009-07-09 08:56 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2009-07-09 08:56 /dev/ttyS3
gawain@gawain:~$ setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 50, divisor: 0
closing_wait: 3000
Flags: spd_normal skip_test
gawain@gawain:~$ setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 8250, Port: 0xd028, IRQ: 18
/dev/ttyS2, UART: 8250, Port: 0xd040, IRQ: 18
/dev/ttyS3, UART: 8250, Port: 0xd050, IRQ: 18
gawain@gawain:~$ echo 12345 > /dev/ttyS0
gawain@gawain:~$ dmesg | tail -3
[ 144.424259] ppdev0: unregistered pardevice
[ 145.692199] ppdev0: registered pardevice
[ 145.740052] ppdev0: unregistered pardevice
I also tried changing the serial port name to /dev/ttys0 (with a lowercase S) and in that case it gave me a different error, "Unable to open serial device." This suggests to me that it is able to open /dev/ttyS0 but something else is preventing it from reading the weather station. Any ideas? thanks.