How to Integrate IOT Devices in the Field

How would you guys recommend integrating IOT devices in the field to communicate with ziti protected services? Essentially what we'd like to do is integrate ESP32 devices using the embedded C sdk, but I haven't been able to find any examples attempting anything like this. Can someone point me in the right direction?

We currently have an MQTT Broker hosted on a VPS secured by OpenZiti. I'd like to be able to publish and subscribe to topics on this broker via the overlay directly on the embedded device. I've heard of Ziti being used on PLCs and Industrial devices but I'm not seeing any information on this topic.

Thanks!

Hi @apinohixcorp, I don't think we have a specific example for MQTT. I admit that I've not tunneled MQTT like this myself, but I think I remember someone talking about doing this in the past.

I would think it would work like websockets example since it's a persistent tcp stream connection. Did you find that one? ziti-sdk-c/programs/wzcat at main · openziti/ziti-sdk-c · GitHub (minus all the HTTP handshake/upgrading stuff) or maybe the ncat example ziti-sdk-c/programs/sample-bridge/ziti-ncat.c at main · openziti/ziti-sdk-c · GitHub

I don't know of one that does MQTT specifically yet. If I can find time, I'll try to make a sample or adapt one but it might take a bit. Cheers

Hi @apinohixcorp - I know you're asking specifically about ziti-sdk-c and MQTT, but in case this helps:

  • I'm pretty sure @natashell uses MQTT via ziti-sdk-py. ziti-sdk-py is based on ziti-sdk-c- so, an indirect example of using the C SDK for MQTT
  • I know people are tunneling MQTT using ziti-edge-tunnel (also based on ziti-sdk-c)
  • @ekoby used ziti/sdk-golang for both an MQTT server and client: GitHub - ekoby/mqziti
  • The pending EdgeX Odessa Release integrates OpenZiti (MQTT is common in EdgeX use cases). This is also Golang based

Not sure if this helps, but at a minimum I think you can be confident there aren't any big gotchas using ziti/mqtt/ziti-sdk-c...