dmazzella / uble Goto Github PK
View Code? Open in Web Editor NEWLightweight Bluetooth Low Energy driver written in pure python for micropython
License: MIT License
Lightweight Bluetooth Low Energy driver written in pure python for micropython
License: MIT License
There're similar cases below that line too. Are these structure definitions actually used/tested?
Hi again,
I want to tried the ST example.
So I copy paste your file.py like bluestprotocol.py in the PYBFLASH.
to the same thing as you :
MicroPython v1.8.7 on 2017-03-10; PYBv1.1 with STM32F405RG
Type "help()" for more information.
from bluest_protocol import BlueSTProtocol
Traceback (most recent call last):
File "", line 1, in
File "bluest_protocol.py", line 82
SyntaxError: invalid syntax
and I also tried with the sensor demo I got this :
from sensor_demo import SensorDemo
ble = SensorDemo()
ble.run()
Traceback (most recent call last):
File "", line 1, in
File "sensor_demo.py", line 117, in run
File "bluetooth_low_energy/modules/base_hci.py", line 100, in run
File "bluetooth_low_energy/modules/base_hci.py", line 98, in run
File "bluetooth_low_energy/modules/base_hci.py", line 93, in run
File "sensor_demo.py", line 126, in start
AttributeError: 'NoneType' object has no attribute 'struct'
thank you in advance
Hey, I tried to flash my pyboard but my computer can't see the pyboard. Maybe I did something wrong when I compile the new firmware.
1- I download your project and copy the folder Bluetooth_low_energy into micropython-lib. (Still in your project)
2- then I copy micropython-lib into the project micropython. The path is micropython_master/stmhal/ uble/micropython-lib
3- I did a make "make FROZEN_MPY_DIR="~/uble/micropython-lib"
4- and finally I did a dfu.
Can you tell me if I did something wrong ???
Thank you in advance
Apologies, this is not an issue with your library
I am writing an application the STM32 B-L475E-IOT01A discovery board that uses the SPBTLE-RF BlueNRG chip as well.
I have been dealing with the following issue for a few days now. If you ever encountered a similar issue, I am wondering what you did to fix it.
The Issue:
I am having trouble interfacing with the B-L475E-IOT01A's on-board SPBTLE-RF bluetooth chip.
I am able to send header packets inquiring about the the bluetooth chip's write and read buffers. I have confirmed that I am doing this correctly, because I get responses in the correct format: 0x02 0x?? 0x00 0x?? 0x00. The ?? bytes always give me the correct number of available writable bytes and bytes to be read, respectively.
I am also able to read messages from the bluetooth chip, as I always receive the expected packet when I perform a chip reset: 0x04 0xff 0x03 0x01 0x00 0x01, and after sending an HCI command packet I am able to poll for and read the responses described below.
The issue that I am having is that, whenever I check that the write buffer is available and attempt to send a full write message such as ...
header = 0x0A 0x00 0x00 0x00 0x00 (check write buffer... only sends rest of message if write buffer > 0)
HCI command packet = 0x1003 (example: Read_Local_Supported_Features)
param total length = 0x00 (i have also tried not including this byte at all and raising the chip select one byte sooner instead)
params: none
... I always receive the same HCI event packet in response, no matter the contents of my HCI command packet's body:
response: 0x04 0x10 0x01 0x00
This implies that I am having a hardware framing error with my SPI, and I have no idea what may be causing that. As I just described, the rest of the processes work fine, so the SPI bus seems to be functional in most cases.
Note: My send an receive methods are almost identical in structure to yours
If you can offer me any advice, I would appreciate it immensely. Otherwise, thank you for the awesome library!
firstly, I wanna tell you that this is an awesome library. But this library can support another Micropython board, for example, Nucleo L476rg? or support Stm32F405 only?
Cute project! I worked on a similar project (for big Python) for 2 weeks in December 2013 - straight before Damien released source for MicroPython, when my project went into indefinite backlog... Would be interesting to see if I could use your code or not...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.