Disappearing Serial Port: SerialPortException
I am trying to set up mango to read electric meters via Modbus.
When I create a data source, I select Modbus serial, a port shows up as /dev/ttyS0; I set the baud rate to 19200 and save.
I can scan for nodes and find all the nodes that I expect to find.
I create a point:
Slave id: 10
Register Range: Holding register
Modbus data type: 2 byte unsigned integer
...and save; then activate the source and point.
When I go to the watch list I add my point and generally it will read the register (right now when I am testing it won't).
Here's the weird part: when I go back to data sources and edit the source I just created, no Port shows up.
When I disable the source and then enable it again I get the following error:
**Error while initializing data source: com.serotonin.io.serial.SerialPortException: gnu.io.NoSuchPortException
My question is: where could the problem be?
- is it hardware
- is it the meters?
- is it the serial port drivers?
- is it my mango installation?
Any suggestions with regards to how I can isolate the problem are very welcome. Thanks!
Server version: Apache Tomcat/6.0.20
Server built: May 14 2009 01:13:50
Server number: 22.214.171.124
OS Name: Linux (Ubuntu)
OS Version: 2.6.28-11-generic
JVM Version: 1.6.0_13-b03
JVM Vendor: Sun Microsystems Inc.
Mango version: 1.4.2
I've personally had some issues with Ubuntu, but i'm far from being able to say for sure that's the problem. Still, i suggest trying Fedora or a Windows host for Mango to see if your serial ports stick around longer.
Also, make sure data sources and testers aren't competing for the port in the case that you have multiple data sources running. Only one running data source can own a serial port at a time. Note also that the node scanner owns the port while it is scanning.