<?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[&lt;LAN Module with W5500 V12&gt; - How to assign a fixed IP(static IP)(no-DHCP) address in Blockly or MicroPython?]]></title><description><![CDATA[<p dir="auto"><strong>Background:</strong><br />
platform: Windows 10<br />
code framework: UiFlow(v1.9.5)</p>
<p dir="auto">M5Stack: M5Stack core2 for AWS(firm: UiFlow core2 v1.10.3)<br />
module: LAN(SKU: K012-B-V12)</p>
<p dir="auto">Hello everyone!<br />
Using M5Stack core2 and LAN module, I am trying to remotely control a machine with a fixed IP address in the factory with a 1:1 wired LAN connection.</p>
<p dir="auto"><strong>Question:</strong><br />
Is it possible to assign a fixed IP address in Blockly or MicroPython to the LAN module?</p>
<p dir="auto"><img src="/assets/uploads/files/1660733079946-ss12106.png" alt="0_1660733093633_ss12106.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Even if I select [Modules-&gt;LAN_Base-&gt;Init block] to initialize the LAN module in Blockly, No Python code is generated to assign a fixed IP.</p>
<p dir="auto"><img src="/assets/uploads/files/1660733417359-ss12110.png" alt="0_1660733430444_ss12110.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Thank you,<br />
yuza_tipo</p>
]]></description><link>https://community.m5stack.com/topic/4532/lan-module-with-w5500-v12-how-to-assign-a-fixed-ip-static-ip-no-dhcp-address-in-blockly-or-micropython</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 09:18:32 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4532.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Aug 2022 10:51:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &lt;LAN Module with W5500 V12&gt; - How to assign a fixed IP(static IP)(no-DHCP) address in Blockly or MicroPython? on Wed, 21 Sep 2022 18:26:46 GMT]]></title><description><![CDATA[<p dir="auto">i same set up with <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/23805">@yuza_tipo</a> but i use UiFlow v1.10.5<br />
i try run "<em><strong>module.get(module.LANBASE)</strong></em>" on putty serial, and getting error like this.</p>
<p dir="auto"><em>Traceback (most recent call last):<br />
File "&lt;stdin&gt;", line 1, in &lt;module&gt;<br />
File "<a href="http://module.py" target="_blank" rel="noopener noreferrer nofollow ugc">module.py</a>", line 64, in get<br />
File "&lt;string&gt;", line 1, in &lt;module&gt;<br />
File "modules/_lan_base.py", line 33, in <strong>init</strong><br />
File "libs/ethernet/wiznet5k.py", line 181, in <strong>init</strong><br />
AssertionError: Failed to configure DHCP Server!</em></p>
<p dir="auto">Anyone have solution for this problem ?<br />
Thanks in advance.</p>
]]></description><link>https://community.m5stack.com/post/18671</link><guid isPermaLink="true">https://community.m5stack.com/post/18671</guid><dc:creator><![CDATA[enzo.nc]]></dc:creator><pubDate>Wed, 21 Sep 2022 18:26:46 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;LAN Module with W5500 V12&gt; - How to assign a fixed IP(static IP)(no-DHCP) address in Blockly or MicroPython? on Thu, 18 Aug 2022 11:03:25 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for your prompt reply... <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a></p>
<p dir="auto">The example you posted [<a href="https://community.m5stack.com/topic/4376/">https://community.m5stack.com/topic/4376/</a>] helped me get started with this module.<br />
#UiFlow built-in sample was not a core2 compatible screen and did not work. :-(</p>
<p dir="auto">I tried [lan.get_if_config()] you suggested with the shell of [Windows 10, Thonny(v4.0.0.b3)].</p>
<p dir="auto"><img src="/assets/uploads/files/1660820321826-12120-resized.png" alt="0_1660820335050_12120.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">While doing other trial and error, It seems that [libs/ethernet/wiznet5k.py] and [libs/ethernet/wiznet5k_dhcp.py] were running behind [lan = module.get(module.LANBASE)].</p>
<p dir="auto">If we can operate here directly..., can't you read [libs/ethernet/wiznet5k.py]? :-&lt;</p>
<p dir="auto">Thank you,<br />
yuza_tipo</p>
]]></description><link>https://community.m5stack.com/post/18378</link><guid isPermaLink="true">https://community.m5stack.com/post/18378</guid><dc:creator><![CDATA[yuza_tipo]]></dc:creator><pubDate>Thu, 18 Aug 2022 11:03:25 GMT</pubDate></item><item><title><![CDATA[Reply to &lt;LAN Module with W5500 V12&gt; - How to assign a fixed IP(static IP)(no-DHCP) address in Blockly or MicroPython? on Thu, 18 Aug 2022 11:38:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/23805">@yuza_tipo</a></p>
<p dir="auto">there is a <code>lan.get_if_config()</code> function which returns the current IP etc. as a 4 tuple like this <code>('192.168.x.x', '255.255.255.0', '192.168.x.1', '8.8.8.8')</code>.</p>
<p dir="auto">I also found there is a <code>lan.set_if_config()</code> function but when I feed the above 4 tuple as argument I get an error that the function takes 5 positional parameter, but only 2 are given. I tried many other ways to format the 4 arguments, but all I got are different error messages.</p>
<p dir="auto">Thanks<br />
Felix</p>
<p dir="auto">Edit: corrected incorrect <code>lan.get_ip_config()</code> - should be <code>lan.get_if_config()</code> (same for set)</p>
]]></description><link>https://community.m5stack.com/post/18369</link><guid isPermaLink="true">https://community.m5stack.com/post/18369</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 18 Aug 2022 11:38:46 GMT</pubDate></item></channel></rss>