Page 1 of 1

Using the WiFi shield

Posted: Wed Sep 14, 2016 4:40 pm
by deshipu
Hi,

I finally found some time to try the WiFi shield. I'm using the new IDE, and I upgraded the firmware with what shipped with it.
I have the shield connected, and I tried the "mjpeg_streamer" example, changing the SSID and KEY variables to match my local network.

The terminal displayed this:

Code: Select all

MicroPython v1.8-4343-g33f9bbe on 2016-08-31; OPENMV2 with STM32F427
Type "help()" for more information.
>>> Trying to connect... (may take a while)...
[-64, 2, 'swamp', 'f8:f0:05:f6:83:a5', '192.168.0.32']
Waiting for connections..
Connected to 144.49.0.16:0
The last line appeared when I entered "http://192.168.0.32:8080/" in the address bar of my chromium web browser, and hit enter. I got an error in the browser:

Code: Select all

This site can’t be reached

http://192.168.0.32:8080/ is unreachable.
ERR_ADDRESS_UNREACHABLE
Curiously, the IP address of my desktop is "192.168.0.12", and not "144.49.0.16".

Re: Using the WiFi shield

Posted: Wed Sep 14, 2016 4:42 pm
by deshipu
I just tried again, and it worked this time. I wonder what happened.

Re: Using the WiFi shield

Posted: Wed Sep 14, 2016 5:11 pm
by iabdalkader
deshipu wrote:I just tried again, and it worked this time. I wonder what happened.
I remember the default port in the example script was 8000, anyway, I made some major fixes to the WiFi driver and example script in v1.8 you should use that.. BTW it works great with MJpegViewer on Android, the url should look like this: http://ip:port

Re: Using the WiFi shield

Posted: Wed Sep 14, 2016 10:18 pm
by deshipu
I wonder how hard it would be to have a remote REPL, similar to telnet?

Re: Using the WiFi shield

Posted: Wed Sep 14, 2016 10:41 pm
by iabdalkader
deshipu wrote:I wonder how hard it would be to have a remote REPL, similar to telnet?
It's doable, but it will need some work, what you can do now easily is send scripts and execute them with exec.