4
4
5
5
Bloop box client written in Rust with Tokio.
6
6
7
- ## NFC Tag Support
7
+ ## Table of Contents
8
+
9
+ 1 . [ NFC tag support] ( #nfc-tag-support )
10
+ 2 . [ Run-time configuration] ( #run-time-configuration )
11
+ 3 . [ LED status codes] ( #led-status-codes )
12
+ 4 . [ Pre-requisites] ( #pre-requisites )
13
+ 5 . [ Shared data] ( #shared-data )
14
+ 6 . [ Deployment] ( #deployment )
15
+ 1 . [ Automatic] ( #automatic )
16
+ 2 . [ Manual] ( #manual )
17
+ 7 . [ System Setup] ( #system-setup )
18
+
19
+ ## NFC tag support
8
20
9
21
While for reading UIDs any NFC tag supporting Iso14443a with a baud rate of 106 is supported, it is recommended to use
10
22
tags with a 7-byte UID. Tags with shorter UIDs will be padded with zeroes, while tags with longer UIDs will be
@@ -13,7 +25,25 @@ truncated.
13
25
When it comes to config tags though you have to use either NTAG 213, 215 or 216. Other NTAG formats may work but are
14
26
not tested.
15
27
16
- ## LED Status Codes
28
+ ## Run-time configuration
29
+
30
+ You can change all configuration at run-time via text records on an NTAG tag. A helpful utility to automatically
31
+ generate the text records [ is available here] ( https://github.com/bloop-box/bloop-box-config ) . If you prefer to generate
32
+ the config tags in another way, following is the format for the text record:
33
+
34
+ Each record begins with a single letter denoting the command. It is followed by a JSON array with zero or more
35
+ arguments.
36
+
37
+ | Command | Description | Arguments |
38
+ | ---------| -----------------------------------| -------------------------------|
39
+ | w | Set WiFi Credentials | SSID, Password |
40
+ | c | Set Connection Details | Host, Port, Client ID, Secret |
41
+ | v | Set Max Volume | Volume (0.0 - 0.1) |
42
+ | u | Add additional config tag | |
43
+ | r | Remove all but current config tag | |
44
+ | s | Shut down system | |
45
+
46
+ ## LED status codes
17
47
18
48
The status RGB LED will display the current status of the Bloop Box. If no user interaction is required, you'll get a
19
49
static light, otherwise a blinking one.
@@ -80,6 +110,12 @@ chown bloop-box:nogroup /var/lib/bloop-box
80
110
81
111
On a development system, you might want to give the bloop-box user a login shell and a home directory.
82
112
113
+ #### Allow bloop-box user to shut down system
114
+
115
+ The bloop box client has the capability to shut down the system when it receives the right config command. In order to
116
+ do so it needs sudo privilege to call the ` shutdown ` binary. You can accomplish this by copying the
117
+ ` 011_bloop-box-shutdown ` file from the ` etc ` directory to ` /etc/sudoers.d ` and change its permissions ot ` 440 ` .
118
+
83
119
#### Hardware config
84
120
85
121
In order to configure the Bloop Box for your specific hardware, you need to copy the ` etc/bloop-box.conf ` file to via
0 commit comments