Comments (3)
It is not possible to read the current power; the API does not provide a method for doing this. It is only possible to set the power. However, the module never changes the power on its own, so it will always be whatever you set it to last (starting with the <txpower>
tag in hardware.xml).
from bglib.
Sorry, I meant how do I retrieve the txpower from the ble advertisements using the bled112_scanner.py from the help it seems i only can get the following:
't' (Unix time):\t1364699464.574, 1364699591.128, etc.
'r' (RSSI value):\t-57, -80, -92, etc.
'p' (Packet type):\t0 (advertisement), 4 (scan response)
's' (Sender MAC):\t000780535BB4, 000780814494, etc.
'a' (Address type):\t0 (public), 1 (random)
'b' (Bond status):\t255 (no bond), 0 to 15 if bonded
'd' (Data payload):\t02010603030918, etc.
from bglib.
If the power is present in advertisement data (which is not at all guaranteed), then it will be in a properly formed advertisement field contained in the data payload. The value 02010603030918
in your example contains two fields:
02 01 06
(2-byte field, type=1, value=06) - flags field03 03 0918
(3-byte field, type=3, value= 0918) - 16-bit service UUID list, containing 0x1809
There are no other fields to work with. This is the only way to get ad payload data; the Bluetooth LE specification contains more information about different advertisement field types and their formats/values.
from bglib.
Related Issues (20)
- Setup Instructions for Arduino BLE121LR HOT 1
- Controlling Transmission Power HOT 2
- BLE113 Breakout for disabled? HOT 1
- Add C# enum definitions (.cs included)
- Copy &Paste error in Parse
- Python3 bglib.py broken in Python 3.5.2
- Python 3.6 - xrange not defined
- interpreting Bluegiga.BLE.Events.Connection.DisconnectedEventArgs.reason HOT 2
- MVSHarp Version - how to get UUID of other instruments
- minimal example
- Indication not working HOT 5
- BLE response not working
- BLE response not working
- Only scanning appears to work can't connect or read / write
- Example to advertise the packets in c# HOT 1
- Blescanner.py cannot detect any BLE devices HOT 4
- BLED112 cannot advertise HOT 1
- NameError: name 'xrange' is not defined HOT 1
- TypeError: 'float' object cannot be interpreted as an integer
- C++ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bglib.