<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Uploading mqtt certificates to LTE module]]></title><description><![CDATA[<p dir="auto">How should i go about uploading certificates for mqtt to the LTE module?</p>
<p dir="auto">Mainly im looking for how they should be formatted. Currently im just copy-pasting the raw text from the .pem file and uploading it over UART/AT commands, but i keep getting ssl errors and i suspect its because the certificates are not being read in correctly. Ive also tried a string with \n after each line.</p>
<p dir="auto">EX:</p>
<blockquote>
<p dir="auto">AT+CCERTDOWN="clientcert.pem", 1219<br />
&gt; {raw string of .pem cert}</p>
</blockquote>
]]></description><link>https://community.m5stack.com/topic/5281/uploading-mqtt-certificates-to-lte-module</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Apr 2026 06:21:32 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5281.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 May 2023 00:58:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Uploading mqtt certificates to LTE module on Sat, 13 May 2023 07:09:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jkeyser" aria-label="Profile: jkeyser">@<bdi>jkeyser</bdi></a> As far as I understand, The certs are held on the processor and the processing in done on the processor not the modem.<br />
From the various services I tested (AWS/Azure/Private server and others I cant remember name off without checking my book) all certs are save device side and server side and never transmitted during communications.</p>
]]></description><link>https://community.m5stack.com/post/20836</link><guid isPermaLink="true">https://community.m5stack.com/post/20836</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 13 May 2023 07:09:14 GMT</pubDate></item><item><title><![CDATA[Reply to Uploading mqtt certificates to LTE module on Fri, 12 May 2023 19:30:38 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/jkeyser" aria-label="Profile: jkeyser">@<bdi>jkeyser</bdi></a></p>
<p dir="auto">just for fun I asked ChatGPT to provide code to upload a certificate into an SIM7600G modem and after some tweaking I think it could actually work.</p>
<p dir="auto">Note: I have not tested below code myself.</p>
<pre><code>#include &lt;SoftwareSerial.h&gt;

SoftwareSerial sim7600gSerial(14, 12); // RX, TX pins for ESP32

const char* ROOT_CERTIFICATE =
  "-----BEGIN CERTIFICATE-----\n" \
  "yrvhNk3cRUBDjAfQ/hp8nQmfQIUpq95CE7Qw8Ty4ekOBL0BtLJjgsL4AqKK1Xf5K\n" \
  "c6kCqKYW4H8xBjJYlFe//KkF1X8tBRR7ZYh3tBpoaiG4IQKerf6DRd1eQ2qBvA7Y\n" \
  "OvG+K/8dLQ7BScscx9fJWxkFtXv+j4I2VpO3F8Z9sQHHlk49xdmMxEi2J1U5JBAu\n" \
  "jyAVhysYtdnE+1p4KhLSWmCU1rlMj54BQrKy38szmR0EzOxZKIZFvywIPkkNcXx2\n" \
  "aa3CzgIKJVf8AhsgthD9Wp6qu1vkxN0tJj2kF4/shtv4/z2Jj4mDN1/0Cg2hOsQQ\n" \
  "0PipV/nMhOF0fu8x7n3P9+q8U6SWANJyvKXh3OLjWhS/iPp89xQaC4xlGzTTvwiE\n" \
  "Zg==\n" \
  "-----END CERTIFICATE-----\n";

void setup() {
  Serial.begin(9600);
  sim7600gSerial.begin(9600);
  delay(1000);

  // Upload the root certificate to the SIM7600G modem
  sim7600gSerial.println("AT+CFUN=1"); // Turn on the modem
  sim7600gSerial.print("AT+CCERTDOWN=\"root_cert.pem\",");
  sim7600gSerial.println(strlen(ROOT_CERTIFICATE)); // Send the length of the certificate data
  sim7600gSerial.print(ROOT_CERTIFICATE);
}

void loop() {
  // do nothing
}
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/20833</link><guid isPermaLink="true">https://community.m5stack.com/post/20833</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 12 May 2023 19:30:38 GMT</pubDate></item><item><title><![CDATA[Reply to Uploading mqtt certificates to LTE module on Fri, 12 May 2023 18:58:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/jkeyser" aria-label="Profile: jkeyser">@<bdi>jkeyser</bdi></a></p>
<p dir="auto">I think an MQTT connection can be done in two (maybe more) ways:</p>
<p dir="auto">Either by using AT commands to upload the certificates into the modem and the use the built in AT commands for the MQTT connection.</p>
<p dir="auto">I assume UIFlow takes another route. It is not using the built-in MQTT AT commands, but rather makes plain internet connection and then uses micropython MQTT commands; hence no need to upload the certificates into the modem.</p>
<p dir="auto">Note: above is just a guess, so I could be wrong.</p>
<p dir="auto">BTW: I don't think there is a right or wrong way to do it.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/20832</link><guid isPermaLink="true">https://community.m5stack.com/post/20832</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 12 May 2023 18:58:49 GMT</pubDate></item><item><title><![CDATA[Reply to Uploading mqtt certificates to LTE module on Fri, 12 May 2023 05:01:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> Maybe im misunderstanding how it works, but I believe you have to upload the certificates to the modem itself using AT commands.</p>
<p dir="auto">What i ended up doing was uploading the certs to the device, then just doing an open() in python, then sent those over UART using AT commands to the modem. Everything is working fine now, but not sure if this is the 'proper' way to do it.</p>
]]></description><link>https://community.m5stack.com/post/20823</link><guid isPermaLink="true">https://community.m5stack.com/post/20823</guid><dc:creator><![CDATA[jkeyser]]></dc:creator><pubDate>Fri, 12 May 2023 05:01:00 GMT</pubDate></item><item><title><![CDATA[Reply to Uploading mqtt certificates to LTE module on Wed, 10 May 2023 09:03:55 GMT]]></title><description><![CDATA[<p dir="auto">In UIFlow you upload the files to the device and use the MQTT setup block to select them</p>
]]></description><link>https://community.m5stack.com/post/20802</link><guid isPermaLink="true">https://community.m5stack.com/post/20802</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 10 May 2023 09:03:55 GMT</pubDate></item><item><title><![CDATA[Reply to Uploading mqtt certificates to LTE module on Tue, 09 May 2023 22:19:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> normally I use the vscode extension, but for basic testing right now im using uiflow</p>
]]></description><link>https://community.m5stack.com/post/20798</link><guid isPermaLink="true">https://community.m5stack.com/post/20798</guid><dc:creator><![CDATA[jkeyser]]></dc:creator><pubDate>Tue, 09 May 2023 22:19:03 GMT</pubDate></item><item><title><![CDATA[Reply to Uploading mqtt certificates to LTE module on Tue, 09 May 2023 05:33:48 GMT]]></title><description><![CDATA[<p dir="auto">how are you programming the core?</p>
]]></description><link>https://community.m5stack.com/post/20790</link><guid isPermaLink="true">https://community.m5stack.com/post/20790</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 09 May 2023 05:33:48 GMT</pubDate></item></channel></rss>