Connecting to ArduinoCloud with new 4G module

Hi,
I'm trying to connect to ArduinoCloud with the new 4G module (EMEA) using Portenta C33 on the Portenta Mid Carrier. Http requests and SMS etc. work all fine but haven't seen any tutorials or code examples for how to connect to the ArdunioCloud.

Any hints?

Thank you,
Nils

Hi @nilsjuri. This hardware is not currently supported for use as an Arduino Cloud IoT Device.

However, although you can't use it with the IoT features of the Arduino Cloud platform, you can use the Arduino Cloud Editor to create, compile, and upload sketches with the Portenta C33 board (including sketches that use the capabilities of the Portenta Mid Carrier and Pro 4G Module):

https://docs.arduino.cc/arduino-cloud/guides/cloud-editor/

Hi ptillisch,
Thanks for your reply.

All marketing material around the 4G module mention this feature. The product feature section on the Arduino store page says: The Arduino Pro 4G Module allows you to connect to your devices via Arduino Cloud, making error analysis, firmware updates, and remote maintenance easier and faster than ever.

I have bought it to do exactly this as my use case requires cellular connectivity and Arduino Cloud dashboards. I have heard there will be a release soon for the corresponding libraries. Do you know when they will be available even if in beta status?

Thanks
Nils

I don't have any information about release schedules.

Arduino's open source libraries are always available for beta testing.


:red_exclamation_mark: Development versions of libraries should only be used to contribute to the development work by performing beta testing and giving feedback to the library developers about any defects you discover. The development versions of libraries are not intended for production use and Arduino doesn't offer any guarantees of stability or compatibility when using this version of a library.


I'll provide instructions you can follow to install the beta tester version of a library in your Arduino Cloud account:

  1. Open the library's GitHub repository homepage in your web browser.
    The official Arduino library repositories are listed here.
  2. Click the "Code ▾" button you see on the library repository home page.
  3. Select Download ZIP from the menu.
    A download of the ZIP file of the library will start.
  4. If you are not already, log in to your Arduino account:
    https://login.arduino.cc/login
  5. Click the following link to open the list of your Arduino Cloud sketches in the web browser:
    https://app.arduino.cc/sketches
  6. Click on any sketch, or use the CREATE > New sketch button to create a new sketch.
    The sketch will open in Arduino Cloud Editor.
  7. Click the icon that looks like shelved books ("Libraries") in the bar on the left side of the Cloud Editor page.
    The "Libraries" panel will open.
  8. Click the upward pointing arrow icon at the top of the "Libraries" panel.
    The "Open" dialog will open.
  9. Select the "ZIP" file of the library in the dialog.
  10. Click the "Open" button.
    The "Open" dialog will close.
  11. You will now see an indicator at the top of the "Libraries" panel in place of the upward pointing arrow icon as the library is imported. Wait for this indicator to disappear.

These instructions will have installed the latest beta tester version of the library. The beta test version of the library will now be used when you compile or upload your sketches.


If you later decide you want to remove the imported library from your Arduino Cloud account, you will find it under the "Custom" tab of the "Libraries" panel.


If you discover any problems, you can report them to the developers by submitting an issue to the library's GitHub repository. Or even better, submit a pull request (PR) for a fix to the problem you discovered!


! The beta tester version you installed will become outdated whenever the library developers make a new relevant change in the repository. Since the whole point of beta testing is to test the latest development of a project, it is important to make sure that you update the library as needed. You can do this by removing the imported library from your Arduino Cloud account and then following the instructions above to import the latest version.


Please let me know if you have any questions or problems while following those instructions.

Hi @nilsjuri we are working on the Pro 4G module support. You can follow this PRs

Thank you and looking good, waiting for the release! Will both H7 and C33 be able to connect to Arduino Cloud incl. read/write dashboard variables or just the H7?

@nilsjuri both the H7 and the C33 will be supported

Hi Pennam,
Is there already a planned release date for the new cellular support?

Thank you,
Nils

@nilsjuri everything is in place now to use the 4G module

:ok_hand: this is great news, thank you

Hi,

I'm trying to setup the portenta C33 and EMEA 4G module via the mid carrier to work in Arduino cloud.
I followed all the information above but had no luck getting it running.

Any advice or example code out yet?

@vdbergw
is your sketch compiling?
are you able to use to EMEA 4G module using the examples of the ArduinoCellular library ?

What is the output of the Serial monitor?

Hi pennam

I have followed both the HTTPS and ModemTerminal example codes, and they compile just fine.
But no serial output. Even added some code to enable the buildin LEDs for faultfinding to see if the code gets stuck somewhere, but even the doesn't run.

Code Snippet below,

Serial.begin(115200);
    pinMode(34, OUTPUT);
    pinMode(34, LOW);
    while (!Serial);
 
    // cellular.setDebugStream(Serial); // Uncomment this line to enable debug output
    cellular.begin();

    if(String(SECRET_PINNUMBER).length() > 0 && !cellular.unlockSIM(SECRET_PINNUMBER)){
        Serial.println("Failed to unlock SIM card.");
        while(true); // Stop here
    }

Must say as a newcomer to Arduino I found the WiFi setup to Arduino Cloud easy to implement and debug but with cellular things are a different story, little to no resources are available for the Portenta models with no active working examples for the c33.

