Unable to connect to webhooks.mongodb-realm.com via ssl

Hi team,

I have been trying to fire webhooks in mongodb realm via API calls through secure SSL connections unsuccessfully from my MKRGSM1400 board.

I have tried using the MKRGSMSSLClient example, which uses the ArduinoBearSSL library. I have also tried with the GsmSSLWebClient example, unsuccessfully.

Here the things I have tried:

  1. Enabled MODEM.Debug() to see the AT commands. Nothing super exciting there. (will include the output in a subsequent note)
  2. Manually added the digicerts certificates used by the server into the list of root certs in the library. No luck
  3. tested using client.setCertificateValidationLevel(0);

Some facts:

  1. Same code to arduino.cc works fine.
  2. Connections without ssl get a 301 response from server.
  3. I found another issue reported regarding connecting to mongodb realm/stitch (here for reference "Chain could not be linked to a trust anchor" using mongoDB stitch · Issue #6209 · esp8266/Arduino · GitHub), which uses ESP8266WiFi. This user found that using setInsecure() makes it work.

The questions:

  1. Is there a way to get more detailed TCP logs from a GSM connection in the arduino board?
  2. Would it be possible to implement setInsecure() in SSL connections via GSM?
  3. Any additional suggestions in how to troubleshoot this further will be greatly appreciated

I know almost nothing about this, but was able to make an “insecure” SSL connection to IFTTT for a mailbox notifier. I don’t know if it’s at all relevant to your problem, but my code can be found here:

https://github.com/gbhug5a/Mailbox-Notifier/blob/master/MailboxNotifier.ino

Thanks shermanP. Unfortunately, the client.setInsecure() function you use in your code does not seem to exist for gsm clients (it exists for wifi clients, of course). Given that your solution does not apply to my use case (it would be great it could).

Thanks again though!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.