Cannot set up MQTT communication

I am working with a double MicroMod board (SparkFun MicroMod Main Board - Double - DEV-20595 - SparkFun Electronics), a Teensy processor (product 16402), an Environmental board (product 18632) and a LTE+GNSS board (product 18431), with its own IoT SIM card.
I am able to display data from the environmental board on my serial monitor. However, even if I use different example codes from the github repo (SparkFun_u-blox_SARA-R5_Arduino_Library/examples at main · sparkfun/SparkFun_u-blox_SARA-R5_Arduino_Library · GitHub), my serial monitor only displays:

  • init: Begin module init
  • sendCommandWithResponse: Command: E0
  • init: Module failed echo test
  • init: Begin module init
  • init: Attempting autobaud connection to module
  • sendCommandWithResponse: Command: +IPR=115200
  • sendCommandWithResponse: Command:
  • sendCommandWithResponse: Command: +IPR=115200
  • sendCommandWithResponse: Command:
  • sendCommandWithResponse: Command: +IPR=115200
  • sendCommandWithResponse: Command:
  • init: Module failed to init. Exiting
  • Unable to communicate with SARA
    What am I missing to establish the communication?
    Thank you for your help!

There might be a pin conflict of some kind? Do you happen to have any alternative MM processors (other than the Teensy)?

Does it work if you install just the GNSS board by itself and test?

Unfortunately I do not have any other MM processor, but I find it strange that it worked with the environmental board.
I have tried to remove the environmental board but the result is the same

I’d bet there a pin conflict; you can try editing the example file to use alternate pins or try switching to a different MCU (which after perusing the guide does have a note:

" There are a variety of MicroMod Processor Boards available. However, we recommend using the ESP32, Artemis, and SAMD51 Processor Boards as these were tested to work with the SARA-R5. For the scope of this tutorial, we will be using the ESP32 Processor Board. The caveat when using the ESP32 Processor Board is that you will need to configure the pin that is connected to the voltage regulator’s enable pin. This pin is used to upload code and when the ESP32 boots up. After uploading code and/or when the ESP32 has finished booting up, you will need to configure the pin as an input pullup in the setup() ."

So, feel free to head over to Return Policy - SparkFun Electronics (contact vendor if purchased elsewhere) and we’ll get ya squared away/exchanged for an alternate MM processor…

Thank you for your advice.
Is there a risk of breaking the board if I test every possible pin? Also, is there a way to physically test if my board is still operational?

No…you’d just re-assign the pin #'s in code
The board should be fine; the pin numbers that it usually uses for one of the UARTs from the processor is already in-use by some other function by the processor

I have tried to add a loop to test the different pin #'s but so far I am out of luck. Could you confirm if the LTE-GNSS board is compatible with Teensy, as this processor board is not mentioned in the documentation? Only ESP32, Artemis and SAMD51 are mentioned in Introduction - SparkFun MicroMod LTE GNSS Function Board - u-blox SARA - R5 Hookup Guide

I think you’re better off going with a ESP32 since that has been tested and shown to work.

The Teensy likely can be made to work with enough effort but it doesn’t sound like that’s worth pursuing in your case.

Thanks for your reply. My understanding is that the effort is “just” to identify to correct pin numbers to set up the PDP context and start using the SIM card, is that correct? Otherwise, what would be the other paths to explore?

Pretty much verifying pins are connected correctly to peripherals that are compatible AND that the software and libraries work ok with Teensy.

One quick example, software serial doesn’t work on every pin on an Arduino Mega so moving code and shields from an Uno to a Mega doesn’t always work.

Just depends on how much time and effort you want to put into troubleshooting. I personally find it gratifying to figure out but there are times when I know I could make something work but it’s not worth 3 weeks of time to figure it all out.

2 Likes