Page 2 of 3

Re: Wemos W600-Pico

Posted: Wed Jan 29, 2020 6:17 am
by tve
This is how it looks for me on linux:

Code: Select all

> miniterm2.py --filter direct --dtr 0 --rts 0 /dev/ttyUSB2 115200
--- forcing DTR inactive
--- forcing RTS inactive
--- Miniterm on /dev/ttyUSB2  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

    __            __
    \ \    /\    / /
     \ \  /  \  / /
      \ \/ /\ \/ /
       \  /  \  /
       / /\  / /\
      / /\ \/ /\ \
     / /  \  /  \ \
    /_/    \/    \_\

MicroPython v1.10-286-g162de770b-dirty on 2020-01-27; WinnerMicro module with W600
Type "help()" for more information.
>>>

Re: Wemos W600-Pico

Posted: Thu Jan 30, 2020 7:11 am
by moshel
Thanks!
I figured out some things meanwhile, so sharing in case anyone needs it or search for it:

to flash the newest version of micropython, use the tool from https://github.com/wemos/w600tool.git and not from where the doc say.
run it like this:

Code: Select all

sudo python3 w600tool.py --upload-baud 115200 --upload ../W60X_MicroPython_1.10_B1.3_IMG/wm_w600.fls
another option to connect, probably not as good as the one suggested above is:

Code: Select all

sudo python3 -m serial.tools.miniterm --rts 0 /dev/ttyUSB0 115200

Re: Wemos W600-Pico

Posted: Thu Jan 30, 2020 7:21 am
by moshel
and another, probably stupid question... All the docs and tutorials show using micropython in console mode. How do I actually load a program to the w600 to be executed when its turned on?

Re: Wemos W600-Pico

Posted: Thu Jan 30, 2020 9:35 pm
by Christian Walther
If it has a filesystem, I assume it will execute boot.py and main.py when it starts, like the other ports. (See docs, it looks like they’re only mentioned on port-specific pages.) If not, there is no way apart from building your own firmware. Although you may have trouble getting the files there if the usual tools for that don’t work. (Does it have WebREPL?) In the worst case, you can always type in file writing commands on the REPL.

Re: Wemos W600-Pico

Posted: Sat Feb 01, 2020 9:07 pm
by moshel
It does not show in lsblk on my linux, alas
I don't think it has webrepl installed but I am a bit confused about the webrepl concept. If anyone managed to actually load files on it, I would be happy to hear how.
Thanks!

Re: Wemos W600-Pico

Posted: Sun Feb 02, 2020 2:15 am
by tve
I used a hacked up pyboard.py to load files, it has a filesystem in flash like all the other MP boards.

Re: Wemos W600-Pico

Posted: Sun Feb 02, 2020 7:48 am
by moshel
some more information.....
after connecting the w600 to the lan, use sta_if.ifconfig() to find your ip address
run ftp server by :
import w600
w600.run_ftpserver(username="root", password="root")
you can now upload your files!

https://gist.github.com/aerialist/528b4 ... 4bc77f5289 was a very usefull resource

Re: Wemos W600-Pico

Posted: Tue Feb 04, 2020 11:20 am
by adxx
my 2c on that board:
1. get w600tool.py from Volodymyr at https://github.com/vshymanskyy/w600tool
- I run my as "python3 w600tool.py <...etc>"
2. always have board connected to wifi or ap activated with ftp server running (I use easyw600.ftpserver()) and have time.sleep_ms(1) in the main loop
- by doing that you'll have ftp access to the board and will be able to replace main.py

Ctr+c, Ctr+d doesn't work when the main loop is running.

Re: Wemos W600-Pico

Posted: Sun Apr 12, 2020 10:44 pm
by federico
In my opinion uPyCraft , at the moment, is the only IDE that can be easily used with the new W600-PICO board and I am using it( not only). You can load and check script on the Editor area, load(*) script from the board in the Editor area and download script from the Editor to the board.

Anyway, with the Windows yPyCraft version V1.1, also without the capability of loading the board code from the GUI device tree, a workaround is to load in the uPyCraft REPL shell the onboard upython code using
>>>print(open('<filename.py>','rU).read()) and the cut and paste it in the Editor area.

To download a new firmware we need to use the Volodymyr Shymanskyy w600tool ( Python or Windows version) that can be downloaded from github.

As in the board specs the available flash is 1MB but what's more important to know is the available free flash size that we can use to store our micropython scripts.
To be short ( if I am right) I have found that we have a total of 63 blocks of 512 bytes of available flash size(about 32k) with 58 of them free (29k) for our scripts storage ( 5 are used by the default storage including. 3 dir - lib-sys-cert- and the boot and w600easy files).
Clearly a lot af flash is used to store the firmware wm_w600.fls of 528 kBytes).
Until now the reason of the flash deficit is unknown to me.
I have tested the same script with an ESP8266 board. having 4MB flash founding an available free flash around 3.5MB that is a reasonable value.


# free flash size micropython script
import uos, w600
def run():
files_space = 0
for i in range(len(uos.listdir())):
if len(uos.listdir().split('.')) < 2:
a= uos.listdir()
print("Dir:{} bytes:{}".format(a,uos.stat(a)[6]))
files_space = files_space + uos.stat(a)[6]
else:
a = uos.listdir()
files_space = files_space + uos.stat(a)[6]
b = uos.listdir().split('.')[0]
print(" File:{} bytes:{}".format(b,uos.stat(a)[6]))
s = uos.statvfs(uos.getcwd())
print('Root Dir : '+ uos.getcwd())
print(s)
print('ESP flash size : '+ str( w600.flash_size()))
print('Flash avl size : '+'{0} bytes'.format((s[0]*s[2])))
print('Free flash size : '+'{0} bytes'.format((s[0]*s[3])))
print('Used flash size : '+'{0} bytes'.format((s[0]*(s[2] - s[3]))))
print('Stored files size : '+ str(files_space))
==================================

(*) with the python version - because the WM600-PICO root is '/flash' - to be able to load/run script from the uPyCraft device tree some changes to the python code in uPyCraft.py are required.
............
def treeRightMenuOpenFile(self):
if sys.platform=="linux" and str(se....
.........
.........
if self.currentBoard=="w600":
print(' row 2266 - w600 debug filename : ' + self.fileName)
a = str(self.fileName)
print(a)
b = '.'+(a.lstrip("/flash")).lstrip("'")
print(b)
self.uitoctrlQueue.put("loadfile:::" + b)
else:
self.uitoctrlQueue.put("loadfile:::%s"%self.fileName)

Re: Wemos W600-Pico

Posted: Mon Apr 13, 2020 12:09 am
by federico
pcOpenFile.PNG
pcOpenFile.PNG (236.88 KiB) Viewed 5384 times
pcOpenFile.PNG
pcOpenFile.PNG (236.88 KiB) Viewed 5384 times