<?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[download boot.py and main.py by ftp]]></title><description><![CDATA[<p dir="auto">Trying to find example of downloading file by ftp?  Is ftp a builtin library?   Anyway example of how to download a file by ftp?   Basically want to download a program logic by ftp and reboot to activate the new logic.</p>
]]></description><link>https://forum.pycom.io/topic/2281/download-boot-py-and-main-py-by-ftp</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 15:57:42 GMT</lastBuildDate><atom:link href="https://forum.pycom.io/topic/2281.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Dec 2017 10:40:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Sun, 10 Dec 2017 10:40:58 GMT]]></title><description><![CDATA[<p dir="auto">Trying to find example of downloading file by ftp?  Is ftp a builtin library?   Anyway example of how to download a file by ftp?   Basically want to download a program logic by ftp and reboot to activate the new logic.</p>
]]></description><link>https://forum.pycom.io/post/13468</link><guid isPermaLink="true">https://forum.pycom.io/post/13468</guid><dc:creator><![CDATA[misterlisty]]></dc:creator><pubDate>Sun, 10 Dec 2017 10:40:58 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Sun, 10 Dec 2017 12:59:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1981">@misterlisty</a> Th eftp server is built in. For an ftp client, there is a library here: <a href="https://github.com/SpotlightKid/micropython-ftplib" target="_blank" rel="noopener noreferrer nofollow">https://github.com/SpotlightKid/micropython-ftplib</a><br />
I tried that on LoPy and it works. There is an example using this ftplib in the OTA discussion: <a href="https://forum.pycom.io/topic/518/ota-or-not-ota-that-is-the-question/74">https://forum.pycom.io/topic/518/ota-or-not-ota-that-is-the-question/74</a><br />
I used that to download the firmware image.</p>
]]></description><link>https://forum.pycom.io/post/13470</link><guid isPermaLink="true">https://forum.pycom.io/post/13470</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Sun, 10 Dec 2017 12:59:01 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Tue, 12 Dec 2017 10:29:02 GMT]]></title><description><![CDATA[<pre><code>from ftplib import *
</code></pre>
<p dir="auto">File &quot;<a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a>&quot;, line 13, in &lt;module&gt;<br />
MemoryError: memory allocation failed, allocating 662 bytes</p>
<p dir="auto">I'm using the ftplib from github as suggested, i just want to be able to update the boot and main files remotely..is this how other people are doing OTA?  At the moment, i'm only updating the script files</p>
]]></description><link>https://forum.pycom.io/post/13512</link><guid isPermaLink="true">https://forum.pycom.io/post/13512</guid><dc:creator><![CDATA[misterlisty]]></dc:creator><pubDate>Tue, 12 Dec 2017 10:29:02 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Tue, 12 Dec 2017 12:23:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1981">@misterlisty</a> In ther esp8266 subdir of that repository there is a smaller version of ftplib. You may also put ftplib into frozen bytecode, or write you own little tool to download <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a> and <a href="http://boot.py" target="_blank" rel="noopener noreferrer nofollow">boot.py</a>.</p>
]]></description><link>https://forum.pycom.io/post/13515</link><guid isPermaLink="true">https://forum.pycom.io/post/13515</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Tue, 12 Dec 2017 12:23:39 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Tue, 12 Dec 2017 14:10:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> thanks whatis frozen bytecode?  seems like something i need to know!</p>
]]></description><link>https://forum.pycom.io/post/13518</link><guid isPermaLink="true">https://forum.pycom.io/post/13518</guid><dc:creator><![CDATA[misterlisty]]></dc:creator><pubDate>Tue, 12 Dec 2017 14:10:15 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Tue, 12 Dec 2017 14:47:33 GMT]]></title><description><![CDATA[<p dir="auto">If you have a fresh Lopy, ftp is enabled by default. You will have a wifi network named lopy-wlan-xxxx</p>
<p dir="auto">If you connect to the wifi network (password is <a href="http://www.pycom.io" target="_blank" rel="noopener noreferrer nofollow">www.pycom.io</a>) you can use a ftp program like Filezilla and transfer files in both directions.</p>
<p dir="auto">Server 192.168.4.1<br />
User: micro<br />
Pass:  python</p>
]]></description><link>https://forum.pycom.io/post/13519</link><guid isPermaLink="true">https://forum.pycom.io/post/13519</guid><dc:creator><![CDATA[rvandam]]></dc:creator><pubDate>Tue, 12 Dec 2017 14:47:33 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Tue, 12 Dec 2017 16:12:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1981">@misterlisty</a> Frozen bytecode is a mechanism to store compiled python code in the flash memory. During execution, it will not use RAM for the code and static strings, only for the dynamic data it deals with. If you want to use that, you have to create your own firmware images. That is not really complicated, just the initial step seems a little bit complicated. The git repository is at: <a href="https://github.com/pycom/pycom-micropython-sigfox" target="_blank" rel="noopener noreferrer nofollow">https://github.com/pycom/pycom-micropython-sigfox</a>, the tailored esp-if is at <a href="https://github.com/pycom/pycom-esp-idf" target="_blank" rel="noopener noreferrer nofollow">https://github.com/pycom/pycom-esp-idf</a>. The <a href="http://readme.md" target="_blank" rel="noopener noreferrer nofollow">readme.md</a> there gives you instructions on how to setup the build environment. Once you have set it up, you can copy the files to be placed in flash into the directory pycom-micropython-sigfox/esp23/frozen and start a build run. That all works best on unix, worst on Windows.<br />
There is an intermediate solution of precompiling your python script on your PC and load the compiled version to the devices file system. The code will still be loaded to RAM, but not RAM is required for compiling. That helps if your run out of memory at the import statement. For that, you need the cross-compiler, which is also part of the github package, and would also required to setup the build environment. As a conveniene offer, I have pre-built verions of the cross compiler mpy-cross in my own repository at <a href="https://github.com/robert-hh/Shared-Stuff" target="_blank" rel="noopener noreferrer nofollow">https://github.com/robert-hh/Shared-Stuff</a>. The files mpy-cross-pycom.exe and mpy-cross-pycom-linux are the once suitable for the pycom products.</p>
]]></description><link>https://forum.pycom.io/post/13521</link><guid isPermaLink="true">https://forum.pycom.io/post/13521</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Tue, 12 Dec 2017 16:12:40 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Wed, 13 Dec 2017 03:12:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a>  thanks, one more questions, how to keep up with updates done by pycom, i assume i do a GET of github and merge the chaages?</p>
]]></description><link>https://forum.pycom.io/post/13533</link><guid isPermaLink="true">https://forum.pycom.io/post/13533</guid><dc:creator><![CDATA[misterlisty]]></dc:creator><pubDate>Wed, 13 Dec 2017 03:12:05 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Wed, 13 Dec 2017 06:21:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1981">@misterlisty</a> Once you have a local clone of that repository, you can run &quot;git pull&quot; to update that. However, Pycom is not very consistent in it's repository handling. So I had to delete and re-clone the repositories a few times. But that is also not a big deal.</p>
]]></description><link>https://forum.pycom.io/post/13534</link><guid isPermaLink="true">https://forum.pycom.io/post/13534</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Wed, 13 Dec 2017 06:21:45 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Wed, 13 Dec 2017 15:29:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/98">@robert-hh</a> can i use ftplib.mpy will lopy recognise this?  when i use the <a href="http://ftplib.py" target="_blank" rel="noopener noreferrer nofollow">ftplib.py</a> from the esp dir i get allocation memeory...this mean i have to bytefreeze it?</p>
]]></description><link>https://forum.pycom.io/post/13549</link><guid isPermaLink="true">https://forum.pycom.io/post/13549</guid><dc:creator><![CDATA[misterlisty]]></dc:creator><pubDate>Wed, 13 Dec 2017 15:29:43 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Wed, 13 Dec 2017 16:07:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.pycom.io/uid/1981">@misterlisty</a> ftplib.mpy should work on a Lopy, give that you use the latest firmware and the mpy file was created with the proper mpy-cross program. You have to remove or rename <a href="http://ftplib.py" target="_blank" rel="noopener noreferrer nofollow">ftplib.py</a> from the file system, otherwise the .py file is used.</p>
]]></description><link>https://forum.pycom.io/post/13553</link><guid isPermaLink="true">https://forum.pycom.io/post/13553</guid><dc:creator><![CDATA[robert-hh]]></dc:creator><pubDate>Wed, 13 Dec 2017 16:07:01 GMT</pubDate></item><item><title><![CDATA[Reply to download boot.py and main.py by ftp on Sat, 15 Jan 2022 19:26:29 GMT]]></title><description><![CDATA[<p dir="auto">download <a href="http://boot.py" target="_blank" rel="noopener noreferrer nofollow">boot.py</a> and <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow">main.py</a> by ftp</p>
]]></description><link>https://forum.pycom.io/post/39800</link><guid isPermaLink="true">https://forum.pycom.io/post/39800</guid><dc:creator><![CDATA[ARMAN ARMAN]]></dc:creator><pubDate>Sat, 15 Jan 2022 19:26:29 GMT</pubDate></item></channel></rss>