Closed SarithaMaran closed 3 years ago
If you see "Opening.../dev/ttyACM0", then you are running in RTU mode and can ignore "set to DefaultTcpPort" message. It's more likely you didn't have serial port configured properly. Please attach your configuration and also try to verify that the serial port is available inside the container.
The port is available inside the container.
pi@raspberrypi:~ $ docker exec modbusModule ls -l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Oct 8 08:46 /dev/ttyACM0
Configuration:
{
"PublishInterval": "2000",
"Version": "2",
"SlaveConfigs": {
"Slave01": {
"SlaveConnection": "/dev/ttyACM0",
"HwId": "LGP5310",
"RetryCount": "10",
"RetryInterval": "50",
"BaudRate": "9600",
"DataBits": "8",
"StopBits": "1",
"Parity": "NONE",
"FlowControl": "NONE",
"Operations": {
"Op01": {
"PollingInterval": "1000",
"UnitId": "1",
"StartAddress": "000156",
"Count": "2",
"DisplayName": "frequency_hz",
"CorrelationId": "MessageType1"
},
"Op02": {
"PollingInterval": "1000",
"UnitId": "1",
"StartAddress": "000126",
"Count": "2",
"DisplayName": "va_r_phase_v",
"CorrelationId": "MessageType1"
},
"Op03": {
"PollingInterval": "1000",
"UnitId": "1",
"StartAddress": "000128",
"Count": "2",
"DisplayName": "va_y_phase_v",
"CorrelationId": "MessageType1"
},
"Op04": {
"PollingInterval": "1000",
"UnitId": "1",
"StartAddress": "000130",
"Count": "2",
"DisplayName": "va_b_phase_v",
"CorrelationId": "MessageType1"
},
"Op05": {
"PollingInterval": "1000",
"UnitId": "1",
"StartAddress": "000150",
"Count": "2",
"DisplayName": "current_r_phase_amp",
"CorrelationId": "MessageType1"
},
"Op06": {
"PollingInterval": "1000",
"UnitId": "1",
"StartAddress": "000152",
"Count": "2",
"DisplayName": "current_y_phase_amp",
"CorrelationId": "MessageType1"
},
"Op07": {
"PollingInterval": "1000",
"UnitId": "1",
"StartAddress": "000154",
"Count": "2",
"DisplayName": "current_b_phase_amp",
"CorrelationId": "MessageType1"
}
}
}
}
}
Do you have other third party tools that could verified your serial port configuration? I.e baud rate, parity bit..., try to run it on host machine first.
Close for inactivity.
Error: Invalid TcpPort: , set to DefaultTcpPort: 502. Even-though I am trying for RTU device.
I am trying to add my modbus RTU device and following the steps mentioned in README.md provided here.
So what is happening here, it shows a error and is stuck there no telemetry is coming and published to cloud. Logs:
And no logs after that. Why it is showing "Invalid TcpPort: , set to DefaultTcpPort: 502". How to differentiate between RTU and TCP device? What am I doing wrong here?