A firmware update tool for Wanderer Astro devices, with manual device selection and firmware synchronization via GitHub.
- YAML Configuration : Centralized and flexible configuration
- Manual device selection : User interface to choose device type
- USB port detection : Automatic detection of available serial ports
- Automatic synchronization : GitHub Actions to sync firmwares
- GitHub Pages hosting : Firmwares hosted reliably
- Multi-device support : All Wanderer devices supported
- Clone the repository :
git clone https://github.com/your-username/wanderer-linux-updater.git
cd wanderer-linux-updater- Install avrdude (required for firmware updates) :
On Ubuntu/Debian :
sudo apt-get install avrdudeOn Arch Linux :
sudo pacman -S avrdude- Install dependencies using pipenv :
pipenv install# Launch the interactive update tool
pipenv run python updater.pyThe tool will guide you through the following steps :
- Device type selection : Choose from configured devices
- Serial port selection : Choose from available USB ports
- Connection test : Optional verification of device presence
- Firmware selection : Choose the firmware version to install
- Update : Execute the update
# Automatically detect connected devices and choose which one to update
pipenv run python updater.py -aThis mode will:
- Scan all USB ports for connected Wanderer devices
- Test each device using handshake commands and responses
- Display detected devices with their type and port
- Let you choose which device to update
- Continue with firmware selection and update process
This is especially useful when you have multiple devices connected or want to quickly identify what's connected.
# Use a custom configuration file
pipenv run python updater.py --config my-config.yml
# Automatic detection with custom config
pipenv run python updater.py -a --config my-config.yml
# Dry-run mode (shows the command without executing it)
pipenv run python updater.py --dry-run
# Debug mode
pipenv run python updater.py --debug# Display all configured devices with their parameters
pipenv run python list_devices.py# Test detection of available serial ports
pipenv run python test_ports.py# Test automatic device detection via handshake
pipenv run python test_detection.py
# Test the new automatic detection functionality
pipenv run python test_auto_detection.pyThe GitHub Actions workflow automatically synchronizes firmwares :
- Activation : The workflow runs every 6 hours
- Download : Retrieves firmware list from configured URL
- Hosting : Firmwares are hosted on GitHub Pages
- Index : A JSON index file is generated with metadata
- Go to Settings > Pages
- Source : "Deploy from a branch"
- Branch :
main(or your main branch) - Folder :
/ (root)
wanderer-linux-updater/
├── .github/workflows/sync-firmware.yml # GitHub Actions workflow
├── scripts/sync_firmware.py # Synchronization script
├── config.yml # Main configuration
├── config_manager.py # Configuration manager
├── device_detector.py # Device detection (for testing)
├── updater.py # Main interactive script
├── test_detection.py # Automatic detection test
├── test_auto_detection.py # New automatic detection test
├── test_ports.py # Port detection test
├── list_devices.py # Configured devices list
├── firmware/ # Firmwares (auto-generated)
├── firmware_index.json # Firmware index (auto-generated)
└── README.md
- WandererBoxPlusV3
- WandererBoxProV3 (Tested ✔️)
- WandererCoverV3
- WandererCover V4/V4Pro (Tested ✔️)
- WandererDewTerminator
- WandererEclipse
- WandererRotatorLiteV1/V2
- WandererRotatorMini (Tested ✔️)
- WandererRotatorProV1/V2
- WandererETA54
Add a new entry in the devices section of config.yml :
devices:
MyNewDevice:
avr_device: "m328p"
programmer: "arduino"
baud_rate: 115200
handshake_baud_rate: 19200
handshake_command: "MyCommand" # Optional: command to send
handshake_response: "MyResponse" # Required: expected responseEach device can have specific handshake behavior:
handshake_command: Optional command to send to the devicehandshake_response: Required expected response from the devicehandshake_baud_rate: Optional baud rate for handshake (defaults tobaud_rate)
device_detection:
handshake_timeout: 5 # Timeout for handshake operations (seconds)
port_detection_timeout: 3 # Timeout for port detection (seconds)- Verify that the device is connected via USB
- Test with
pipenv run python test_ports.py - Check permissions on
/dev/tty*(Linux) - Install appropriate USB drivers
# Validate configuration
pipenv run python -c "from config_manager import ConfigManager; ConfigManager().validate_config()"- Verify that the device is in bootloader mode
- Ensure
avrdudeis installed - Check serial port permissions
- Test with
--dry-runmode first
- Check internet connectivity
- Verify firmware URL in configuration
- Verify that GitHub repository is correctly configured
This project uses pipenv for dependency management. Here are the key commands:
# Install dependencies
pipenv install
# Run a script in the virtual environment
pipenv run python script.py
# Activate the virtual environment
pipenv shell
# Add a new dependency
pipenv install package_name
# Add a development dependency
pipenv install --dev package_name- Fork the repository
- Create a branch for your feature
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.