mirror of
https://github.com/PiSugar/PiSugar.git
synced 2026-11-25 01:16:24 -05:00
Created PiSugar WiFi config (markdown)
parent
3a1bc1bf76
commit
681e57c4d5
1 changed files with 55 additions and 0 deletions
55
PiSugar-WiFi-config.md
Normal file
55
PiSugar-WiFi-config.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# pisugar-wifi-config
|
||||
|
||||

|
||||
|
||||
PiSugar BLE wifi config tool. This is a BLE GATT server to config raspberry pi wifi.
|
||||
|
||||
Wifi configuration is not an easy job with raspberry pi. When you bring pi to an unfamiliar place,
|
||||
having no keyboard, no display, it is not possible to reconfigure the rpi's wifi.
|
||||
|
||||
`pisugar-wifi-config` makes it easy to talk to rpi via BLE and setup the wifi configuration. Your rpi
|
||||
could be discovered by BLE advertisement, then configurated by pushing a simple SSID/password message.
|
||||
|
||||
NOTE 1: Users need to launch `PiSugar` wechat mini program to communicate with `pisugar-wifi-config`.
|
||||
NOTE 2: Only WPA-PSK is supported.
|
||||
|
||||
## Build
|
||||
Build and package
|
||||
|
||||
sudo bash build.sh
|
||||
|
||||
## Installation
|
||||
Install bluez
|
||||
|
||||
sudo apt install bluez
|
||||
|
||||
Old bluez in the raspberry repository need to enable experimental features to support GATT.
|
||||
If you don't want to enable experimental features, compile and install a newer version of
|
||||
bluez from source.
|
||||
|
||||
sudo sed -e 's|ExecStart=.*|ExecStart=/usr/lib/bluetooth/bluetoothd --experimental|g'
|
||||
-i /lib/systemd/system/bluetooth.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart bluetooth
|
||||
|
||||
Download `pisugar-wifi-config_<version>.deb` from https://github.com/PiSugar/pisugar-wifi-config/releases , and install
|
||||
|
||||
sudo dpkg -i pisugar-wifi-config_<version>.deb
|
||||
|
||||
## Security consideration
|
||||
GATT server stops advertising after 5 miniutes since lunached. To adjust the advertising duration,
|
||||
edit `/lib/systemd/system/pisugar-wifi-config.server`, add `-t <seconds>`, e.g.
|
||||
|
||||
# 600 seconds
|
||||
sudo sed -e 's|ExecStart=.*|ExecStart=/usr/bin/pisugar-wifi-config -t 600|g' \
|
||||
-i /lib/systemd/system/pisugar-wifi-config.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart pisugar-wifi-config
|
||||
|
||||
If advertising duration less or equal than 0, GATT server would never stop advertising.
|
||||
|
||||
## Bug report
|
||||
Report bugs here: https://github.com/PiSugar/pisugar-wifi-config/issues
|
||||
|
||||
## License
|
||||
GPLv3
|
||||
Loading…
Add table
Add a link
Reference in a new issue