floe / btle Goto Github PK
View Code? Open in Web Editor NEWArduino library for basic Bluetooth Low Energy with the nRF24L01+
License: GNU General Public License v3.0
Arduino library for basic Bluetooth Low Energy with the nRF24L01+
License: GNU General Public License v3.0
I'm developing an android app which can receive long strings or entire CSV file sent from nrf24L01 used as BLE. How can I do that ?
Hi,
I would like to parse the temperature received for GATT service 0x1809 as used by to_nRF_Float.
Is it possible to add a function that reverses to_nRF_Float, for example nRF_int32_to_Float or something.
I have a working snippet in javascript if it could help.
function getTemp(data) {
var unsigned = unsignedToSigned(parseInt(data[0]) + (parseInt(data[1]) << 8) + (parseInt(data[2]) << 16), 24);
var tmp = unsigned.toString(16);
var sign = data[3] & 0b10000000; //Blir antingen 0 eller 128
exp = -sign + (data[3] & 0b01111111);
let temp = unsigned * Math.pow(10, exp);
// console.log(temp);
return temp;
};
function unsignedToSigned(unsigned, size) {
if ((unsigned & (1 << size - 1)) != 0) {
unsigned = -1 * ((1 << size - 1) - (unsigned & ((1 << size - 1) - 1)));
}
return unsigned;
}
As in topic. I would like to send data from my smartphone to nrf24l01, but when I program the device with rec example it is inivisible for my phone, with other examples it works. Is there any "big" documentation for it?
The code sets PDU type to 0x42 == 0b01000010
buffer.pdu_type = 0x42;
The Bluetooth Specification Version 4.0, Volume 6, Part B, Section 2.3 Advertising Channel PDU defines ADV_NONCONN_IND as 0010 and tx addr random as the 7th (counting from 1) bit.
https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=229737
This means the bits on the air (with first bit transmitted on the left) should be:
00100010
Which is 0x22, or 0x44 bit-reversed.
I ported your library on a PIC micro. And I am testing it on iPad using nRF MCP and nRF Temp. I can see my sensor pushing data to BLE in Master control panel. MCP showing sensordata as <0x1809>: But Service UUID is shown as N/A. nRF temp is not able to detect my sensor altogether. Is it something wrong with the iPad application for not recognizing 0x1809 as a valid UUID for temperature?
Hello Florian! Awesome stuff!
I have implemented this with no issues using an arduino uno and the nrf24l01. I am hoping to use this to catch ble tags. The only info I need from the tag is major and minor. Are those contained within the packets of hex I am receiving from my ble tags? Or what does that payload contain?
I thank you in advance for your time.
Thank you!
Harvey
Hi there , I'm working with stm32 and nrf24l01+.
I transmit some data for example adc values to phone.
But , Now I want to Receive some advertisement data for example 1 from phone and nrf module transmit the adc value to Bluetooth.
Now I'm ok with transmitting data to Bluetooth , But I have some problem for receiving data from phone for choosing something.
Can you give me some suggestions for solving this?
Hey there. I downloaded your library (and the RF24 library). So now I'm trying a simple send/receive example. I can send packets from the nRF and pick them up on my phone, but I can't get the reverse. I don't want to complicate things but here's a snippet:
Serial.print(btle.listen());
Serial.println(btle.buffer.pl_size);
for (int i = 0; i < btle.buffer.pl_size; i++) {
Serial.print(btle.buffer.payload[i], HEX);
Serial.print(" ");
}
I first tested this without advertising anything from my phone. When I don't call btle.listen() and just print out the buffer anyway, I get 0 for size and nothing for payload (as expected). So then I re-ran, calling listen() first, and I get 3 different payloads, repeated indefinitely... but nothing is advertising. Then I tried btle.buffer.payload[i] = 0 in my loop, to "reset it". It did not like that... but this time I only got 1 payload over and over again.
What am I doing wrong? I know it's happening within listen() because I correctly get all 0's when I do not call listen. I think it has something to do with the communication between this library and the nRF, or maybe the buffer is at the wrong address. Here is a line of output from the for loop:
75 31 11 48 96 77 F8 E3 46 E9 AB D0 9E 53 33 D8 BA 98 8 24 CB 3B FC 71 4B 1 0 F 1 9 A 0 0 0 20�(�ª�adv recv
That "adv recv" is coming from the "BTLE adv recv" output in the setup()...
I am not being able to detect estimote beacons. From where I am, it is detecting some random MAC adresses, but the beacon I am trying to detect is not showing up on the receiver example.
This is the type of beacon http://estimote.com/
First off please excuse my ignorance when it comes to Bluetooth, but would there be any practicality in supporting NRF52x devices?
I know they natively support Bluetooth, but when using the https://github.com/TMRh20/nrf_to_nrf driver, which uses the RF24 API and the ESB protocol, it would require minor changes and this might allow users to switch easily between using Bluetooth and ESB. Just wondering about this and if there might be any interest since the NRF52x actually supports Bluetooth and large packet sizes. Or is this a dumb idea since we can use BLE directly?
Currently, the mac address is not constant and keeps on changing, how do I set my own mac address for nrf24l01?
hi, guys
I install BTLE ver 1.0.0 (and RF24 already used) , but when compling exanple 'send' from BTLE, i got error:
Multiple libraries were found for "RF24.h", and
Multiple libraries were found for "BTLE.h"
any idea about that error?
I am using a nRF24L01+ with a Nano and the send.ino example. It doesn't show up on a iPhone 6. Am I doing something wrong?
I'm testing eddystone_url.ino and beacon(nrF24L01) does not see the program Physical WEB and Nearby. The Program nrfConnect sees beacon as Physical Web Beacon What can be wrong?
Hi,
and first thank you for this beautiful library!
Is it possible so get it working as an door / window sensor?
After playing with your library it seems that is not broadcasting properly. It will only appear sometimes and it will disappear after 1 or 2 seconds. It will appear as a different UUID everytime. If you add a delay of 8 ms it will help but it is not stable.
In member function 'void BTLE::begin(const char*)': 'class RF24' has no member named 'setAddressWidth' radio->setAddressWidth(4);
During compilation example/multichunk.ino I have error:
btle.preparePacket();
'class BTLE' has no member named 'preparePacket'
Arduinio IDE version 1.8.10
Please tell me how to use this library to transmit humidity data?
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.