Questions re: Wifi Skin add-on board for Pyboard

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
oserror
Posts: 43
Joined: Tue Feb 12, 2019 12:26 am

Questions re: Wifi Skin add-on board for Pyboard

Post by oserror » Tue Feb 19, 2019 10:03 pm

I went ahead and ordered one of these Wifi Skins. It is on its way but will take a few weeks to get here. I got a Pyboard too. I'm beginning to accumulate a small pile of various boards. It's cheaper than drinking though. :)

My question is, since this board is connected to the Pyboard by UART, could a custom firmware (i.e. MicroPython) be flashed on the add-on board? Then, serial communications could occur between the two processors?

And one more question. I have only flashed and erased with esptool. Can you back up flash easily with 'esptool.py read_flash'? I've never done this before and I'd be wary of removing data I might need later. I haven't seen this company's firmware floating around on the Internet.

Thank you very much.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Questions re: Wifi Skin add-on board for Pyboard

Post by pythoncoder » Thu Feb 21, 2019 6:42 pm

I've never heard of a WiFi skin for the Pyboard. Who makes it? Is it an ESP8266 with AT commands?
Peter Hinch
Index to my micropython libraries.


User avatar
oserror
Posts: 43
Joined: Tue Feb 12, 2019 12:26 am

Re: Questions re: Wifi Skin add-on board for Pyboard

Post by oserror » Thu Feb 21, 2019 7:18 pm

That's the one. I have been looking at the basics of SPI communication. I hope to either do I2C, SPI or UART to talk back and forth.

There isn't much documentation on the WiFi skin available aside from a little sample code, a schematic and some AT commands. I think I could learn a lot by hacking something together.

If I could access the pins of the esp8266, I could put Arduino code on there with a simple socket server application and use it as the SPI slave. I'm only thinking about sending small bits of data across to the Pyboard, probably less than 1K in size. The whole thing would be a learning experience for me.

I have a small web server that uses asynchronous iterators to send web pages by chunks and it works pretty well! I thought maybe I can keep expanding on that, possibly saving the data on the microSD card. There seems to be support for the microSD card access if I'm reading the information correctly, but I don't think it's connected to the limited AT commands they offer in their firmware.

I reached out to Tinysine for more information on their firmware source code, or failing that, just for the firmware itself so I could reflash it if necessary. I suppose I could get the firmware with esptool but I have not crossed that bridge (yet).

ThomasChr
Posts: 121
Joined: Sat Nov 25, 2017 7:50 am

Re: Questions re: Wifi Skin add-on board for Pyboard

Post by ThomasChr » Fri Feb 22, 2019 6:22 am

Maybe it‘s simply the default AT Firmware for the ESP8266?

User avatar
oserror
Posts: 43
Joined: Tue Feb 12, 2019 12:26 am

Re: Questions re: Wifi Skin add-on board for Pyboard

Post by oserror » Fri Feb 22, 2019 3:32 pm

I think you're right. I am fairly new to the esp8266/32 and I had not heard of those commands before. The last time I used AT commands was with a telephone modem.

It looks like the Espressif AT commands (I think this is their latest firmware):

https://www.espressif.com/sites/default ... set_en.pdf

correspond with the posted commands listed with the Tinysine device here:

http://www.tinyosshop.com/datasheet/ESP ... %20Doc.pdf

So I think I can find more documentation on the Espressif site to help with things.

The thing I was hoping to try was to poll for two different TCP ports on the WiFi skin and then get the information to the Pyboard via some sort of serial connection. It looks like the esp8266 side would be the slave, and I guess that means doing it in Arduino code. I haven't tried SPI communication yet. I want to try some experiments with esp8266 boards next week.

I think I could do it given enough time, if it's possible to do so.

Does it make more sense to stick with the AT firmware? I am open to suggestions.

User avatar
oserror
Posts: 43
Joined: Tue Feb 12, 2019 12:26 am

Re: Questions re: Wifi Skin add-on board for Pyboard

Post by oserror » Mon Feb 25, 2019 5:32 pm

I've been doing more research into what might be involved here. It seems if I were to flash MicroPython on this WiFi skin that I'd have an issue with using a UART. That is, using a UART would conflict with the REPL on the esp8266/Wifi Skin.

Would the fix from this commit work around this? https://github.com/micropython/micropyt ... 303fec6ed3

Could I put this code in my main.py file? Or should it go in boot.py? I would like to be able to break out into REPL if I needed to with a reset of the WiFi skin. Of course an erase and reflash would take care of it.

I guess I won't personally know until I receive the board in the mail. I can play around with a couple of esp8266 boards on a breadboard until then.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Questions re: Wifi Skin add-on board for Pyboard

Post by Roberthh » Mon Feb 25, 2019 5:41 pm

You need a mechanism to signal, which mode you want to go to. A few that come into my mind:

- You can always start in REPL mode and, if needed, send the command uos.dupterm(None, 1) from the PyBoard.
- You can enable WEBREPL, start the ESP8266 in UART mode and switch by WEBREPL, if required-
- You can add a connection between PyBoard GPIO and the ESP8266 GPIO and use that for signaling. Just ensure the initial state with a pull resistor.
- ......

Post Reply