Search found 22 matches

by spierepf
Fri Aug 26, 2022 3:14 am
Forum: Programs, Libraries and Tools
Topic: Anyone using python websockets to connect to WebREPL?
Replies: 6
Views: 28079

Re: Anyone using python websockets to connect to WebREPL?

This is the code I'm trying to use to connect: import pytest import websocket from .credentials import WEBREPL_CREDENTIALS @pytest.fixture def client(): ws = websocket.WebSocket() ws.connect(WEBREPL_CREDENTIALS["url"]) assert "Password: " == ws.recv() ws.send_binary((WEBREPL_CREDENTIALS["password"]+...
by spierepf
Thu Aug 25, 2022 3:22 am
Forum: Programs, Libraries and Tools
Topic: Anyone using python websockets to connect to WebREPL?
Replies: 6
Views: 28079

Re: Anyone using python websockets to connect to WebREPL?

Are you using the raw REPL protocol? And if so, can you post an example? For me, websocket_client just hangs in the same place that websockets throws that exception.
by spierepf
Thu Aug 25, 2022 2:27 am
Forum: Programs, Libraries and Tools
Topic: Anyone using python websockets to connect to WebREPL?
Replies: 6
Views: 28079

Anyone using python websockets to connect to WebREPL?

I'm trying to use the python websockets library (https://websockets.readthedocs.io/en/stable/) to connect to the WebREPL on my ESP32. However, I keep getting websockets.exceptions.ConnectionClosedError: sent 1011 (unexpected error) keepalive ping timeout; no close frame received exceptions when I tr...
by spierepf
Tue Aug 16, 2022 4:18 pm
Forum: Programs, Libraries and Tools
Topic: Are there tools like 'ampy' and 'there' that support websocket connections?
Replies: 15
Views: 11149

Re: Are there tools like 'ampy' and 'there' that support websocket connections?

What is the upydev global path? I cannot find it mentioned in the docs (https://upydev.readthedocs.io/en/latest/search.html?q=global+path&check_keywords=yes&area=default) Does the -g parameter accept a filename? $ upydev dsync -d -g ../upydev_.config The src folder doesn't have any files that I don'...
by spierepf
Tue Aug 16, 2022 12:10 am
Forum: Programs, Libraries and Tools
Topic: Are there tools like 'ampy' and 'there' that support websocket connections?
Replies: 15
Views: 11149

Re: Are there tools like 'ampy' and 'there' that support websocket connections?

Do you have any use case that is preferable to specify connections details on the command line over a config file? Are you trying to integrate upydev in your own automated workflow or something like that? upydev appears to require its config file to live in the current dir, but dsync also maps the ...
by spierepf
Mon Aug 15, 2022 7:36 pm
Forum: Programs, Libraries and Tools
Topic: How about a CPython library that interacts with REPL?
Replies: 3
Views: 4976

How about a CPython library that interacts with REPL?

I'm thinking something like:

Code: Select all

import repl_client

client = repl_client.serial("/dev/ttyUSB0", 115200)
assert 3 == client.eval("1 + 2")
or

Code: Select all

import repl_client

client = repl_client.websocket("ws://micropython.local:8266/", "secret")
assert 3 == client.eval("1 + 2")
by spierepf
Mon Aug 15, 2022 6:33 pm
Forum: Programs, Libraries and Tools
Topic: Are there tools like 'ampy' and 'there' that support websocket connections?
Replies: 15
Views: 11149

Re: Are there tools like 'ampy' and 'there' that support websocket connections?

Is it possible to just specify the device connection details on the command line instead of using a `upydev_.config` file?
by spierepf
Mon Aug 15, 2022 5:55 pm
Forum: Programs, Libraries and Tools
Topic: Are there tools like 'ampy' and 'there' that support websocket connections?
Replies: 15
Views: 11149

Re: Are there tools like 'ampy' and 'there' that support websocket connections?

And even if I copy `upydev_.config` into the `tmp` directory ``` $ upydev dsync -d dsync: path ./: dsync: dirs: none dsync: syncing new files (1): - ./lib/shasum.py [5.83 kB] dsync: syncing modified files (1): - ./boot.py [0.14 kB] upydevice:./boot.py -> ./boot.py ./boot.py [0.14 kB] get: Operation ...
by spierepf
Mon Aug 15, 2022 5:25 pm
Forum: Programs, Libraries and Tools
Topic: Are there tools like 'ampy' and 'there' that support websocket connections?
Replies: 15
Views: 11149

Re: Are there tools like 'ampy' and 'there' that support websocket connections?

I've uploaded `shasum.py` as you suggested

```
$ upydev update_upyutils shasum.py
```

but when I
```
$ cd tmp
$ upydev dsync -d
upydev: no device configured (upydev_.config file not found)
```

The issue is that `upydev_.config` is in the parent directory...
by spierepf
Mon Aug 15, 2022 2:44 am
Forum: Programs, Libraries and Tools
Topic: Are there tools like 'ampy' and 'there' that support websocket connections?
Replies: 15
Views: 11149

Re: Are there tools like 'ampy' and 'there' that support websocket connections?

Do you have experience with this tool? I cannot make it work. For example, I would like to copy the contents of the device into a directory called tmp: $ upydev dsync -d / tmp dsync: path .//, ./tmp: dsync: checking filesystem... dsync: dirs: none dsync: files: none $ ls tmp $ The device is freshly ...