3

I'm trying to decode AMQP messages sended and revived between Azure IoT Edge and Azure Hub. At this moment I can read the data inside the socket, having something like this:

enter image description here

Now, I'd like to see this packages as json or object or something that a human could read.

Binary Thu Jan 27 10:02:19 CET 2022 Thu Jan 27 10:02:19 CET 2022 414D 5150 0001 0000

Binary Thu Jan 27 10:02:19 CET 2022 Thu Jan 27 10:02:19 CET 2022 0000 005D 0200 0000 0053 10C0 500A A120 6532 3461 3963 3238 3332 3139 3464 3130 3830 3938 3835 6364 6539 6637 6130 6662 A119 696F 746D 616E 752E 617A 7572 652D 6465 7669 6365 732E 6E65 7470 0001 0000 601F FF70 0000 EA60 4040 4040 40

Binary Thu Jan 27 10:02:19 CET 2022 Thu Jan 27 10:02:19 CET 2022 0000 0025 0200 0000 0053 11C0 1808 4052 0170 0000 1388 7000 0013 8870 0003 FFFF 4040 C101 00 Binary Thu Jan 27 10:02:20 CET 2022 Thu Jan 27 10:02:20 CET 2022 0000 0025 0200 0001 0053 11C0 1808 4052 0170 0000 1388 7000 0013 8870 0003 FFFF 4040 C101 00

Binary Thu Jan 27 10:02:20 CET 2022 Thu Jan 27 10:02:20 CET 2022 0000 0072 0200 0001 0053 12C0 650E A115 6475 706C 6578 3337 3A33 393A 3430 3A73 656E 6465 7243 4250 0140 0053 28C0 0C0B 4040 4040 4040 4040 4040 4000 5329 C00D 07A1 0424 6362 7340 4040 4040 4040 4040 4040 40C1 1D02 A315 636F 6D2E 6D69 6372 6F73 6F66 743A 7469 6D65 6F75 7470 0000 E6E7

Any help to decode this? Thanks in advance.

user1060082
  • 63
  • 2
  • 7
  • See: [Understand how Azure IoT Edge uses certificates](https://learn.microsoft.com/en-us/azure/iot-edge/iot-edge-certs?view=iotedge-2020-11). Those certificates enable a TLS (transport layer security) secure connection between the runtime, the modules, and the IoT devices. Can you explain better what you are trying to achieve? – asergaz Feb 11 '22 at 07:55

1 Answers1

1

not sure what you are trying to achieve.

Are you sniffing the traffic between your device and IoT Hub over the wire? This is encrypted as all the comm toward IoT Hub uses TLS.

Do you want to support the AMQP protocol for a device that can't use one of the IoT hub SDKs?

In this case, if you can use an AMQP library, I would suggest to have a look at this document: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-amqp-support. That document describes how IoT Hub leverage the AMQP protocol to abstract the IoT Hub messaging patterns (D2C, C2D, Direct Methods and Twin updates).

Nevertheless, if you are writing an iot device agent / firmware, I would probably suggest to start with MQTT as a protocol, way simpler especially if you can't use SKDs.