Can you use l2ping to perform an echo request to an BLE device? - bluetooth

If I'm not mistaken l2ping is used to perform an L2CAP echo request to a connected BLE (Bluetooth low energy) peripheral (see l2ping source code). It is working if I try to ping my Smartphone, but not if I try to ping a BLE peripheral.

Related

How to analyze live Bluetooth packet in wireshark?

If i use bluez hcitool, like hcitool scan then I could see packets in wireshark properly under interface bluetooth0. And I am sure that bluez in using on-board Bluetooth chip.
I have written my own application with my own Bluetooth stack ( i am not using bluez ) for USB Bluetooth dongle (using libusb ), but when I start wireshark with bluetooth1 interface, then wireshark not show any packet.
Should my application send packets to wireshark? if so, can some one please direct me how to see my Bluetooth packets in wireshark?

Using Bluez/Linux, can I run a daemon broadcasting BLE ibeacons and be connectable using RFCOMM simultaneously?

As stated in the title, can both be ran simultaneously or is a second adapter required? For example, can one adapter run both BLE and BT classic at the same time - the BLE beacon broadcasts the MAC for opportunistic clients to connect to using RFCOMM.
If you are using a common CSR 4.0 Dongle or Ampac AP6212 (which purportedly uses the same Broadcom chip as the RPI3) then this is possible - they are "dual-stack".
Given this, the typical USB CSR chips have a hard limit of two connected RFCOMM clients and the Ampac, 8 or maybe more (tested for sure 8).

BLE peripheral: scanning while connected

Is it possible to make a peripheral scan for advertisments while connected to a central? It seems like it is either scanning for advertisments or have your peripheral connected but I need to do both. The peripheral should be able to report RSSI measurements from advertisements it picks up.
I'm using 'bleno' for the peripheral and 'noble' for the scanning on a linux box (bluez)
The answer to this differs depending on the version of Bluetooth that your device is on.
For Bluetooth v4.0:
A peripheral cannot scan at all, whether in a connection or not. The peripheral can only send out adverts or accept incoming connections. For more information you can have a look at this document, page 18:-
http://chapters.comsoc.org/vancouver/BTLER3.pdf
For Bluetooth v4.1 onwards:
A device can be in central and peripheral role at the same time. By implication, this means that if a peripheral is connected to a central device, it can still scan for devices in it's "central mode". More information can be found in this link, page 5:-
http://www.ietf.org/proceedings/89/slides/slides-89-6lo-4.pdf
So in conclusion, if your device is BT v4.1 or newer, then this is dependant on the chip manufacturer, and if it is v4.0, then no, because the Bluetooth specification does not allow it.

Deviceinfo without scanning

Can we know the bdaddress and rssi of all nearby ble devices without continuous lescanning? As the continuous lescan will consume more power and also we would not be able to properly make connection to a device while active scanning is going on in background.
The lescan background process also gets killed when we are disconnected from the connected state with any ble device
Also with how many peripherals can a central device be connected to simultanoeusly with bluez-4.101 stack?
Yes you are right you cannot make connection while you are scanning for Low Energy devices and number of devices that can be connected to the central device is entirely dependent on the Software Stack you are using for BLE.
Like in CC2540 you can connect 3 devices at a time.
For RSSI and bluetooth address you refer function le_advertising_report according to bluez-4.101 stack.

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