<?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[Sending images using AT commands with 7080G (or any simcom modem)]]></title><description><![CDATA[<p dir="auto">Hi all.</p>
<p dir="auto">I am trying to use a lilygo-T-SIM7080G to send an image to an FTP server over NB-iot, taken with a OV2640.</p>
<p dir="auto">The main roadblock I have is sending an image to the modem, as there are no examples for using file management in the repository for the device. Also TinyGSM library has no file management examples.</p>
<p dir="auto">I can't really find any examples of anyone doing this in any language, so I guess it really is a bit of a niche problem.</p>
<p dir="auto">The most difficult point is streaming the image to the modem. Here is my extremely basic, but nonfunctional attempt. I'm not entirely sure why it doesn't work.</p>
<pre><code>    modem.sendAT("+CFSINIT"); //ready modem to rcv file
    modem.waitResponse();
    modem.sendAT("+CFSWFILE=0,\"image\",1,4096,9999"); //send filesize info
    modem.waitResponse();
    std::ifstream file("image.png", std::ios::binary);
    if (!file.is_open()) {
        std::cerr &lt;&lt; "Failed to open file." &lt;&lt; std::endl;
        return;
    }
    Serial.println("Read the image file into a buffer");
    std::vector&lt;char&gt; buffer(std::istreambuf_iterator&lt;char&gt;(file), {});
    Serial.println("Convert the buffer to a string");
    std::string str(buffer.begin(), buffer.end());
    Serial.println("Send the string to modem.sendAT()");
    const char* c_str = str.c_str();
    modem.stream.write(c_str);
    modem.waitResponse();
    modem.sendAT("+CFSGFIS=?");
    modem.waitResponse();
</code></pre>
]]></description><link>https://www.community.lilygo.cc/topic/975/sending-images-using-at-commands-with-7080g-or-any-simcom-modem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 12:46:50 GMT</lastBuildDate><atom:link href="https://www.community.lilygo.cc/topic/975.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 May 2024 11:34:00 GMT</pubDate><ttl>60</ttl></channel></rss>