How can I send an advertisement from the Genuino and connect to the Galileo via Bluetooth? - bluetooth

I'm trying to send data via bluetooth from an Intel Genuino to an Intel Galileo. The Galileo will act as the Master node in this connection. I have configured the Galileo so that it is discovering bluetooth devices and I have paired my phone to the Galileo via bluetooth.
What I need to do is pair the Genuino with the Galileo. I have tried some of the sample programs that Arduino provides but I cant seem to pair or connect the two devices.
So the question is, if I have my Galileo discoverable and ready to pair, how can I send an advertisement from the Genuino and connect to the Galileo.
Alternatively: if anybody has a link to a site that explains the blePeripheral and bleCentral commands, that would be great.
Cheers

On the Arduino/Genuino 101 board, use CurieBle to create a peripheral. There are some example sketches to get you started. CurieBle works very similar to the Arduino BLEPeripheral library.
You don't need to pair devices. On the Genuino 101, run the sketch that creates the Bluetooth LE Service. On the Galileo, run a program that discovers service running on the 101 and connects to it. You can write the program for the Galileo using noble and Node.js.

Related

Bluetooth dongle BLED112 on Debian 10 is not working

I just randomly found a Bluegiga BLED112 Bluetooth dongle and I tried to connect it to my Debian 10 laptop as a basic dongle for Bluetooth audio outs.
Unfortunately I wasn't able to solve all the issues I had, starting from the fact that the device is not fully listed once used lsusb and just a mere ID number - namely ID 2458:0001 - pops out and bluetooth or bluez helps weren't successful either.
This given, I tried to follow several of the guides you can find online, also by running available scripts, but again nothing worked.
So if it's possible, what should I do in order to run such a dongle for the basic use I mentioned above - i.e. just for connecting my stereo speakers to my computer?
Thanks
The BlueGiga BLED112 is not a regular Bluetooth USB dongle. It gives you a virtual com port that can be used to access an API that in turn acts as a BLE device.
It is ment to be used for development of IOT solutions.
Also it does not support Bluetooth Classic, it only supports Bluetooth Low Energy.

How to allow only 1 connection to BlueZ GATT server at any given moment?

I'm working on Bluetooth on the embedded Linux. I'm using BlueZ and D-Bus. I have a server taken from the example https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-gatt-server.
I have the app such as nRF installed in 2 iPhones. I'm able to connect to my Linux Bluetooth server at the same time. I'm able to modify the characteristic from either of the iPhone app. But this is a problem because we don't want it. We'd like to have only 1 phone connected to the Linux device. That way, the same characteristic won't be modified by more than 1 phone app at the same time.
Is there a way to allow only 1 connection to the Linux Bluetooth GATT server at any given time?
Thanks.
Yes, the way to do this is to disable/stop advertisements on your Linux device as soon as a connection is established. This way, upon a connection, your Linux device will no longer be advertising and remote devices will no longer be able to connect to it.

Not able to pair Raspberry Pi 3 and iBeacon using Bluetooth

In my current project, I am working with iBeacon in the area of IoT. Basically iBeacon works on Bluetooth wireless technology. I am using Raspberry Pi 3 (which is available with in-built wifi and bluetooth). Pi 3 Bluetooth display and detect the iBeacon but not able to do pairing with it and display the following error:
GDBus.Error:org.bluez.Error.AuthenticationFailed
I also tried with bluetoothctl command also but again display the Failed to pair: org.bluez.Error.AuthenticationFailed
error.
Am I missing something? I am able to pair iBeacon with my mobile and windows based lapotop.
Understand that iBeacon is a transmit only Bluetooth LE device. It is Bluetooth LE manufacturer advertisements to send a unique identifier, something you have seen if you have detected it with the Raspberry Pi 3.
But a basic iBeacon device is not designed to be connectable over Bluetooth LE. Some beacon manufacturers may expose a secondary configuration service that is connectable, but this is not universal and if it exists it is entirely outside the beacon spec.
Bottom line: you are not supposed to be able to connect.
If you have a specific model of beacon that does have a config interface, and you want to connect to that, you may want to put that in your question.

Bluetooth LE - PAN1720 BlueRadios Serial Port Profile with Windows

I am using a Single-Mode Bluetooth Low Energy PAN1720BR BLE dongle which is loaded with the firmware "BlueRadios nBlue 1.2.1.3.1.0-PAN1720" (latest). When plugged to a computer, I can control and configure this PAN1720BR module with AT Commands through a terminal application on the computer.
With a second computer equipped with a standard BLE dongle, I can pair and connect to the PAN1720BR. See configuration below:
PC1 + PAN1720BR <---- BT 4.0 ----> PC2 + Standard BLE dongle + App running on PC2
The problem is that BLE does not have an SPP profile, so to establish a communication between the two PCs, I need to write an application on PC2. The PAN1720BR has a proprietary profile called BlueRadios Serial Port (BRPS) which is not a standard.
BlueRadios provides libraries for iOS and Android so that we can connect a cellphone to a PAN1720BR and communicate wih it. But they are silent about how to connect a PC (Windows) to a PAN1720BR. When establishing the connection, the Battery service (standard) installs properly on PC2, but the service corresponding to BRSP does not install, driver is missing. What is going on here is not very clear to me.
My goal is to write an application to be run on PC2 to enable communication between the two PCs. My question is, how can I access the Bluetooth with my application? Please correct me if I'm wrong, but I believe my app needs to access the ATT/GATT layer in order to read/write data.
Do you have any sample code that would help, in Java (prefered), C/C++, C# or anything else that would help on Windows?
Thank you
For an App with BLE Module from BlueRadios you must use the ATT/GATT Profile or you use the library from BlueRadios with there BRSP Profile.

Communicating with USB bluetooth dongle from FTDI vinculum 2 USB host controller

I have been asked to figure out how to achieve bluetooth communication through an off-the-shelf dongle (in this case a dongle utilizing the Broadcom BCM2045 chip) using the FTDI Vinculum 2 (VNC2) USB controller. I have custom firmware written for the VNC2 to communicate with a generic USB device with the VNC2 acting as the host, and I can successfully read the VID and PID from the dongle as well as the USB device class, subclass, and protocol. I can also send data to the dongle using the bulk data endpoint and I believe the device is receiving though I have no way to tell at the moment.
So I believe I can communicate with the dongle, the problem is I have no idea WHAT to communicate to it in order to set it up in discoverable mode or to pair it with another discoverable device, nor how to actually transmit data through the wireless link once it is paired. I don't even know if there exists a standard communication protocol for this type of thing or if every device will be different. I have a vague understanding of the bluetooth protocol stack and it is my understanding that I won't be required to fully understand that as it should be implemented in the dongle on one end and in the android smartphone that we hope to connect to on the other end. Like I said, I can currently send data to the bulk endpoint, is it true that this endpoint is only for data transfer over the wireless link and I will need to connect to a different endpoint in order to send setup/configuration messages to the dongle?
In short, I need to know what data to send over the USB bus to control any generic bluetooth dongle if possible or at least one specific bluetooth dongle. I have a USB port sniffer but the complexity of the output while using the dongle to communicate is staggering and I doubt I'll ever figure it out.
Thank you in advance.
Bluetooth dongles communicate with host software stack using HCI (host control interface), which is defined in the Bluetooth spec. For reference, you can look at source code for the open source BlueZ stack (standard linux stack). You could run BlueZ on linux talking to your USB dongle, and use hcidump to capture actual packets going across HCI. You can also check out hcitool and hciconfig for performing specific actions.

Resources