Hi, I have FMB125 device connected to Azure IoT Hub, the device is managed to received message from IoT Hub using the cloud-2-device functions. The following is the response from the device after receiving message from IoT Hub.
[2024.04.28 05:47:17]-[NETWORK] [IND] received data from socket!
[2024.04.28 05:47:17]-[NETWORK] notification, socket id: 5 has data which must be read!
[2024.04.28 05:47:17]-[NETWORK] VR socket 0, real socket id: 5, attempt automatic data reading for application
[2024.04.28 05:47:17]-[NETWORK] attempting to read data from socked id (real): 5
[2024.04.28 05:47:17]-[MQTT] Received MQTT data from socket: 0, 000000000000000D0C010500000005676574696F01000000CB
[2024.04.28 05:47:17]-[JSON] ERROR @ m2m_json.c(109):Parsing failed (1)[2024.04.28 05:47:17]-[MQTT] ERROR @ m2m_mqtt_commands.c(25):Could not get GPRS command from JSON at 25
I want to know what is the right command to send to the device so that I can get a response from the device as I am getting parsing failed error. The command “000000000000000D0C010500000005676574696F01000000CB” is example from the codec12 documentions: Codec - Wiki Knowledge Base | Teltonika GPS (teltonika-gps.com)
Thanks so much for the input, is there a JSON format that can construct the codec12 so that I can request data from the Modbus RTU sensors? Upon research, the JSON can receive SMS command, but I don’t see anything related the Modbus data.
I also send the message to the device using the json format. for example the following code:
{“CMD”:“getinfo”}. The device does response to this code correctly. My question is there a method where I can send codec12 in json format?
I have try to send the codec12 command using the json format, and this is what i received from the device:
[2024.05.01 06:55:56]-[MQTT] Received MQTT data from socket: 0, {???CMD???:??? 01 03 0000 0008 440C???}
[2024.05.01 06:55:56]-[JSON] ERROR @ m2m_json.c(109):Parsing failed (-2)[2024.05.01 06:55:56]-[MQTT] ERROR @ m2m_mqtt_commands.c(25):Could not get GPRS command from JSON at 25
[2024.05.01 06:55:57]-[NETWORK] [IND] received data from socket!
If I send the command without the spaces:
[2024.05.01 06:44:34]-[MQTT] Received MQTT data from socket: 0, {“CMD”:“000000000000000D0C010500000005676574696F01000000CB”}
[2024.05.01 06:44:34]-[MQTT] MQTT GPRS command: 000000000000000D0C010500000005676574696F01000000CB
[2024.05.01 06:44:34]-[GPRS.CMD] WARNING @ 396:unknown command
[2024.05.01 06:44:34]-[MQTT] JSON BUFF - {“RSP”:“unknown command or invalid format”}
Thank you for your feedback, it seems the command is not supported using the Azure platform for Modbus, please try to test it using Hercules.
For your testing or POC if you have access to HD please create a ticket or contact your sales manager so that Teltonika Engineers can assist you with your project.
Or contact us through our official website our official website https://teltonika-gps.com/ and click on the “Contact Us” button. When you will click, please fill the form and submit it. Note: as a topic, please choose “Vehicle telematics”
I have the system settings to codec8, and this is the error message i received on the device:
[2024.05.03 09:17:21]-[NETWORK] attempting to read data from socked id (real): 4
[2024.05.03 09:17:21]-[MQTT] Received MQTT data from socket: 0, 00000000 00000010 0C 01 0E 00000008 010300000008440C 01 00001181