<?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[Please fix micropython support for &quot;LAN base module W5500 V12&quot;]]></title><description><![CDATA[<p dir="auto">I've put a some effort into making the ethernet communication work for "LAN base module W5500 V12", but with no luck...</p>
<p dir="auto">One big issue with the current libraries is that the "libs/ethernet/wiznet5k" needs "libs/ethernet/wiznet5k_dhcp". Since you put all the libraries in the "ethernet" folder, you'll get a reference error for the "import wiznet5k_dhcp" and "import wiznet5k_dns".</p>
<p dir="auto">You can get ideas from here: <a href="https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k/tree/450c52e3b5a1f830581d8668cf57e779309d0aa7/adafruit_wiznet5k" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k/tree/450c52e3b5a1f830581d8668cf57e779309d0aa7/adafruit_wiznet5k</a></p>
<p dir="auto">And this guy claims to have got it right with w5500, micropython and esp32: <a href="https://github.com/Ayyoubzadeh/ESP32-Wiznet-W500-Micropython" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Ayyoubzadeh/ESP32-Wiznet-W500-Micropython</a></p>
<p dir="auto">I'm a beginner with the M5Stack, and I've reached the point where I'm trying to read and write to specific addresses, but something goes wrong (probably the SPI initiation), so I always end up with the error "AssertionError: Chip not reset properly!" (File "<a href="http://wiznet5k.py" target="_blank" rel="noopener noreferrer nofollow ugc">wiznet5k.py</a>", line 384, in detect_w5500).</p>
<p dir="auto">There are so many undocumented features for the M5Stack that it's challenging to gain an understanding and it's almost impossible to search for errors.</p>
<p dir="auto">This is some of the libraries that I would like to get functional and of course documented:</p>
<ul>
<li>libs/ethernet/<strong>init</strong></li>
<li>libs/ethernet/wiznet5k</li>
<li>libs/ethernet/wiznet5k_dhcp</li>
<li>libs/ethernet/wiznet5k_dns</li>
<li>libs/ethernet/wiznet5k_mqtt</li>
<li>libs/ethernet/wiznet5k_ntp</li>
<li>libs/ethernet/wiznet5k_socket</li>
<li>libs/ethernet/wiznet5k_wsgiserver</li>
</ul>
<p dir="auto">Documentation????:</p>
<ul>
<li>modules/_lan_base</li>
<li>module</li>
</ul>
]]></description><link>https://community.m5stack.com/topic/5539/please-fix-micropython-support-for-lan-base-module-w5500-v12</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 13:17:24 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5539.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 Aug 2023 20:34:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Please fix micropython support for &quot;LAN base module W5500 V12&quot; on Sat, 26 Aug 2023 16:27:15 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/49155">@H-Gruber</a></p>
<p dir="auto">below code works for me using M5Stack Basic or Fire (running UIFlow firmware 1.12.3):</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
import module

setScreenColor(0x222222)

lan = module.get(module.LANBASE)

label0 = M5TextBox(21, 24, "label0", lcd.FONT_Default, 0xFFFFFF, rotate=0)
label1 = M5TextBox(22, 58, "label1", lcd.FONT_Default, 0xFFFFFF, rotate=0)

