All Projects → dmazzella → Uble

dmazzella / Uble

Licence: mit
Lightweight Bluetooth Low Energy driver written in pure python for micropython

Programming Languages

python
139335 projects - #7 most used programming language
micropython
64 projects

Projects that are alternatives of or similar to Uble

Watchy
Watchy - An Open Source E-Ink Smartwatch
Stars: ✭ 469 (+632.81%)
Mutual labels:  bluetooth-low-energy
Signalus
❤️ React Native, Mobile arrhythmia monitoring App
Stars: ✭ 21 (-67.19%)
Mutual labels:  bluetooth-low-energy
Ble Ebook Project
The companion repository for the book: "Bluetooth 5 & Bluetooth Low Energy: A Developer's Guide"
Stars: ✭ 48 (-25%)
Mutual labels:  bluetooth-low-energy
Android Dfu Library
A library with DFU feature for Android 4.3+.
Stars: ✭ 532 (+731.25%)
Mutual labels:  bluetooth-low-energy
Esp32 ble wedo
A library to control LEGO wedo 2.0 with the ESP32 through Bluetooth low energy
Stars: ✭ 16 (-75%)
Mutual labels:  bluetooth-low-energy
Bluetoothserial
Cordova (PhoneGap) Plugin for Serial Communication over Bluetooth
Stars: ✭ 999 (+1460.94%)
Mutual labels:  bluetooth-low-energy
Gort
Command Line Interface (CLI) for RobotOps
Stars: ✭ 425 (+564.06%)
Mutual labels:  bluetooth-low-energy
Ble Starter Android
Companion project for the Punch Through blog post "The Ultimate Guide to Android Bluetooth Low Energy"
Stars: ✭ 56 (-12.5%)
Mutual labels:  bluetooth-low-energy
Pymb1a
Python class to communicate with Xiaomi Mi band 1A fitness tracker
Stars: ✭ 24 (-62.5%)
Mutual labels:  bluetooth-low-energy
Ancs4linux
iOS/iPadOS notification service client for Linux desktop (notifications on your desktop, over Bluetooth Low Energy)
Stars: ✭ 47 (-26.56%)
Mutual labels:  bluetooth-low-energy
Bluecap
iOS Bluetooth LE framework
Stars: ✭ 669 (+945.31%)
Mutual labels:  bluetooth-low-energy
Cordova Plugin Ble Central
Bluetooth Low Energy (BLE) Central plugin for Apache Cordova (aka PhoneGap)
Stars: ✭ 830 (+1196.88%)
Mutual labels:  bluetooth-low-energy
Flutter wechat ble
ble 4.0 with wechat style api for flutter. flutter版微信api风格的低功耗蓝牙
Stars: ✭ 41 (-35.94%)
Mutual labels:  bluetooth-low-energy
Bleu
BLE (Bluetooth LE) for U🎁 Bleu is the best in the Bluetooth library.
Stars: ✭ 481 (+651.56%)
Mutual labels:  bluetooth-low-energy
Gjlightbluetooth
自己封装的基于CoreBluetooth的蓝牙开发库,内附CoreBluetooth使用demo。数据传递基本上使用Block,还使用了Runtime等技术。
Stars: ✭ 50 (-21.87%)
Mutual labels:  bluetooth-low-energy
Android Scanner Compat Library
A compat library for Bluetooth Low Energy scanning on Android.
Stars: ✭ 462 (+621.88%)
Mutual labels:  bluetooth-low-energy
Uart Smartwatch
Android App, Firmware and Circuit for a DIY Smartwatch working with Bluetooth Low Energy
Stars: ✭ 30 (-53.12%)
Mutual labels:  bluetooth-low-energy
Qdomyos Zwift
Zwift bridge for smart treadmills and bike/cyclette
Stars: ✭ 63 (-1.56%)
Mutual labels:  bluetooth-low-energy
Luch
Small and easy to use Android library for BLE beacon monitoring
Stars: ✭ 55 (-14.06%)
Mutual labels:  bluetooth-low-energy
Nrf24 ble
Hacking nRF24L01+ as a low-cost BLE beacon
Stars: ✭ 43 (-32.81%)
Mutual labels:  bluetooth-low-energy

