How to load 4k of ssl certs onto modem shield?

Hello, long time software dev here new to Arduino.

Using an Uno with a SIMCOM7600 for connectivity, MQTT and SSL. But I need to load the SSL certs onto the SIMCOM, about 4.4k in size total.

How do I load them? I'm trying it via the IDE Serial Monitor or minicom, only I suspect they're getting corrupted on the way in due to the Soft Serial port, pins 7/8. On the minicom I can hear audible beeps when I paste the files in, suggesting overflow.

So, I went about hard coding the certs into a sketch, only the compiler gripes that it's too much data:

"Sketch uses 12770 bytes (39%) of program storage space. Maximum is 32256 bytes. Global variables use 5079 bytes (247%) of dynamic memory, leaving -3031 bytes for local variables. Maximum is 2048 bytes."

So I'm wondering if there is some other way to load these onto the Arduino, then I can have code that s-l-o-w-l-y copies it onto the SIMCOM i.e send a few bytes, delay(N), repeat...

The other thing I can try is to write a script that will copy them of the /dev/cu.usbmodem134, if I have to.

How are people doing this?

Thanks
Mike

PS I'm using the standard code for monitoring i.e.

  while(1){
    while (modem.available()) {
      Serial.write(modem.read());
    }
    while(Serial.available()) {
      modem.write(Serial.read());
    }
  }

Ok, all I had to do was write a program to run on may laptop, and load the data SLOWLY via the /dev/modem port. It works.

I'd still like to know if there is some other way to load the cert files onto the Arduino, and then have code run on the Arduino that loads it into the SIMCOM. Can they be loaded into flash and read from there?

Thanks
Mike

Yes, research PROGMEM and the (F) macro. These allow data to be loaded into flash rather than ram.

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