IotEdge modbus module does not send data

Copper Contributor

Hello all,

I want to use the Azure IoT Modbus module (mcr.microsoft.com/azureiotedge/modbus:1.0) together
with the SDM630 device (https://www.eastroneurope.com/images/uploads/products/protocol/SDM120-MODBUS_Protocol.pdf).
I configured the module twin settings as follows :

 

{
   "PublishInterval":2000,
   "SlaveConfigs":{
      "Slave01":{
         "SlaveConnection":"/dev/ttyUSB1",
         "BaudRate":"9600",
         "DataBits":"8",
         "StopBits":"1",
         "Parity":"ODD",
         "HwId":"PowerMeter-0a:01:01:01:01:01",
         "Operations":{
            "Op01":{
               "PollingInterval":"1000",
               "UnitId":"1",
               "StartAddress":"30000",
               "Count":"2",
               "DisplayName":"Voltage"
            }
         }
      }
   }
}

 


The container create options are as follows :

 

{
   "HostConfig":{
      "User":"root:dialout",
      "Privileged":true,
      "CgroupPermissions":"rwm"
   }
}

 

What can be wrong as I don't receive any message in the IoT Hub?

This is the log of the Modbus module :

 

IoT Hub module client initialized.
Desired property change:
{"PublishInterval":2000,"SlaveConfigs":{"Slave01":{"SlaveConnection":"/dev/ttyUSB1","BaudRate":"9600","DataBits":"8","StopBits":"1","Parity":"ODD","HwId":"PowerMeter-0a:01:01:01:01:01","Operations":{"Op01":{"PollingInterval":"1000","UnitId":"1","StartAddress":"30000","Count":"2","DisplayName":"Voltage"}}}},"$version":5}
Attempt to load configuration: {"PublishInterval":2000,"SlaveConfigs":{"Slave01":{"SlaveConnection":"/dev/ttyUSB1","BaudRate":"9600","DataBits":"8","StopBits":"1","Parity":"ODD","HwId":"PowerMeter-0a:01:01:01:01:01","Operations":{"Op01":{"PollingInterval":"1000","UnitId":"1","StartAddress":"40001","Count":"2","DisplayName":"Voltage"}}}},"$version":5}
Invalid TcpPort: , set to DefaultTcpPort: 502
Invalid RetryCount: , set to DefaultRetryCount: 10
Invalid RetryInterval: , set to DefaultRetryInterval: 50
Empty CorrelationId: , set to DefaultCorrelationId: DefaultCorrelationId
Opening.../dev/ttyUSB1
Saving reported properties: {"PublishInterval":2000,"SlaveConfigs":{"Slave01":{"Operations":{"Op01":{"PollingInterval":1000,"UnitId":1,"StartAddress":"30000","Count":2,"DisplayName":"Voltage","CorrelationId":"DefaultCorrelationId"}},"SlaveConnection":"/dev/ttyUSB1","RetryCount":10,"RetryInterval":50,"TcpPort":502,"HwId":"PowerMeter-0a:01:01:01:01:01","BaudRate":9600,"StopBits":1,"DataBits":8,"Parity":1}}}

 

Thanks for your help!

Kind regards,

Johan,

1 Reply

Hello,

 

After updating the partity configuration to NONE, I now see data flowing in.

 

Johan,