No ports shown on NMEA listener properties; want to read from file instead of port
The "NMEA listener properties" data source does not list any ports in its pull-down menu.
I would like to fix that, but even if ports were listed, I need to read from a file instead of a local RS232 port. I set up a named pipe to redirect the serial port from a remote computer to the Mango computer by using mkfifo. I can 'cat' the local file to stdout and view the NMEA stream updating in real time, so I should be able to read that FIFO file rather than /dev/ttyS0. How can I do that? Reading from a file is also a useful way to import old NMEA data into Mango.
But first, why don't I see any serial ports listed in the NMEA listener data source page?
Linux 2.6.32-29-generic i686
Distributor ID: Ubuntu
Description: Ubuntu 10.04.2 LTS
$ locate RXTXcomm.jar **
$ locate librxtxSerial.so **
In Debian/Ubuntu the serial ports are in group 'dialout.' However, user tomcat6 is not a member of group dialout, and consequently could not see the ports.
$ ls -l /dev/ttyS*
crw-rw---- 1 root dialout 4, 64 2011-03-23 20:42 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2011-03-03 10:28 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2011-03-03 10:28 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2011-03-03 10:28 /dev/ttyS3
To fix the problem, user tomcat6 must be added to group dialout:
root@ubuntuserver# usermod -G dialout tomcat6
Now Tomcat6 can see the serial ports, but Mango will not report them until it is restarted.
To restart Mango:
root@ubuntuserver# /etc/init.d/tomcat6 restart
- Stopping Tomcat servlet engine tomcat6 [ OK ]
- Starting Tomcat servlet engine tomcat6
Now Mango shows the serial ports in the pulldown menu
When I searched for this in the forum, I had searched for 'NMEA.' Once I noticed the same 'missing ports' problem was also on the 'Modbus serial' data source page, I narrowed it to a serial port problem, and searched the forum for 'rxtx' and found out that [url=http://mango.serotoninsoftware.com/forum/posts/list/0/189.page#1362]'a reboot was mandatory,' so I restarted Tomcat.
It would be useful to have a Mango wiki so that these issues can be organized and updated in a more structured manner than what a forum can support.