This program runs on the Raspberry Pi and creates a BLE Nordic UART Service (NUS) for phone or HTML5 webpage to connect.
This is useful for Raspberry Pi developer/user to connect the board without an IP network. Just download an off-the-shelf BLE UART app (listed below). Then you are ready to connect.
- Raspberry Pi Zero 1/2 W
./envsetup.sh
This program supports the following modes:
# By default, use STDIN/STDOUT as the input/output.
./ble_uart.py --name MyBleUart
# Start as an echo server. Whatever sent from the App will return to the App.
./ble_uart.py -e
# Provide a login shell.
./ble_uart.py -l
# Launch a command after BLE connection is established.
./ble_uart.py -c "netcat google.com 80"
# Run as a JSON RPC server
examples/json_rpc/json_rpc.py
# Check the message to get the URL for the RPC client.
Once the program is launched, it will advertise a BLE UART service. Use the following BLE apps or browsers to search a device named 'BLE_UART' and then connect it to use.
- Serial Bluetooth Terminal (recommended)
- My-nRF52-toolbox
- nRF Toolbox
Under construction.
Click the following web_page link to connect the Raspberry Pi through the browser.
- Chrome
For full list, check the browser implementation status.
# On Raspberry Pi board.
# stop the ble_uart.py
utils/restart_bluetooth.sh
# restart the ble_uart.py