How to receive raw bluetooth package on NAO robot - linux

I want to receive ibeacon information on nao robot using Bluetooth adapter, and let naoqi use it.
I want to implement Linux Bluetooth tools such as hcidump to read raw Bluetooth package and extract ibeaon information.
However, I can't find a Practical solution to make it.
Can any one offer me a practical solution?

I'm maybe too late but, I tried to do exactly the same and it's impossible due to old nao linux kernel version 2.6
Bluez software support for Bluetooth low energy comes with version 5.0 and it need a linux kernel version >= 3.5

The Nau is Linux based, so it should support scanning for beacons using BlueZ, although you may need to install the package. Of course, the Nau will need a Bluetooth LE sensor, but you should be able to plug one in to its USB port.
Check out this guide for the Raspberry Pi. It should be applicable:
Can RaspberryPi with BLE Dongle detect iBeacons?

Related

Receiving data from a BLE device to a raspberry Pi3

I never used a raspberry pi before and I have a project part of which includes receiving data from a BLE blood pressure device over Bluetooth to a raspberry pi 3. I can pair the device to my raspberry but I have no idea what to do next. I need to be able to receive the measurements in my raspberry please help and thank you in advance.
PS: the device I'm trying to use is very similar to this one:
https://ibb.co/71365k5
Thanks for your answers, I have tried "Gatt" and "Gatttool" but the problem is after pairing the device is meant to send the measurement to its application on an android phone, without it I cannot read the blood measurement characteristic or it just does not exist.
Linux uses BlueZ as a default bluetooth stack. It exposes DBus APIs for implementing software using Bluetooth.
If you don't want to use this API directly, which can sometimes feel a bit low level you have many libraries that wrap it, such as https://github.com/getsenic/gatt-python that also comes with examples.
All other solutions requires replacing the Bluetooth stack on Linux and hence your other existing Bluetooth pairings to the system will stop working.

Is there a way to run iBeacon on Bluetooth 2.0 compat. device?

So I have a Linux with old BT2.0. I want to use it as iBeacon. Energy consumption is not my concern; the only one is API. Is it possible?
Unfortunately no. iBeacon and beacons in general depend on BLE advertisements, and this was introduced as part of the Bluetooth Low Energy features that are part of BT4.0. The only way around this is if you added a BT4.0 HCI dongle or a Bluetooth v4.0 device to your Linux machine.
You can find more information here:-
5 Things to Know about Beacon Technology
BLE Beacon Technology Made Simple
What are BLE Beacons
Pluggable USB Bluetooth v4.0 Dongle
Best Bluetooth Adapters in 2020
You will also need a relatively new version of Linux in order to have BlueZ support for BLE. Ideally your laptop should be on Linux v4.4 or later, but theoretically this should work from Linux v3.13 onwards. More details are found here:-
Bluetooth Linux Kernel Supported Versions
Checking BLE Capability on Linux

Are there any Bluetooth 4.0 (LE capable) USB adapters that support MacOS/Linux/Unix?

I’m working on a project that uses BLE (Bluetooth Low Energy) protocols for transferring data and am currently limited to my MacBook due to some Admin permission constraints on my work machine (running Windows).
I need to find a USB adapter that supports Bluetooth 4.0 Tx/Rx, however I am ONLY finding these dongles that solely support Windows distros. So my question:
1) Why is this? Is Bluetooth SIG or at least BLE somehow a propriety protocol patented or somehow bound to Microsoft? I mean, there exist iOS libraries for high-level BLE management, so...
2) Am I just missing the product I’m looking for and there are such accessories compatible with a Unix based OS?
Who said USB dongles only support Windows? On the contrary, I haven't heard about a single USB dongle that doesn't support Linux. Bluetooth SIG has defined and specified HCI over USB and every device uses that protocol (however some device specific code is often needed to initialize the device). See a list of some tested devices at https://github.com/50ButtonsEach/fliclib-linux-hci/blob/master/README.md#bluetooth-controllers. Those should work with Mac OS X as well, but if the computer already has a built in Bluetooth chip you might need to adjust the currently used device.

Do i need Bluez when using a bluetooth dongle

i am new to Linux and Bluetooth. i know that the standard implementation of the bluetooth protocol stack is bluez. I know that alsa is not supporting bluez anymore and if you want to use audio over bluetooth, you need pulseaudio. so pulseaudio should support HSP/HFP since version 6 and bluez 5.x. Know i was wondering if i can connect a usb-dongle to my hardwareboard (raspberryPi) there is a serial connection to the board. is that right? so the Dongle has the BT-STack and you can use alsa audio over USB like an USB HEadset?
i hope someone can help me.
The answering this vast addressable question is not that easy. I have few hints which will help you to narrow down.
BlueZ is user layer stack to communicate or use the functionality of Linux Kernel Bluetooth subsystem and provides helpers to developers.
USB Dongle itself doesn't have any stack and I don't really understand your question in that sense. To brief, USB Bluetooth Dongle is just the hardware device with Bluetooth functionalities. To make it functional, you need Linux Kernel Bluetooth system support enabled and either you can directly make use of "socket" system calls to pair,connect etc., or use BlueZ to develop applications with API's
BlueZ itself doesn't provide API's for developers, instead it makes use of the DBus to provide methods, properties and signals with vast range functionalities. Check here
If you interested in Audio Playback using Bluetooth, then you should register your media player and audio sink with BlueZ with according media DBus Interfaces.
To add, I am currently developing a framework library to wrap the DBus functionality provided by BlueZ for friendly development of applications. Check this repo and it is currently in initial development phase.

Bluetooth HFP on the Raspberry Pi

i am trying to connect my raspi with a BT-Headset with the build in bluetooth. it is working with pulseaudio 5.0 and bluez 5.23.
But the thing is it just supports A2DP. i want to use it as a real Headset so i Need HFP. I read that bluez 5 doesnt Support this Profile anymore and with pulseaudio 5 and bluez 5.23 it wont work.
Now i got a bluetoothdongle with my Headset and if i am using the bluetoothdongle instead the buildin Bluetooth it is working. i can record Sound. But i get a better Audio Output with the build in (with dongle it is lagging) . Maybe it is because the dongle uses the hfp Profile directly and therefore the Audio ouput isnt that good anymore.
So i was wondering if this is gonna work with every Bluetoothdongle which supports the HFP/HSP Profile.
And my other question is how does pulseaudio and bluez work together. and how would the BT-dongle would work with pulseaudio together?
Bluez 4 supported hfp and hsp. pulseaudio 5 is backwards compatible so this would be an Option i think. does anyone has tried it?
thanks

Resources