label0.setText('Hello 1')
lan.tcp_udp_config('192.168.144.1', 4711, 1, 2)
label0.setText('Hello 2')
label1.setText(str(lan.get_if_config()))
lan.tcp_send_packet('1234')
label0.setText('Hello 3')
lan.socket_close()
label0.setText('Hello 4')
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/22077</link><guid isPermaLink="true">https://community.m5stack.com/post/22077</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 26 Aug 2023 16:27:15 GMT</pubDate></item><item><title><![CDATA[Reply to Please fix micropython support for &quot;LAN base module W5500 V12&quot; on Sat, 26 Aug 2023 15:30:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a><br />
I tried and I''l get a DNS-error in this line:<br />
"lan = module.get(module.LANBASE)"</p>
<p dir="auto">I haven't tried with "CircuitPython" this is (normally) maintained by Adafruit.<br />
One problem with CircuitPython compared to micopython is it has no support for threads.<br />
Later I want to add a watchdog (when I can communicate) and it will not function without multithreading...</p>
]]></description><link>https://community.m5stack.com/post/22076</link><guid isPermaLink="true">https://community.m5stack.com/post/22076</guid><dc:creator><![CDATA[H-Gruber]]></dc:creator><pubDate>Sat, 26 Aug 2023 15:30:49 GMT</pubDate></item><item><title><![CDATA[Reply to Please fix micropython support for &quot;LAN base module W5500 V12&quot; on Sat, 26 Aug 2023 13:32:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/49155">@H-Gruber</a></p>
<p dir="auto">any reason you did not try the provided <a href="https://flow.m5stack.com/" target="_blank" rel="noopener noreferrer nofollow ugc">UIFlow</a> blocks under <code>Modules</code> - <code>LAN Base</code>?</p>
<p dir="auto">BTW: I just found out that MicroPython is not the same as CircuitPython (and I think both are different from UIFlow).</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/22075</link><guid isPermaLink="true">https://community.m5stack.com/post/22075</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 26 Aug 2023 13:32:49 GMT</pubDate></item><item><title><![CDATA[Reply to Please fix micropython support for &quot;LAN base module W5500 V12&quot; on Sat, 26 Aug 2023 09:40:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/49155">@h-gruber</a><br />
Checking in to see if I received any responses. Where are the developers from M5Stack?<br />
I've placed the gadgets on my shelf. It's a total waste of time trying to make things work with closed source when there's no documentation. The provided example with Google Blockly (is it Flow?) results in a DNS error.</p>
<p dir="auto">I was considering purchasing the "ATOM PoE Kit with W5500", but I suspect I might encounter the same issues.</p>
<p dir="auto">The idea of stacking modules on top of each other is brilliant. I'll check back in the future to see if they've transitioned to open source or if the issues have been resolved...</p>
]]></description><link>https://community.m5stack.com/post/22074</link><guid isPermaLink="true">https://community.m5stack.com/post/22074</guid><dc:creator><![CDATA[H-Gruber]]></dc:creator><pubDate>Sat, 26 Aug 2023 09:40:06 GMT</pubDate></item><item><title><![CDATA[Reply to Please fix micropython support for &quot;LAN base module W5500 V12&quot; on Tue, 08 Aug 2023 22:06:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/49155">@h-gruber</a> said in <a href="/post/21804">Please fix micropython support for "LAN base module W5500 V12"</a>:</p>
<blockquote>
<p dir="auto">from machine import Pin,SPI<br />
from libs.ethernet.wiznet5k import WIZNET5K<br />
import libs.ethernet.wiznet5k_socket as socket<br />
import time<br />
import module<br />
import LAN.wiznet5k_requests as requests<br />
#Server<br />
ServerIP = '192.168.0.100'<br />
ServerSub = '255.255.255.0'<br />
ServerRouter = '192.168.0.254'<br />
ServerDNS = '192.168.0.254'<br />
def cnvIP(inIP):<br />
stripIP = inIP.strip()<br />
splitIP = stripIP.split('.')<br />
outIP = tuple(int(x) for x in splitIP)<br />
return(outIP)<br />
nic = WIZNET5K(is_dhcp=False)<br />
time.sleep(1)<br />
nic.ifconfig = (cnvIP(ServerIP),cnvIP(ServerSub),cnvIP(ServerRouter),cnvIP(ServerDNS))<br />
requests.set_socket(socket, nic)<br />
time.sleep(1)<br />
MAC = ''.join(['{:02x}'.format(b) for b in nic.mac_address])<br />
print("macaddress: " + MAC)</p>
</blockquote>
<p dir="auto">I've made som improvment to get rid of the "requests" module but I stuck with the socket communication. I can ping the address (192.168.0.100)</p>
<p dir="auto">#----&gt; code  snippet from socket communication--&gt; I get stuck on the "recv" function. I've tried to reduce to 128 byte (prev. 2048) and I know my client is OK. But I get no error message...</p>
<p dir="auto">u = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br />
u.bind((ServerIP, Port))<br />
tcp1_conn, tcp1_addr = u.accept()<br />
data = tcp1_conn.recv(128)</p>
<hr />
<p dir="auto">from libs.ethernet.wiznet5k import WIZNET5K<br />
import libs.ethernet.wiznet5k_socket as socket<br />
import time</p>
<p dir="auto">#Server<br />
ServerIP = '192.168.0.100'<br />
ServerSub = '255.255.255.0'<br />
ServerRouter = '192.168.0.254'<br />
ServerDNS = '192.168.0.254'<br />
Port = 5465</p>
<p dir="auto">def cnvIP(inIP):<br />
stripIP = inIP.strip()<br />
splitIP = stripIP.split('.')<br />
outIP = tuple(int(x) for x in splitIP)<br />
return(outIP)</p>
<p dir="auto">nic = WIZNET5K(is_dhcp=False)<br />
time.sleep(1)<br />
nic.ifconfig = (cnvIP(ServerIP),cnvIP(ServerSub),cnvIP(ServerRouter),cnvIP(ServerDNS))<br />
socket._the_interface = nic<br />
time.sleep(1)<br />
MAC = ''.join(['{:02x}'.format(b) for b in nic.mac_address])<br />
print("macaddress: " + MAC)</p>
<h1>The rest is socket communication ---&gt;</h1>
]]></description><link>https://community.m5stack.com/post/21833</link><guid isPermaLink="true">https://community.m5stack.com/post/21833</guid><dc:creator><![CDATA[H-Gruber]]></dc:creator><pubDate>Tue, 08 Aug 2023 22:06:00 GMT</pubDate></item><item><title><![CDATA[Reply to Please fix micropython support for &quot;LAN base module W5500 V12&quot; on Sun, 06 Aug 2023 13:50:05 GMT]]></title><description><![CDATA[<p dir="auto">I'm doing some progress...<br />
I get initiation problem sometimes (I fix this by cutting the power)????<br />
Now I get as far as "socket.accept()" but still I don't know if my LAN module works as supposed and I can't communcate with my client program</p>
<p dir="auto">The library "wiznet5k_requests" is located here:<br />
<a href="https://github.com/Ayyoubzadeh/ESP32-Wiznet-W500-Micropython" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Ayyoubzadeh/ESP32-Wiznet-W500-Micropython</a></p>
<hr />
<p dir="auto">from machine import Pin,SPI<br />
from libs.ethernet.wiznet5k import WIZNET5K<br />
import libs.ethernet.wiznet5k_socket as socket<br />
import time<br />
import module<br />
import LAN.wiznet5k_requests as requests</p>
<p dir="auto">#Server<br />
ServerIP = '192.168.0.100'<br />
ServerSub = '255.255.255.0'<br />
ServerRouter = '192.168.0.254'<br />
ServerDNS = '192.168.0.254'</p>
<p dir="auto">def cnvIP(inIP):<br />
stripIP = inIP.strip()<br />
splitIP = stripIP.split('.')<br />
outIP = tuple(int(x) for x in splitIP)<br />
return(outIP)</p>
<p dir="auto">nic = WIZNET5K(is_dhcp=False)<br />
time.sleep(1)<br />
nic.ifconfig = (cnvIP(ServerIP),cnvIP(ServerSub),cnvIP(ServerRouter),cnvIP(ServerDNS))<br />
requests.set_socket(socket, nic)<br />
time.sleep(1)<br />
MAC = ''.join(['{:02x}'.format(b) for b in nic.mac_address])<br />
print("macaddress: " + MAC)</p>
<h1>The rest is socket communication ---&gt;</h1>
]]></description><link>https://community.m5stack.com/post/21804</link><guid isPermaLink="true">https://community.m5stack.com/post/21804</guid><dc:creator><![CDATA[H-Gruber]]></dc:creator><pubDate>Sun, 06 Aug 2023 13:50:05 GMT</pubDate></item><item><title><![CDATA[Reply to Please fix micropython support for &quot;LAN base module W5500 V12&quot; on Sat, 05 Aug 2023 19:26:15 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, but I tried to change the SPI settings and I'm using this setting:</p>
<p dir="auto"><a href="https://docs.m5stack.com/en/base/lan_base" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/en/base/lan_base</a></p>
<hr />
<p dir="auto">from machine import Pin,SPI<br />
from LAN.wiznet5k import WIZNET5K<br />
#in my own folder "LAN" I got the library "wiznet5k"<br />
spi=SPI(2, 8000000, mosi=Pin(23), miso=Pin(19), sck=Pin(18))<br />
nic = WIZNET5K(spi, Pin(26), Pin(13)) #spi,cs,reset pin</p>
]]></description><link>https://community.m5stack.com/post/21798</link><guid isPermaLink="true">https://community.m5stack.com/post/21798</guid><dc:creator><![CDATA[H-Gruber]]></dc:creator><pubDate>Sat, 05 Aug 2023 19:26:15 GMT</pubDate></item><item><title><![CDATA[Reply to Please fix micropython support for &quot;LAN base module W5500 V12&quot; on Fri, 04 Aug 2023 16:42:11 GMT]]></title><description><![CDATA[<p dir="auto">If you're stuck with that "AssertionError," double-check your SPI initiation settings, and try to troubleshoot step by step.</p>
]]></description><link>https://community.m5stack.com/post/21790</link><guid isPermaLink="true">https://community.m5stack.com/post/21790</guid><dc:creator><![CDATA[blackfigcurrant]]></dc:creator><pubDate>Fri, 04 Aug 2023 16:42:11 GMT</pubDate></item></channel></rss>