-1

I followed the instructions to create a transparent gateway and successfully have a leaf device send telemetry to the IoT Hub via the gateway. However, I noticed that as soon as I set the certificate on the gateway, all modules installed (except for the Agent and the edgeHub) on the Gateway stopped functioning (even with the sample tempSensor). The Azure portal even showed that my edge gateway is disconnected (the telemetry still got through). I tried the log on the tempSensor module and it shows that there are some issues with the certificate (shown here)

Do you have any idea how to solve the problem? It is kind of pointless to gateway without any module on it.

Also, I want to pre-process the received messages from the leaf devices before sending to the IoT Hub. I know how to route the messages between modules (as in the tutorials) but how to route the messages from the leaf devices to a module?

Rob
  • 14,746
  • 28
  • 47
  • 65
Quang Le
  • 1
  • 2
  • After some investigation, I'm aware that the sample tempSensor does not work with certificates. That's fine. But I tried the C# module (from the Azure tutorial) with the "InstallCert" method in side the code as well as a stream analytic edge module. Both have the same issue. Any idea? – Quang Le Feb 06 '18 at 16:40
  • I found solution to this problem, I used the certificates generated from Windows on Linux. Strangely, they have different structures. – Quang Le Feb 23 '18 at 17:20

1 Answers1

0

I have no immediate idea about the certificate issue but in regards to the routing from leaf devices to a module this config should work:

"leafToFiltermodule": "FROM /messages/* WHERE NOT IS_DEFINED($connectionModuleId) INTO BrokeredEndpoint(\"/modules/filtermodule/inputs/input1\")"

The clue is WHERE NOT IS_DEFINED($connectionModuleId) which filters out all messages which are sent by other modules on the Edge device itself and only routes messages from the leafs

silent
  • 14,494
  • 4
  • 46
  • 86
  • Many thanks for the information regarding the routing. However, as I cannot have other modules than the Agent and the edgeHub work when the the Edge works as a gateway so I can't test it. Have you tried this transparent gateway and install an additional module on top of it? – Quang Le Jan 10 '18 at 15:15
  • Yes, in my setup I use my IoT Edge as both, a transparent gateway and with modules running on top of it. That should totally work. – silent Jan 10 '18 at 15:25
  • Many thanks for the information. Could you show me how would you link the certificate with the modules you developed? I think my issue is related with my module somehow does not trust the certificate. – Quang Le Jan 11 '18 at 18:14