Page 1 of 2
board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 7:06 am
by serdio
Hello
The problem: I can't connect to WiFi as client but can start it as AP
What I do:
Code: Select all
import network
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.scan()
Scan always return empty list
The same on wrapper function
Code: Select all
import easyw600
easyw600.scan() #Scanning Peripheral WiFi Network
but if I start AP it works, so I assume that radio module is working
Code: Select all
import easyw600
easyw600.createap(ssid="w60x_softap", password=None) #create a soft ap
What may be a problem with starting wifi as client ( STA_IF mode)?
Thank you
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 7:43 am
by Roberthh
I can use STA mode. But I never called scan(). Instead I connect directly to a known AP. Does that work for you?
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 7:48 am
by serdio
No, it doesn't. The same behavior was when I tried arduino port for this board. It's not connected to wifi as client.
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 9:36 am
by Roberthh
easyw600.scan() works here. And connecting using easyw600.connect() too. And it always did. I have my local AP set up for WPA2. Maybe that is a problem.
Which firmware are you using?
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 10:12 am
by serdio
Code: Select all
__ __
\ \ /\ / /
\ \ / \ / /
\ \/ /\ \/ /
\ / \ /
/ /\ / /\
/ /\ \/ /\ \
/ / \ / \ \
/_/ \/ \_\
WinnerMicro W600
MicroPython v1.10-284-g2eee4e2-dirty on 2019-11-08; WinnerMicro module with W600
Type "help()" for more information.
Is there any other firmware for this board?
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 10:27 am
by serdio
The same on
WinnerMicro W600
MicroPython v1.10-282-g6a9b3cb-dirty on 2019-09-17; WinnerMicro module with W600
from here
https://docs.wemos.cc/en/latest/tutoria ... _w600.html
http://www.winnermicro.com/upload/1/edi ... 203932.zip
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 10:46 am
by Roberthh
A few people have worked together to update the W600 firmware, remove a few bugs and make it more compatible to the MicroPython main thread, espcially for the Pin, I2C, SPI, utime and asyncio module. Some of the changes have been adopte by WinnerMicro in their Micropython repository, but the never published new binaries.
Some binary images for our branch can be found here:
https://github.com/robert-hh/Shared-Stuff
I have to update them again.
The source tree for that is here:
https://github.com/robert-hh/micropython/tree/w60x
It is mostly up-to-date.
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 10:57 am
by serdio
connecting...
upysh is intended to be imported using:
from upysh import *
To see this help text again, type "man".
upysh commands:
clear, ls, ls(...), head(...), cat(...), newfile(...)
cp('src', 'dest'), mv('old', 'new'), rm(...)
pwd, cd(...), mkdir(...), rmdir(...)
No Wifi setting found
WinnerMicro W600
MicroPython v1.13-100-g3131a6859-dirty on 2020-09-18; WinnerMicro module with W600
Type "help()" for more information.
Still not connected, but here I see new message "No Wifi setting found"
OK
Code: Select all
# put system init code
# print("")
# print(" __ __")
# print(" \ \ /\ / /")
# print(" \ \ / \ / /")
# print(" \ \/ /\ \/ / ")
# print(" \ / \ /")
# print(" / /\ / /\ ")
# print(" / /\ \/ /\ \ ")
# print(" / / \ / \ \ ")
# print(" /_/ \/ \_\ ")
from upysh import *
try:
import wifi_config
from easyw600 import *
connect(wifi_config.WIFI_SSID, wifi_config.WIFI_PASSWD)
ftpserver()
except:
print("No Wifi setting found")
from pye_mp import pye
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 11:46 am
by Roberthh
Sorry for the confusion. The _boot.py looks for a file called wifi_config.py with the content:
Code: Select all
WIFI_SSID="<my_ssid>"
WIFI_PASSWD ="<my_ssid_passwd>"
Besides that WiFi should work. Maybe there is a problem with local AP's
Re: board: tw-02 based on w600 wifi problem
Posted: Thu Dec 24, 2020 1:33 pm
by serdio
I measure current consumption of the board
On startup and idle mode -- 20.6ma
On network.connect(...) -- 25ma (for 10sec and return to idle) -- fail on "AP not found"
On easyw600.createap(...) -- 106ma
I check different AP's including hotspot on smartphone (2.4GHz)
So I think it just doesn't power on the radio module in client mode