<?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[Wifi Invalid Mode]]></title><description><![CDATA[<p dir="auto">Hi All,</p>
<p dir="auto">I have an issue where, if I create this as <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>, I will get an error when I try to start my M5 paper.  The error is Wifi Invalid Mode.</p>
<p dir="auto">My script is below.  I have the same configuration in M5 burner and it seems to correctly trying to start <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a> as I get the error straight away.  If I chose to show the menu at start up then I can see the M5 paper in UIFlow 2 and I can see the device has connected to my account.  Any ideas?  It's a bit of a pain having choose the app from the applist on the devices screen, but I can run it like that.  My app is a bit more complicated than this but this script does the same thing:</p>
<p dir="auto">import os, sys, io<br />
import M5<br />
from M5 import *<br />
import network</p>
<p dir="auto">label0 = None<br />
wlan = None</p>
<p dir="auto">def setup():<br />
global label0, wlan</p>
<p dir="auto">wlan = network.WLAN(network.STA_IF)<br />
M5.begin()<br />
Widgets.fillScreen(0xeeeeee)<br />
label0 = Widgets.Label("label0", 124, 542, 1.0, 0xffffff, 0x000000, Widgets.FONTS.DejaVu18)</p>
<p dir="auto">wlan.connect('network', 'testtesttest')<br />
label0.setFont(Widgets.FONTS.DejaVu24)<br />
label0.setText(str(wlan.ifconfig()[0]))</p>
<p dir="auto">def loop():<br />
global label0, wlan<br />
M5.update()</p>
<p dir="auto">if <strong>name</strong> == '<strong>main</strong>':<br />
try:<br />
setup()<br />
while True:<br />
loop()<br />
except (Exception, KeyboardInterrupt) as e:<br />
try:<br />
from utility import print_error_msg<br />
print_error_msg(e)<br />
except ImportError:<br />
print("please update to latest firmware")</p>
<p dir="auto">Thanks,</p>
]]></description><link>https://community.m5stack.com/topic/7467/wifi-invalid-mode</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Mar 2026 08:13:16 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7467.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Apr 2025 17:18:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wifi Invalid Mode on Sat, 12 Apr 2025 11:39:45 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></p>
<p dir="auto">Thanks Felix.  I've added the same delay as in your code and that has fixed my issue.  I still have an error in the terminal if I have it connected to my PC but at least the app is functioning now and I can restart my M5 Paper straight into the app.</p>
<p dir="auto">Thanks very much for your help.</p>
<p dir="auto">J</p>
]]></description><link>https://community.m5stack.com/post/28872</link><guid isPermaLink="true">https://community.m5stack.com/post/28872</guid><dc:creator><![CDATA[JensH]]></dc:creator><pubDate>Sat, 12 Apr 2025 11:39:45 GMT</pubDate></item><item><title><![CDATA[Reply to Wifi Invalid Mode on Sat, 05 Apr 2025 18:28:33 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/61724">@JensH</a></p>
<p dir="auto">please check my example in UIFlow2 Project Zone: <em>M5Paper_WLAN_Test_UIFlow2.2.5</em></p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/28808</link><guid isPermaLink="true">https://community.m5stack.com/post/28808</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 05 Apr 2025 18:28:33 GMT</pubDate></item></channel></rss>