Skip to content

Commit

Permalink
Merge Carglglz/develop for upydev 0.3.8 release
Browse files Browse the repository at this point in the history
Merge develop branch for upydev 0.3.8 release
  • Loading branch information
Carglglz authored Mar 4, 2022
2 parents a5b228d + bf1ea11 commit 9cf6c74
Show file tree
Hide file tree
Showing 178 changed files with 21,234 additions and 7,869 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
.DS_Store

SSL_CUSTOM_AUTH.py
cryp_web_repl_dir/*
dbg_wrepl_cmd_dir/*
_DOCS/*
__pycache__/*

TODO.*
.nosync
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ include upydev/upyutils_dir/sync_tool.py
include upydev/upyutils_dir/upylog.py
include upydev/upyutils_dir/upynotify.py
include upydev/upyutils_dir/upysecrets.py
include upydev/upyutils_dir/ssl_repl.py
include upydev/upyutils_dir/upysh.py
include upydev/upyutils_dir/nanoglob.py
include upydev/upyutils_dir/shasum.py
include upydev/upyutils_dir/upysh2.py
include upydev/upyutils_dir/uping.py
include upydev/upyutils_dir/time_it.py
Expand Down
44 changes: 37 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@

[![PyPI version](https://badge.fury.io/py/upydev.svg)](https://badge.fury.io/py/upydev)[![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/)

### Command line tool for wireless MicroPython devices
### Command line tool for MicroPython devices

**uPydev** is an acronym of '**MicroPy**thon **dev**ice', and it is intended to be a command line tool to make easier the development, prototyping and testing process of devices based on boards running MicroPython. It is intended to be cross-platform and
connection agnostic (Serial, WiFi and Bluetooth Low Energy).

⚠️ ***Keep in mind that this project is in ALPHA state, sometimes, some commands may not work/return anything*** ⚠️

### Features:

* Tools to allow configuration, management, communication and control of MicroPython devices.
* Command line Autocompletion
* File IO operations (upload, download one or multiple files, recursively sync directories...)
* SHELL-REPL modes: Serial, WiFi (SSL/WebREPL), BLE
* OTA\* Firmware updates WiFi (TCP/SSL), BLE (\* esp32 only)
* Custom commands for debugging, testing and prototyping.
* Group mode to operate with multiple devices
------
Expand Down Expand Up @@ -67,18 +66,18 @@ upydev will use local working directory configuration unless it does not find an
```


To check configuration
To check configuration ``upydev`` or ``upydev check``

```bash
$ upydev check
$ upydev
Device: mycustomdevice
Address: 192.168.1.40, Device Type: WebSocketDevice
```

Or to get more information if the device is online

```bash
$ upydev check -i
$ upydev -i
Device: mycustomdevice
WebSocketDevice @ ws://192.168.1.40:8266, Type: esp32, Class: WebSocketDevice
Firmware: MicroPython v1.13-221-gc8b055717 on 2020-12-05; ESP32 module with ESP32
Expand All @@ -101,6 +100,37 @@ $ upydev config -t 192.168.1.40 -p mypass -g
$ upydev config -t 192.168.1.40 -p mypass -gg -@ mydevice
```

- [Optional]
Finally use `register` command to
define a function in ``~/.bashrc`` or ``~/.profile``

```bash
$ upydev register -@ mydevice
````
```bash
function mydevice() { upydev "$@" -@ mydevice; }
function _argcomp_upydev() { _python_argcomplete upydev; }
complete -o bashdefault -o default -o nospace -F _argcomp_upydev mydevice
```
Now ``mydevice`` will accept any args and pass them to upydev, as well as
autocompletion of args, e.g.
```bash
$ mydevice
Device: mydevice
Address: 192.168.1.40, Device Type: WebSocketDevice
```
Or if the device is connected.
```bash
$ mydevice -i
Device: mydevice
WebSocketDevice @ ws://192.168.1.40:8266, Type: esp32, Class: WebSocketDevice
Firmware: MicroPython v1.17-290-g802ef271b-dirty on 2022-01-04; ESP32 module with ESP32
(MAC: 80:7d:3a:80:9b:30, RSSI: -48 dBm)
```
Once the device is configured see next section or read [Usage documentation](https://upydev.readthedocs.io/en/latest/usage.html) to check which modes and tools are available.
Expand Down Expand Up @@ -138,4 +168,4 @@ Example: Raw commands
`$ upydev "import my_lib;foo();my_var=2*3"`
Too see documentation check [Upydev readthedocs](https://upydev.readthedocs.io/en/latest/)
To see documentation check [Upydev readthedocs](https://upydev.readthedocs.io/en/latest/)
File renamed without changes.
File renamed without changes
2 changes: 1 addition & 1 deletion _DOCS/Documentation.md → _legacy/_DOCS/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2269,7 +2269,7 @@ SAMPLES PER PACKET : 1
VARIABLES PER SAMPLE : 3; ['X', 'Y', 'Z']
SIZE OF PACKETS: 12 bytes
Period: 2 ms ; Fs:440.0 Hz, Data send rate: 437 packets/s of 1 samples
DATA TRANSFER RATE: 5.12109375 KB/s
DATA TRANSFER RATE: 5.12109375 kB/s
```
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Flash 2.0 MB 512.0 KB 1.5 MB 25.3 % /
esp32@esp_room1:~ $ ls
lib boot.py main.py
wifi_.config ap_.config webrepl_cfg.py
upy_pub_rsa30aea4233564.key test_sync_dir
upy_pv_rsa30aea4233564.key test_sync_dir
esp32@esp_room1:~ $ meminfo
Memory Size Used Avail Use%
RAM 116.188 KB 36.531 KB 79.656 KB 31.4 %
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 9cf6c74

Please sign in to comment.