Bluetooth spp sniffer - bluetooth

I'm looking for a tool, preferably in Windows, that will allow me to see the byte streams going in and out from the Bluetooth device through SPP. This would be similar to Serial port monitors available for COM and LPT ports.

Since no-one answered your question within 8 months, and I was looking for the same answer too. Here is the answer many people are looking for: there is a tool out there called wireshark that does the trick. Look at all the protocols it can filter out at http://www.wireshark.org/docs/dfref/
See: Bluetooth SPP Packet, Protocol field name: btspp.
As you can see, it will do the trick but you have to learn wireshark first. It's not all childs play after all :-)
Afaik: Wireshark is free to use. Windows and Mac versions both 32-bit and 64-bit available. Linux versions I don't know.

Related

webUSB Relay Driver hardware

Over the last couple of years I have been looking for an easy way to control a few relays from Javascript. I want to build a web App to control starting sequence horns for sailing races.
I recently discovered webUSB and it seems like exactly what I need. A direct connection from JS in chrome to the USB world. Simple coding in a language I already use.
On the hardware side I am having trouble finding a product that is compatible. Googling USB Relay finds 100's of products that all seem to rely on some proprietary SW for the OS. I can find lots of educational demo's that turn an LED on and off.
Does anyone have any ideas where to find such a product?
While I'm sure you will be able to find USB relays that can be controlled via WebUSB, most USB relays will probably come with some kind of serial port driver, e.g. https://numato.com/product/1-channel-usb-powered-relay-module uses a CDC serial port driver. These can be controlled using Web Serial, available in Chrome 77 and later behind a feature flag. For a tutorial, see https://codelabs.developers.google.com/codelabs/web-serial/
Explainer: https://github.com/WICG/serial/blob/gh-pages/EXPLAINER.md
API docs: https://wicg.github.io/serial/
If you search for "5V USB Relay Programmable Computer Control For Smart Home" on eBay, you will also find low-cost relays that use HID instead. The advantage of these is that you don't need any serial port or USB drivers, as it will use the operating system's built-in HID drivers. For that you can use WebHID. For more info, see https://github.com/robatwilliams/awesome-webhid.

Using SDKs made for Windows in Linux for different architecture

I have recently purchased an RFID reader that uses RS232 communication. What I want to do is essentially to use this reader on my Raspberry Pi(which does not use x86 architecture). However the seller only sent me SDKs that uses .DLL for C#, Visual C, Delphi and even for Java SDKs!
I tried looking for generic SDKs online but couldn't really find any.
My question is is there any way to convert these into Linux compatible that would work with any other architecture?
Since the Raspberry Pi uses an ARM architecture you are most likely out of luck as the DLL SDK is probably x86 architecture only.
But don't give up hope. You still have more options:
You may be able to use a Minnowboard and get x86 Linux with Wine running under it and make use of the DLLs that way. I believe the Wine COM port code is pretty stable.
If it is truly an RS-232 you should be able to hook the reader up to the serial port of a Raspberry Pi, set your com settings ('baud', stop bits, parity, handshake) with stty and read the output of the reader in Linux. It should be a simple dump of the RFID interrogations.
You may need to do a little bit of protocol reverse engineering, but for a RFID reader this should be pretty easy (about as easy as it gets). If you need to, you might be able to dig up some stuff on-line or ask the manufacturer for the device communication protocol specs.
Here's a link to a serial library for the Raspberry Pi in straight C that should get you going.

Tools for bluetooth monitoring

For my project I have an Android phone and an Arduino device that communicate via Bluetooth. I was wondering if anyone knows any software tools I could use to monitor a bluetooth communications between two devices. Something like a packet eavesdropping. Preferably for Linux.
Take a look at ubertooth one. In the linked webpage there are instructions on how to build the dongle, as well as links to shops selling assembled dongles may be bought. Ubertooth one should work well with Kismet, and thus in Linux, by using a BT plugin (disclaimer: I have no personal experience on this).
Sounds like you are after a Bluetooth sniffer.
Bad news: They are almost exclusively Windows OS based and cost mega-$.
http://www.fte.com/products/bluetooth.aspx
If you were using BlueZ for one side of the communication you could use the BlueZ HCIDUMP app and Wireshark.
I don't think anyone has made a Linuz/Bluez Sniffer - could be wrong.

Bluetooth debugging tools

Linux has hcidump which is a very handy tool for debugging bluetooth problems.
Can anyone recommend similar tools for Windows? I'd also be interested in other tools for Linux if anyone knows anything good.
I'm trying to investigate why my BT device disconnects after a couple of seconds. I expect its a crappy mini-dongle, but would like to find out more about where the disconnection originated from.
You can capture the USB interface with a Windows USB sniffer, e.g. Usbtrace or Usblyzer and convert the captured output to btsnoop file format which can then be loaded and analyzed in Wireshark or FTS4BT viewer (free tool from ww.fte.com).
I don't think that you have something similar for Windows desktop, but for Windows CE there is a tool called BTDC Tool. If you read Wireshark wiki they say that there isn't something for Windows: http://wiki.wireshark.org/CaptureSetup/Bluetooth and http://wiki.wireshark.org/Bluetooth
You could capture the traffic, by going deep into the driver, but for this you should study the Windows DDK. It allows you to add extensions of your own.

How can I find which version of a2dp is used by my Bluetooth headset device?

I know that one way to find this out is to have a look at the device specification. Most device specifications are reporting just that A2DP is supported. Is there another way to find which version of A2DP is used from a headset device?
I recommend using linux with either built in bluetooth or with a bluetooth dongle. Then you can use the bluez tool sdptool from the command line to get this information.
A protocol sniffer is not necessary as all a protocol sniffer does is decode the packets over the air (which is exactly what sdptool does already), and it is more difficult as you will need to find out the link key as well which, depending on the devices you are using, can be quite difficult.
Currently there are only 2 versions of A2DP - 1.0 and 1.2
The differences are only minor optimizations / adaptations. So from a user's point of view it really does not matter.
Both versions are compatible and will talk to each other.
Since the differences are minor technical documentation changes in the spec it is not marketed as different versions to the end user. (Its just A2DP)
To really know the versions you will have to hook up with a Protocol sniffer and look at the SDP (Service Discovery) Query which typically happens after pairing / initial connection.

Resources