Coder Social home page Coder Social logo

ble_uart's Introduction

BLE UART Daemon

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.

Login example

Verified Platforms

  • Raspberry Pi Zero 1/2 W

Install Packages

./envsetup.sh

Running the Program

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.

Verified Apps on Android

  • Serial Bluetooth Terminal (recommended)
  • My-nRF52-toolbox
  • nRF Toolbox

Verified Apps on iOS

Under construction.

Verified Web Browsers

Click the following web_page link to connect the Raspberry Pi through the browser.

  • Chrome

For full list, check the browser implementation status.

How to run the HTML/javascript examples in local

Troubleshooting the BLE

# On Raspberry Pi board.

# stop the ble_uart.py

utils/restart_bluetooth.sh

# restart the ble_uart.py

ble_uart's People

Contributors

yjlou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.