Allow choosing between the three security modes exposed by the
micropython cyw43 wifi driver. Also allow setting up security in AP
mode.
Improve the WiFi section of the configuration UI.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
When the device is in 'tagstartstop' tag mode, and the user presents a
new tag to get the serial number and create a playlist using the web UI,
the playerapp still remembered the tag as the currently playing tag even
though no playlist was found and no playback is running. After the user
saves the playlist in the UI and puts the tag on the device again, they
expect the playback to start with the new playlist. Instead, nothing
happens, because this is counted as the 'stop' event of the tagstartstop
mode. The user would have to remove the tag and present it again (after
waiting for the tagtimeout) to play the new playlist.
Fix this unexpected behaviour by not storing the current tag into the
playing_tag field if no playlist existed for the tag.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
- Make sure the upload progess bar and file choser are reset when
loading the file browser screen.
- Don't expand the directories in the tree view by default.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
Previously, if no tonberry.db existed on the SD card, the database was
initialized with a playlist for each directory containing mp3 files,
with the tag serial number matching the directory name. This was used
during development before the web UI to edit the playlist db existed.
It is no longer necessary, and confusing to the user when unusable
playlists are created when albums are preloaded onto the SD card before
putting it in the tonberry device.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
- Fix upload of files <= Request.max_body_length
File uploads smaller than the limit were not given to the handler as a
stream by microdot, instead the content is directly stored in the
request.body.
- Refactor stream to file copy into a helper method
- Increase the copy buffer size to 16k
- Call app.reset_idle_timeout() periodically during file uploads to
avoid the device turning off when uploading large files while on
battery.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
Having to press the power button again to wake up the device is less
annoying to the user than not being able to apply settings when the
device is on battery.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
Set the LEDs to a fixed color during bootup to show the different modes:
- Orange when the device is booting
- Red when button 0 is held and the device goes to a shell
- Blue when button 1 is held and the device goes to AP mode instead of
joining the configured WiFi network
- Red blinking when the run() method throws an exception for any reason
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
Add ssid and passphrase to config to configure the network to join. If
empty SSID is configured, it will create the "TonberryPicoAP..." network
in AP mode as before.
Holding the button 1 during startup will revert to AP mode regardless of
the current configuration.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
The important fix is an urldecode bug causing umlauts to be decoded
incorrectly from url arguments. This was fixed in v2.2.0, but let's just
update to the latest version.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>