Is there a way to find out what packets being sent by android to paired bluteooth devices? For example what packets being sent if an incoming call is detected?
Update: Im using an Android 2.3 device, so the built-in logger of android 4.4 is not available for me. Moreover i cant find an app that logs the bluetooth traffic on my older device.
What about writing what you receive somewhere? Like on a text file? Or in the SQLite DB? Or even in a view you put somewhere in your app for debugging?
If you want to capture logs sent by one Bluetooth device to another, you will need tools like Bluetooth Protocol Analyzer tool like Sodera Analyzers (http://www.fte.com/products/sodera.aspx). But such tools are very costly.
You may also go for the logs of interaction between Bluetooth host and controller i.e. HCI(Host Controller Interface) snoop logs.
To enable HCI logs on android, Go to Dev. Options->Enable Bluetooth HCI snoop log.
Related
I am trying to build an android app that can be controlled by a laptop with ubuntu installed via Bluetooth. What I want is to develop an android app that listens for incoming messages and performs particular actions according to the message. Basically I want the app to listen for Bluetooth signal (message) in the background while camera intent is open in the foreground and snap the picture when a particular message is received.
For that, I started learning about the Bluetooth serial communication and got to know about the following library on Github:
https://github.com/harry1453/android-bluetooth-serial/tree/master/demoApplication
I have replicated the demo application and the application is sending messages successfully, however when I send the message from Linux to the Android app it is not working. Can anyone help me regarding this issue or can suggest me some good tutorial to follow in order to build the app that can communicate with raspberry pi serially?
We know Bluetooth serial configuration is poorly documented (I read many questions here without any clear results.)
I believe it's due to the Raspberry Pi Bluetooth configuration issue based on your description.
With correct Raspberry Bluetooth serial configuration, your program with serial routines (written in Python using PySerial or serial routines written in C, which you can find it in github), your requirements (sending info about camera status via serial port will work.
Please see Bluetooth Serial Configuration (see latest answer) for more details.
I wonder if anyone else is seeing this. We have successfully used the RN4020 MLDP protocol (similar intent to SPP on Classic Bluetooth) with both iOS and a Bluetooth-LE USB module (BLED112) on Windows. Basically serial bytes coming in to the RN4020 module are sent via a characteristic, resulting in a notification on the connected device (iPhone, PC). Bytes written to the characteristic on the connected device come out of the RN4020 serial port.
But using similar API calls on Android (using C#/Xamarin low-level APIs), I occaisionally see the data I send appear as a notification. About 1 time in 5. The data sent does go to the module and then to the equipment it is attached to. I think I saw evidence that there was some sensitivity to timing.
Has anyone seen similar behavior? I do not see this on iOS or the BluetoothLED dongle (BLED112). I believe too that the Windows UWP version I started did not show this behavior.
Thanks to anyone who can help me understand this -- currently I have a hack in to discard received data that exactly matches what was sent out recently. But I would hate to release like this.
First off I would like to ask if it is possibe to send a stream of data from an arduino with HM11 to an android phone via bluetooth.
The data contains ultrasonic sensor's readings, orientation, battery level, etc.
My android phone will be displaying those data accordingly acting as a monitor.
I tried coding already using the android studio using the bluetooth guide resources but i end up unable to connect to my module with a message "read failed, closed or timeout -1". I have tried connecting while paired or unpaired. My app can discover HM11 as well as receive the data using HMBLE Terminal app i have downloaded from Play Store. So I guess the android studio guides are not meant from android to bluetooth modules.
I would also like to begin from scratch as i may have missed out some very important basic information.
Any help?
I'm asking because I've been facing that issue for weeks.
I need to develop an Android application that can be able to perform an Bluetooth Connection and send data to an Bluetooth Hardware.
Ok, so here's the point:
is it possible to perform a RFCOMM connection to an 'unknown' device?
I mean, is it possible to do this without having any information about the hardware code?
Because i'm only able to modify the AndroidDevice (cellphone) code, for SENDING purposes.
I want to send a byte and make sure it was received, but there's only a sending code.
Could we have some more details? Is the other device accessible by you, as in can the other device know information about the Android device? And what do you mean by a "sending code"?
The Android device can pick up any active Bluetooth device in its range, and know the name and address of those devices. So, if the Android device doesn't know anything about the Bluetooth device it wants to connect to, you can always sort through the list of devices in range, and get its hardware code through that.
See the documentation about Bluetooth, specifically the Finding Devices section:
http://developer.android.com/guide/topics/connectivity/bluetooth.html
I've done a fair amount of Bluetooth work with Android devices and Arduinos, and the Bluetooth library might be a bit of a pain to work with, but it is powerful.
With bluetooth the two devices have a UUID. If you a writing a program that runs on both devices you have them listen for that UUID. When they connect as a client or a server you have a dataInputStream and a dataOutputStream. Then you can push and pull bytes out of those.
anyone know if its posible to make an application to simulate a touchscreen mouse or trackpad by bluetooth??
How can I make that the PC (or MAC) knows me as a mouse device?
Regards,
Juan
You should have a look at the Bluetooth HID specification. It may be possible, depending on the stack of the device that you are using to emulate a mouse/trackpad. I'm not familiar with the stack on Android (assuming that's the platform you're using from the tag on your question) so I don't know if it's possible from there.
Essentially, you create a HID service on the L2CAP protocol. The service record specifies the HID descriptors which describe the data being sent from emulating device. The HID driver on the host computer should be able to interpret that data.
It might be useful to try to connect to another Bluetooth mouse/trackpad from the desktop (Bluecove on a stack other than Microsoft is a good way to hack around in Bluetooth). Have a look at the service record for the HID service on the mouse/trackpad. Also, look at the data coming from the mouse/trackpad for an idea of what needs to be sent and when.
Alternatively, you could write a server application on your computer that communicates via another Bluetooth protocol (e.g., RFCOMM/SPP) to the input-device emulator app running on your phone. The server application would simulate the input device (e.g., move the mouse pointer around on the screen, etc).
Instead of creating your own project why dont you contribute to the remotedroid project?
I'm assuming you know your bluetooth api's well. Remote droid uses Wifi and OSC messaging to communicate with the PC.
Yes you may use GlovePie with the wiimote connected to BlueSoeil, It will alow you to do anything with you computer with the wiimote. It also has a Language it uses
I think you want this:
Serverless Bluetooth Keyboard & Mouse for PC/Phone
It's even open-source!
Unfortunately it is not open source, it just has a GitHub readme for some reason.
But still the app is quite good!