Search found 197 matches

by HermannSW
Mon Oct 15, 2018 11:10 pm
Forum: General Discussion and Questions
Topic: possible to send command directly to WebREPL
Replies: 15
Views: 19038

Re: possible to send command directly to WebREPL

Is there any trivial way to programmatically send a single command directly to WebREPL? For a simple, brute example, imagine that you need to reset the device. Your options are: 1) physically press reset button or 2) start a browser with the WebREPL client, press connect, login, and finally type:`m...
by HermannSW
Mon Oct 15, 2018 9:49 pm
Forum: General Discussion and Questions
Topic: Minimal MicroPython uwebsockets.client that works on esp8266
Replies: 5
Views: 11831

Minimal MicroPython uwebsockets.client that works on esp8266

I this posting I did show how based on danni's Micropython websockets (esp8266 implementation) one ESP-01s module remotely controled a second ESP-01s module via WebREPL. Today I wanted to minimize the sample and go against "ws://echo.websocket.org/" instead. After fixing two minor issues wrt missing...
by HermannSW
Sun Oct 14, 2018 10:20 pm
Forum: ESP32 boards
Topic: How to not run boot.py?
Replies: 8
Views: 5452

Re: How to not run boot.py?

I double-checked and yes indeed, I have the ultrasound sensor's echo pin as GPI0. I guess moving it to some other pin will help me with this. I had similar situation (servo signal line connected to GPIO0) and did a different solution. Instead of moving to a different pin I soldered a small button b...
by HermannSW
Thu Oct 11, 2018 1:29 pm
Forum: ESP8266 boards
Topic: Can't enter text after connecting WebRepl
Replies: 3
Views: 3575

Re: Can't enter text after connecting WebRepl

adxx wrote:
Thu Oct 11, 2018 11:49 am
Is there any code executed at that moment?
That is good question, try pressing CTRL-C and you will stop eg. endless while loops.
by HermannSW
Wed Oct 10, 2018 4:11 pm
Forum: ESP32 boards
Topic: Differences between Micropython ports for ESP32 and ESP8266
Replies: 35
Views: 164830

Re: Differences between Micropython ports for ESP32 and ESP8266

2) No, WebREPL does not use FTP for file transfers (it uses a simple, albeit proprietary transfer protocol). Here are the details: https://github.com/micropython/webrepl#webrepl-file-transfer I used loboris' MicroPython with ftp server before, but completely switched to using webrepl_cli.sh (like u...
by HermannSW
Tue Oct 09, 2018 7:23 am
Forum: General Discussion and Questions
Topic: Use micropython to do dead simple "over-the-air" code updates
Replies: 34
Views: 25546

Re: Use micropython to do dead simple "over-the-air" code updates

If you enable WebREPL on target nRF5x device running micropython with "import webrepl_setup", then WebREPL will run on that device listening on port 8266. Since you don't have ethernet support, you would not enable WebREPL on the ESP8266, and need a transparent proxy that would forward requests to 1...
by HermannSW
Mon Oct 08, 2018 3:18 pm
Forum: General Discussion and Questions
Topic: Use micropython to do dead simple "over-the-air" code updates
Replies: 34
Views: 25546

Re: Use micropython to do dead simple "over-the-air" code updates

@HermannSW Thanks for your post. What are your hardware assumptions? i.e. Will that work on even a plain vanilla BBC micro:bit? Or, does it assume Wi-Fi for creating the websockets, etc. ? I don't have BBC micro:bit, but since MicroPython runs on micro:bit it can work as long as you have any networ...
by HermannSW
Mon Oct 08, 2018 3:06 pm
Forum: General Discussion and Questions
Topic: Use micropython to do dead simple "over-the-air" code updates
Replies: 34
Views: 25546

Re: Use micropython to do dead simple "over-the-air" code updates

$ cat ../drop.py import uwebsockets.client import os import time websocket = uwebsockets.client.connect('ws://192.168.178.122:8266/') def wait_for_prompt(): resp = "" while not(">>> " in resp): resp = websocket.recv() print("< {}".format(resp)) def do(cmd): websocket.send(cmd+"\r\n") wait_for_promp...
by HermannSW
Mon Oct 08, 2018 6:39 am
Forum: General Discussion and Questions
Topic: Use micropython to do dead simple "over-the-air" code updates
Replies: 34
Views: 25546

Re: Use micropython to do dead simple "over-the-air" code updates

There is a standard method to do what you want on MicroPython: Enable WebREPL and you can do OTA updates. Basically WebREPL is the server side of what you look for. From laptop to MicroPython Using webrepl_cli.py With webrepl_cli.py https://github.com/micropython/webrepl you can copy files to and fr...