Azure IoT over a Cellular PPP

Has anyone successfully tested a connection to Azure IoT over a Cellular PPP connection?
Using 2.1.0-Preview 3
I can successfully connect over hardwired ethernet. When I switch connection to using Cellular PPP it locks up and crashes with no errors reported. (Debug disconnects) It takes a physical reset to reconnect to the board.

  • The Azure code is the same between the hardwired ethernet and cellular. Including the certificate.

  • when using the cellular connection there is no hardwire ethernet code. The cellular is the only network connection.

  • Before attempting Azure connection using PPP I can successfully set the time using NTP and also download some data from the internet to test the connection.

Any suggestions on how to proceed?

Update: I tried to connect to an HTTPS connection using the TLS example in the Tutorials. It works with hardwire ethernet but not with cellular. Could it be that it can’t negotiate a TLS connection over PPP?

We will double check

We just have double checked PPP and Azure and they are working.

That is good that it works for you, at least that gives me some hope. :wink:

After the PPP connection gets connected I print out the IP address info. I noticed that the MAC address is all 0’s. I assume the cellular modem has a mac address that is external facing but doesn’t get pulled in to the PPP connection. I tried assigning a MAC address like I would on standard ethernet but it gets zeroed out when the connection is made. Not sure if that would have any bearing on establishing a TLS connection.

You can’t not set IP/MAC address… in PPP mode. They have no effect at all.

I didn’t think they should but I am looking at anything different between the connections.

Any suggestions on where to go from here? Since there are no error messages displayed how should I proceed to troubleshoot?

Can you send us the simple project that use https and certificate that we can test?

Put all your module initialize code (reset sequence, connection string…) in InitSimCard() which will be replaced by our modules. But keep all network stuffs in same place so we run the project close to your project, as much as we can.

sent via email. Thanks.

Not seen it yet. Is it dat.tran@ghi…?

I just sent it through a direct message here on the forum as well as from a different email address.

I have stepped through the code into the MQTT library and it hangs at:
MqttStream.cs -> Connect() -> this.sslStream.AuthenticateAsClient(this.hostName, this.caCert, this.clientCert, this.sslProtocol);

Thanks, we will check.

When using PPP do you use hardware flow control? Are there examples showing hardware flow control with RTS and CTS?

In the UartSetting object set handshaking to Hardware. Make sure the port you use has RTS and CTS exposed.

“UartHandshake.RequestToSend” the same thing? That is the only option other than None.

I should not have capitalized “Hardware”… I meant the option that invoked hardware handshaking. Given that there is only one option, that is the one.

Although, what happened to software handshaking? (X-ON/X-OFF)

To bring some closure to this issue, @Dat_Tran took a look at my project. I had not set TLS Entropy. He had me add:
networkInterfaceSetting.TlsEntropy = new byte[] { 0, 1, 2, 3 };
This resolved the problem and my connection to Azure started working.

Thanks @Dat_Tran for the help!