This could be a wrong question but just need to know whether this is feasible
For one of our ble devices the manufcaturer data comes as when scanned using the noble package using the [peripheral.advertisement.manufacturerData]
manufacturerData: <Buffer 59 00 08 8a 00 00 50 f8 c8 f0 6e b9 cd> }.This data mainly has some data related to the device like the battery level and hardware versions.
Can this device work as a beacon as well as a ble device if we change the advertising package ?
Yes, any BLE device can act as a beacon as long as you can control the advertisement payload. Beacons are a subset of BLE devices. By definition, beacons are BLE devices that are constantly/continuously advertising data that are relevant to other remote devices, usually containing information about its location/proximity.
So to answer your question, as Mike Petrichenko suggested, all you need to do is alter your advertisement data to something that is relevant to remote devices. If you still need to send your current adverts, then you'll need to alternate between sending the current advert data and the relevant beacon data. You can control the frequency at which each data is sent depending on your application (e.g. For every 10 adverts of your current payload you can send the beacon advert if it's less frequently needed).
Some references:-
What Are Beacons and How Beacons Technology Works
5 Things You Need to Know about Beacon Technology
What Are Beacons, and How Are They Used in IoT Applications
I hope this helps.
Related
How is data length extension enabled? I have BlueZ on a Raspberry Pi 4B (the peripheral).
I want to maximise my L2CAP channel throughput and hence want to move from a data channel payload of 27 bytes to 251.
Is there a way to do this similar to how one changes the connection interval by editing
/sys/kernel/debug/bluetooth/hci0/conn_min_interval?
There are many articles explaining the concept but not how to actually enable it.
I want to send some sensor data over BLE to multiple nodes.
I thought of changing advertising data at 4Hz. Can it be done?
Yes! It is a common approach to use a BLE beacon packet to advertise sensor data. A few points:
Embedded BLE platforms typically allow advertising at a minimum of 10Hz, and let you change the advertisement between transmissions. I have done this on the Nordic 52x chips, but hopefully STM32 supports it as well.
BLE 4.0 advertising packets are limited to 23 usable data bytes, but you typically need to reserve a few to indicate it is "your" transmission. There are significant further restrictions if you intend to use iOS devices to scan the transmissions. If using Android, Linux, or other embedded system scanners you can use nearly the full 23 bytes.
Keep in mind that anybody in radio range can scan for these advertisements and read the data. Make sure the sensor data are not sensitive enough to warrant a security layer.
I am usign one of Dorji's pruduct. The products name is DRF1276DM. The image of the product can seen in following images
In the application note the producers state that the module can communicate over serial port with TTL level UART. In their application note which can be found at http://www.dorji.com/docs/data/DRF1278DM.pdf. They state that if we send a command like AF AF 00 00 AF 80 03 02 00 00 92 0D 0A the device will response as AF AF 00 00 AF 00 03 02 00 00 12 0D 0A I try to check this command in order to test the device but I receive same command in my all trial. The device send me that 2400 O 8 1 DRF128X V2.7. In the application note they state that the device will send only one time this command when power is one but In my case the response is always same regardless to command code.
For checking the condition I try to use every command on http://www.dorji.com/docs/data/DRF1278DM.pdf but I recieved same respond. My first question is this. Are there any one who deal with same problem with me or could you give me any solution for this case. I am suspicious that the device get reset in every time when I try to send command over serial port. Is there any way to reset the device to default either using software or hardware.
In the application note they state that the first respond which I quoted above, will give the information for communcating device In our case I expected to communicate with device on odd parity 8 bit data size 2400 baud rate but the device only gives irrelevant or nonlogical bytes in 2400 baud rate. Only logical answer I received from device is on the 9600 baud rate. My second question is this. Is there a bug on this device setting or did I miss someting because as far as I know we cannot communicate with devices over multiple baud rate option.
PS:
I try to use their configuration tool which can be found in http://www.dorji.com/products-detail.php?ProId=61, but I got same "time out"
Error from device, I used 2400 boud rate and even parity but the result cannot changed.
Pin EN must be connected to logical 0
Firstly, the Error Time Out error appears because of a damaged UART-to-USB converter or this happens when you are using multiple jumper wires for a single pin of the module. Try using the a single female-to-female jumper wire to connect every pin of your module with the corresponding pin of the UART-to-USB converter.
Your UART is probably working fine, i have the same issues.
My DRF1278/76 modules dont seem to respon to me changing the baudrate in configuration parameters, it looks like its fixed to 9600 bauds, wich is a boomer
I had this problem too, my issue was the EN pin needs to be pulled low. Even with the USB to UART adapter I bought with the modules, that line is allowed to site high by default. Use a jumper to pull it to ground.
I know that the definition of an iBeacon is a fixed specification of the advertising packet that it is transmitting:
9 bytes iBeacon prefix
16 byte UUID
2 bytes Major
2 bytes Minor
1 byte TX power
That being said, is there anything that would prevent a beacon from both sending out advertising iBeacon packets to wake up a phone's app and also transmit actual data content as part of a BLE packet? Would there be a lot of handshaking required in order to send / transmit additional data?
Is there some other way for a beacon to transmit data? One of my large concerns is spoofing of my beacons to falsify the data I am attempting to collect. I was hoping that being able to transmit some data along with an iBeacon packet would allow me to limit the spoofing.
Is something like that even feasible?
A few possibilities:
You can tack on one extra data byte to the end of the iBeacon transmission before it reaches its max advertisement length. This byte cannot be read by iOS devices, though, because Apple blocks reading raw data of iBeacon adverts. It would work on Android/Mac/Linux.
You can interleave a second advertisenent with mostly data fields and line the two up with a common identifier like the minor. The more bytes you allocate to lining up the advertisements, the fewer you have to use for data. You can't use the mac tobline them up, because that is unreadable in iOS for the iBeacon transmission.
You can make the beacon connectable via GATT, and read data fields with GATT attributes. The beacon will stop advertising, though, when connected. This limits throughput and reliability.
All of these options require you to build a custom BLE beacon that does multiple advertisements. It is not a trivial undertaking.
I'm currently working on a project in which I use antennas such xbee XBee 2mW Wire Antenna - Series 2 (ZigBee Mesh).
how can I get my antenna64bit address so I can set it up using my software automatically?
Can I send zigbee message to antenna so that it returns a message that contains it`s antenna address, then I decode the message and know the address of my antenna.
thanks.
If you want an easy way of doing this, you can send one message from the Router/End-Device to the Coordinator in your ZigBee network. You can use the special 16-bit Network Address 0x0000 to address the Coordinator.
This message should contain the 16-bit Network Address (or the 64-bit Address), so later the Coordinator can use this address in order to communicate back with this node. That is how you can do if you work with AT Mode. If you work with API Mode, the "Receive Packet" already contains the address of the sender, so you do not need to explicitely add it to your message.
When you press one time the commission button: the module sends a node identification broadcast transmission.
Thus, I assume you are using the API mode, so from your Coordinator API (software side) you can send a Remote AT Command Request, in broadcast, which set the CB (commission button) to 1. This is the same of press the commission button virtually at one time. Here is the packet:
7E 00 10 17 00 00 00 00 00 00 00 FF FF FF FE 00 43 42 01 67
Then, when all your devices receive this packet, they should answer to the coordinator with a Node Identification Indicator, which contains their 16-bit and 64-bit address. This way, you can automatically set up your network on software.