Bricked?

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Bricked?

Post by deshipu » Wed Oct 14, 2015 7:55 am

Hello,

I just received my WiPys, and was very excited to try them. I read the instructions on the back of the box, and connected one of the boards. After more than a minute of waiting, an AP named "wipy-wlan-something" finally appeared. Of course connecting to it made my computer disconnect from the Internet, so the next steps were a little bit difficult, switching between connections. Nevertheless I went to the wipy.io website in search of documentation, found http://micropython.org/resources/docs/e ... ckref.html and quickly learned that most of the examples simply don't work. Being annoyed by that, and by the fact that I have to switch between the wifi networks to do the simplest thing, instead of just simply connecting USB2TTL to the serial pins like with 99% of boards, I decided to try and make it connect to my home network. I did that reluctantly, because I wanted to take WiPy to the upcoming conference to show it off, and it wouldn't work there then, but I decided to leave the second WiPy for that.

So I tried the following command:
>>> wlan = network.WLAN()
Connection closed by foreign host.

That's all I ever saw from my WiPy. The "wipy-wlan-something" no longer appears in the wifi list, and I think my WiPy is effectively bricked.

Unless there is some way to get access to a proper console on some of the pins somehow?

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Bricked?

Post by danicampora » Wed Oct 14, 2015 8:30 am

Hi deshipu,

Sorry for the lack of documents, we are working on it. In other posts we have published how to enable REPL on the UART. Do you have expansion boards?

Code: Select all

from machine import UART
import os
uart = UART(0, baudrate=115200)
os.dupterm(uart)
When you enable WLAN like that, you are changing the mode to Station (default one), therefore your connection is lost. Did you put that in your 'boot.py'? If you didn't, just reset your WiPy using the switch, if you did, then you must rely on the safe boot modes which skip execution of boot.py and main.py. Check this: http://micropython.org/resources/docs/e ... boot-modes

In the meantime, the reference for the new API is here:

https://github.com/micropython/micropyt ... rdware-API

Cheers,
Daniel

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

[solved] Re: Bricked?

Post by deshipu » Wed Oct 14, 2015 8:45 am

No, I didn't buy the expansion boards, because I assumed that I would be able to use any USB2TTL, and the projects that I plan to use WiPy in don't really have room for an expansion board in them.

I did not save anything to boot.py or main.py, and I also assumed that just restarting the board would be sufficient, but it is not -- I tried on two different laptops, and none can see the ssid, so I assumed that it remembers the wifi settings like ESP8266 does. From what you say, that's not the case, and it should work.

I had an idea, and checked with WiFi Analyzer app on my tablet, and the network is there, smack in the middle, with a huge signal strength (larger than any other network in the vicinity). However, both laptops still can't see it. Now that I know the exact network name, I tried the "connect to a hidden network" option, and that worked. Maybe there is something wrong with how WiPy advertises its SSID?

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Bricked?

Post by deshipu » Wed Oct 14, 2015 8:54 am

By the way, is there any way I can help with the documentation? I'm still shocked that you don't update the docs in the same commit as the code change, it would literally only take a minute or two more, as opposed to wading through all the changes and trying to guess what's the correct answer now. I think a lot of people will be hitting this problem as they receive their WiPys, and this really doesn't make this project look very good.

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Bricked?

Post by danicampora » Wed Oct 14, 2015 9:09 am

Hi, your laptops might have issues with devices changing ssid and then showing the same mac address (bssid).

Well, updating the docs actually takes more than a minute or two. I did started updating the docs at the same time as the code, but as I was also writing the tests at some point I stopped updating docs and concentrated on the tests. I am now changing all references of pyb to machine, and updating other stuff. I hope to be able to push it today.

You can indeed use any USB to serial adapter, you just need to pass the proper pins to the UART constructor. If you use GP1 and GP2, then the code I pasted before will work as well.

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Bricked?

Post by danicampora » Wed Oct 14, 2015 9:10 am

as opposed to wading through all the changes and trying to guess what's the correct answer now
Well the correct answer can be found here in 99% of the cases: https://github.com/micropython/micropyt ... rdware-API

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Bricked?

Post by deshipu » Wed Oct 14, 2015 9:15 am

Thank you for your help, and for the work on the docs, hopefully the level of confusion will fall with time.
danicampora wrote:Hi, your laptops might have issues with devices changing ssid and then showing the same mac address (bssid).
That might sound plausible, if not for the fact that I didn't try to connect to WiPy from one of the laptops before (I only tried after I thought I have bricked it), and the fact that the ssid didn't change...

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Bricked?

Post by danicampora » Wed Oct 14, 2015 9:18 am

Well it is also weird that you had to wait about a minute for the wipy-wlan network to show up, that normally takes like 5-10 seconds. Could it be that the channel is a bit crowded?

User avatar
danicampora
Posts: 342
Joined: Tue Sep 30, 2014 7:20 am
Contact:

Re: Bricked?

Post by danicampora » Wed Oct 14, 2015 9:20 am

Maybe there is something wrong with how WiPy advertises its SSID?
Could be, I'll investigate.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Bricked?

Post by deshipu » Thu Oct 22, 2015 6:28 pm

danicampora wrote:
Maybe there is something wrong with how WiPy advertises its SSID?
Could be, I'll investigate.
After some tests I suspect that WiPy is completely fine, and the problem is in my system, which simply doesn't scan for WiFi networks anymore once you are connected to one. To make WiPy's SSID appear, I simply have to disconnect from the currently connected network. I'm sorry for the scare, and thanks again for making WiPy!

Post Reply