CLI utility for managing RNWF02 files over UART using AT+FS and AT+FSTSFR.
atfs.py: main command-line tool (recommended entry point)atfs_tsfr.py: low-level AT transport/helper layer used byatfs.pyrequirements.txt: Python dependency list (pyserial)
- Check module communication over serial
- List files in RNWF02 folders (
list) - Upload local files to device (
load) - Download files from device (
store) - Delete files on device (
delete) - Read filesystem info (
info)
- Python 3.8+
pyserial>=3.5
Install dependency:
pip install -r requirements.txtpython atfs.py -p <PORT> [options] <command> [command args]-p, --port(required): serial port, for exampleCOM6or/dev/ttyUSB0-b, --baudrate: serial baud rate (default:230400)-v, --verbose: print raw AT TX/RX trace
-
info- Show filesystem free space and free handle count
-
list <folder>- List files in a folder
-
load <folder> <path> [name]- Upload local file to device
- If
nameis omitted,fs.pyuses the local pathname stem
-
store <folder> <name> [path]- Download file from device
- If
pathis omitted, output filename defaults toname - If
pathis a directory, output filename defaults todirectory/name - Overwrite protection is enabled by default; use
--forceto replace an existing local file
-
delete <folder> <name>- Delete a device file
usercertkeydhcfg
Device filenames used by load, store, and delete must match this pattern:
- 1 to 32 characters
- Allowed: letters, digits,
_,- - Not allowed: dot (
.) and other special characters
Good examples:
file1testautoexec
Bad example:
file1.user
python atfs.py -p COM6 infopython atfs.py -p COM6 load user c:/certs/device.crt device_crtpython atfs.py -p COM6 load cfg c:/rnwf/autoexec.txtpython atfs.py -p COM6 -b 921600 -v load user c:/data/blob.bin blob_binpython atfs.py -p COM6 list certpython atfs.py -p COM6 -b 921600 delete cfg file1python atfs.py -p COM6 store cfg autoexec c:/out/autoexecpython atfs.py -p COM6 store cfg autoexec c:/out/python atfs.py -p COM6 store cfg autoexecpython atfs.py -p COM6 store cfg autoexec c:/folder/cfg/ --forcepython atfs.py -p /dev/ttyUSB0 info
python atfs.py -p /dev/ttyUSB0 load user ./certs/device.crt device_crt
python atfs.py -p /dev/ttyUSB0 load cfg ./rnwf/autoexec.txt
python atfs.py -p /dev/ttyUSB0 -b 921600 -v load user ./data/blob.bin blob_bin
python atfs.py -p /dev/ttyUSB0 list cert
python atfs.py -p /dev/ttyUSB0 -b 921600 delete cfg file1
python atfs.py -p /dev/ttyUSB0 store cfg autoexec ./out/autoexec
python atfs.py -p /dev/ttyUSB0 store cfg autoexec ./out/
python atfs.py -p /dev/ttyUSB0 store cfg autoexec
python atfs.py -p /dev/ttyUSB0 store cfg autoexec ./folder/cfg/ --forceatfs.pystarts by checking communication withATbefore file commands.atfs_tsfr.pyhandles FS-TSFR protocol framing and payload encoding/decoding.
-
No response or timeout:
- Verify port and baud rate
- Confirm no other terminal/application has the COM port open
- Try
-vto inspect raw AT traffic
-
Parse/response errors:
- Check folder and filename values
- Ensure device filename follows the allowed character rule
-
Linux serial permission issues:
- Add user to serial group (often
dialout) and re-login
- Add user to serial group (often