uble

Lightweight Bluetooth Low Energy driver written in pure python for micropython.

WARNING: this project is in beta stage and is subject to changes of the code-base, including project-wide name changes and API changes.

Features

  • Parsing and Building of HCI packets
  • Allows PyBoard to control BLE chips using HCI packets

Usage

  • Parsing of HCI packets:
        MicroPython v1.8.7-79-g221f88d-dirty on 2017-01-26; PYBv1.1 with STM32F405RG
        Type "help()" for more information.
        >>> from bluetooth_low_energy.protocols.hci import (cmd, uart)
        >>> buf = b'\x01\x03\x0c\x00'
        >>> hci_uart = uart.HCI_UART.from_buffer(buf)
        >>> print(hci_uart)
        <HCI_UART pkt_type=COMMAND(0x01) data=030c00>
        >>> hci_cmd = cmd.HCI_COMMAND.from_buffer(hci_uart.data)
        >>> print(hci_cmd)
        <HCI_COMMAND opcode=0x0c03 ogf=HOST_CTL(0x03) ocf=RESET(0x03) request_data= response_data=>
        >>> hci_cmd.to_buffer()
        b'\x03\x0c\x00'        
        >>>
  • Building of HCI Packets:
        MicroPython v1.8.7-79-g221f88d-dirty on 2017-01-26; PYBv1.1 with STM32F405RG
        Type "help()" for more information.
        >>> from bluetooth_low_energy.protocols.hci import cmd
        >>> hci_cmd = cmd.HCI_COMMAND(ogf=cmd.OGF_LE_CTL, ocf=cmd.OCF_LE_RAND)
        >>> print(hci_cmd)
        <HCI_COMMAND opcode=0x2018 ogf=LE_CTL(0x08) ocf=LE_RAND(0x18) request_data= response_data=>
        >>> hci_cmd.to_buffer()
        b'\x18 \x00'
        >>>
  • Control BLE chips examples

    With low level api:

    With high level api:

    • api_eddystone.py: implement an Eddystone Beacon device

    • api_sensor_demo.py: usable for test with 'BlueNRG' app

    • api_scan.py: implement a Scanner object used to scan for LE devices which are broadcasting advertising data

    • api_hid_over_gatt.py: implement a HID over GATT keyboard (tested with iOS and Windows 10)

    • api_repl.py: implement a Bluetooth LE REPL (need _thread enabled and external dependency collections.deque already available into folder 'micropython-lib' of this repository. If found ucollections.deque use it internally) Usable terminal available at Micropython WebBluetooth REPL

      MicroPython_WebBluetooth_REPL

Software

Currently implemented full HCI commands from STSW-BLUENRG-DK 2.0.2

User manual BlueNRG-MS Bluetooth® LE stack application command interface

Programming manual BlueNRG, BlueNRG-MS stacks programming guidelines

Hardware

Currently supported module STMicroelectronics SPBTLE-RF

From STMicroelectronics X-NUCLEO-IDB05A1:

X_Nucleo_IDB05A1_mbed_pinout_v1

PyBoard breakout board: MicroPython_SPBTLERF_Breakout_v03_mod_TOP_and_BOTTOM

Fritzing for breakout: MicroPython_SPBTLERF_Breakout_v03_mod.fzz

Gerber for breakout: MicroPython_SPBTLERF_Breakout_v03_mod.zip

If have interest into preassembled breakout board contact me at [email protected]

External dependencies

Only for examples: 'logging' already available into folder 'micropython-lib' of this repository

Install 'bluetooth_low_energy' into the pyboard

To enable the functionality you need to freeze the package 'bluetooth_low_energy', to do this, copy the package 'bluetooth_low_energy' into 'micropython-lib'.

Navigate to the folder containing the repository micropython:

        $ cd ports/stm32
        $ make FROZEN_MPY_DIR="~/uble/micropython-lib"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].