I'm completely stumped, even went back to some WiFi code I wrote to verify that the board didn't get damaged and that still works fine together with the serial monitor.

have you done this?

while (!Serial);
 
    cellular.setDebugStream(Serial); // Uncomment this line to enable debug output
    cellular.begin();

    if(String(SECRET_PINNUMBER).length() > 0 && !cellular.unlockSIM(SECRET_PINNUMBER)){
        Serial.println("Failed to unlock SIM card.");
        while(true); // Stop here
    }

Commented in or out, makes not diffrence

strange, to print also AT commands debug you can uncomment this line

Ok making some progress....

Uncommented the #define as you suggested, in the ModemInterface.h

Snippet of the code extracted for the ModemTerminal example

Serial.begin(115200);
    while (!Serial);

    digitalWrite (34, LOW);
    delay(300);
    cellular.setDebugStream(Serial);  //enable debug output
    Serial.println("Serial Test....");
    cellular.begin();
    Serial.println("Cell service started...");
digitalWrite (34, HIGH);

From that, I get a serial output as follows,

11:19:45.616 -> Serial Test....
11:19:46.630 -> A

It seems the code is getting stuck in the cellular.begin() function

I also tried to see the significance of the "A" output but can't find anything, in the cellular.begin() function.

Any suggestions?

A is the beginning of AT command. Here it is how the startup log should be:

14:01:10.130 -> AT
14:01:18.628 -> AT
14:01:18.927 -> AT
14:01:19.259 -> AT
14:01:19.259 -> AT

14:01:19.259 -> OK
14:01:19.259 -> ATE0
14:01:19.259 -> ATE0

14:01:19.259 -> OK
14:01:19.259 -> AT+CMEE=0
14:01:19.259 -> 
14:01:19.259 -> OK
14:01:19.259 -> AT+CTZR=0
14:01:19.259 -> 
14:01:19.259 -> OK
14:01:19.259 -> AT+CTZU=1
14:01:19.259 -> 
14:01:19.259 -> OK
14:01:19.259 -> AT+CPIN?
14:01:19.259 -> 
14:01:19.259 -> ERROR
14:01:20.254 -> AT+CPIN?
14:01:20.254 -> 
14:01:20.254 -> RDY
14:01:20.254 -> 
14:01:20.254 -> +CPIN: READY
14:01:20.254 -> 
14:01:20.254 -> OK
14:01:20.254 -> ATI
14:01:20.254 -> 
14:01:20.254 -> Quectel
14:01:20.254 -> EC200A
14:01:20.254 -> Revision: EC200AEUHAR01A13M16
14:01:20.254 -> 
14:01:20.254 -> OK
14:01:20.254 -> AT+CMGF=1
14:01:20.254 -> 
14:01:20.254 -> OK
14:01:20.254 -> AT+CSCS="GSM"
14:01:20.323 -> 
14:01:20.323 -> OK
14:01:20.323 -> AT+CNMI=2,1,0,0,0
14:01:20.323 -> 
14:01:20.323 -> OK
14:01:20.323 -> Connecting...
14:01:20.323 -> AT+CPIN?
14:01:20.323 -> 
14:01:20.323 -> +CPIN: READY
14:01:20.323 -> 
14:01:20.323 -> OK
14:01:20.323 -> SIM Status: 1
14:01:20.323 -> AT+CPIN?
14:01:20.323 -> 
14:01:20.323 -> +CPIN: READY
14:01:20.323 -> 
14:01:20.323 -> OK
14:01:20.323 -> AT+CPIN?
14:01:20.323 -> 
14:01:20.323 -> +CPIN: READY
14:01:20.323 -> 
14:01:20.323 -> OK
14:01:20.323 -> Waiting for network registration...
14:01:20.323 -> AT+CEREG?
14:01:20.323 -> 
14:01:20.323 -> +CEREG: 0,0
14:01:20.323 ->

Did you follow this instructions to setup your board? GitHub - arduino-libraries/Arduino_Cellular: A library which provides a toolkit for interacting with the official Arduino Pro 4G Modules.

That was the first thing I did, but I revisited it and can't find anything I might have missed.

I'm surely missing something stupid but can't seem to figure it out.

I tried going at this in every possible way I could think of.
Want to say maybe I bricked the unit somehow, but Arduino Cloud via wifi works perfectly so I'm not sure.

Ok made some more progress, I'm now achieving the desired AT command transmission,

08:31:30.002 -> Serial Test
08:31:38.179 -> AT
08:31:38.496 -> AT
08:31:38.820 -> AT
08:31:39.079 -> AT
08:31:39.380 -> AT
08:31:39.679 -> AT+CMGF=1
08:31:39.979 -> AT+CSCS="GSM"
08:31:40.301 -> AT+CNMI=2,1,0,0,0
08:31:40.609 -> Passed cellular begin function
08:31:40.921 -> Connecting...
08:31:42.224 -> AT+CPIN?
08:31:43.178 -> AT+CPIN?
08:31:44.180 -> AT+CPIN?
08:31:45.179 -> AT+CPIN?

However, I had to disable flow control to get it right. Easily achieved by taking out SIL jumpers on J16:5 & J16:7

Any thoughts....