Debugging BLE HID device - bluetooth

I'm trying to make an Android application for Android Things running on raspberry pi that takes USB joystick inputs (including DJI Mavic controller) and passes it over BLE HID as a gamepad.
Windows, Oculus Quest and Mac all recognize it as a gamepad, but when I try to connect to it, they connect and disconnect right away. I'm not sure why
Is there any tool on any OS that logs the BLE HID pairing process to find out what went wrong?
https://github.com/darvin/USBMavicBLEHIDAndroidThing/blob/master/app/src/main/java/jp/kshoji/blehid/HidPeripheral.java

Related

How to read PC USB ports in Android emulator?

I have a usb device for transmitting data. the device works perfect in windows OS. I am to use the device in Android 13 the Device acts as Human Interface Device.
I am using Android Emulator for programming. It seems the emulator work only for UI and not for external hardware.
And I achived that in android app, It can able to read that pendrive. When I run that app in Emulator it is not detecting.
Can you suggest how can I make Android emulator detect the usb device.
Thank you for your kind interest.
Regards
I want to connect USB device on Emulator.. and need to view that contents.

Bluetooth device not working on my laptop

Bluetooth device not working on my windows 10,Toshiba laptop.I have tried updating but still can't get it.

Can't disconnect from a bonded BLE device (programming the BLE HID device)

I'm running a BLE HID device on a Sparkfun Artemis Thing Plug board. I can pair with the board and it works as a keyboard. What doesn't work is that, after pairing, I can't connect/disconnect. For example, if I look at my smart watch on my iPhone, the options for it look like follows:
Disconnect option in the iPhone menu
But for my HID device that's all there is:
Lacking the disconnect option in the iPhone menu
As you can see there is no Disconnect option. That's what I want to have for my HID device. I know that in order for the devices to pair only once they actually have to bond (pairing + saving the security information for any future connections). They bond correctly for sure. Resetting the HID BLE device results in iPhone and the device reconnecting. I just can't disconnect from the device with keeping the bonding information. I can only Forget the device.
Is it that the BLE device doesn't advertise properly and iPhone assumes that it's not a device that can be connected and disconnected from?
For some strange reasons Apple has decided that it should not be possible to disconnect HID devices, only unpair them.

Yocto / i.Mx.6: How to support touch on touchscreen monitor

I am working on Nitrogen6x board that runs on Yocto 2.1 with Qt 5.6.2 support. I have developed a Qt application that shall support the input options like USB Keyboard, Mouse and Touchscreen and shall support a Full HD resolution display.
I have connected a touchscreen monitor which supports Full HD resolution to the Nitrogen board using HDMI to VGA converter cable, and my application was working fine with the correct resolution and supports plug and play keyboard and mouse connections.
BUT, the touch response on the touchscreen monitor was not received by the Qt Framework and hence the touch interface was not working for me as expected.
When I plug the mouse am seeing the below information on my nitrogen board console:
~ # usb 1-1.1: new low-speed USB device number 8 using ci_hdrc
input: HID 413c:3010 as /devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1/1-1.1:1.0/0003:413C:3010.0006/input/input3
hid-generic 0003:413C:3010.0006: input: USB HID v1.00 Mouse [HID 413c:3010] on usb-ci_hdrc.1-1.1/input0
But, When I plug the touchscreen monitor am only seeing this:
~ # usb 1-1.1: new full-speed USB device number 7 using ci_hdrc
I was expecting that the touch screen interface will get automatically detected and will be passed as a input plugin to the Qt application.
I have run make menuconfig and have enabled USB Touch screen rebuilt the kernel. But, still am noticing the below error messages while the kernel is booting:
Galcore version 5.0.11.41671
egalax_ts 2-0004: Failed to read firmware version
egalax_ts: probe of 2-0004 failed with error -5
ft5x06-ts 2-0038: reset fffffffe
ft5x06-ts 2-0038: Could not detect touch screen -19.
Am some how missing to configure the right kernel options to detect the touchscreen. any help on this is appreciable. Thanks in advance.
I have selected the below option:
Device Drivers -> HID Devices -> Special HID drivers -> HID Multitouch panels as an embedded driver (*) in my Kernel configuration, and then I have rebuilt the kernel by adding my touchscreen's Vendor ID and Device / Product ID to the files hid-ids.h and hid-multitouch.c at relevant places.
My touchscreen is working as expected now.

Can a bluetooth usb dongle be detected when only powered on?

I bought one of those tiny bluetooth USB dongles that you can plug on a PC and make bluetooth communications. I am wondering if I just plug this dongle to a USB power source, like the USB charger that comes with iPad, can the bluetooth dongle power up, and be discovered as a bluetooth device? This sounds reasonable, since the bluetooth dongle should be able to broadcast itself, at least using some low-level protocol, i.e. showing its Mac address.
However, I tried to do the following:
1.Plug the bluetooth dongle on my iPad's usb charger
2.Search bluetooth devices on my laptop
and I could not find it. Is it because the bluetooth dongle needs the PC to initialize it, so that it can be discovered? Or I am not doing it right?
Thanks
It depend on the dongle
Typical PC dongles depends on the host (pc) to initialize and start any bluetooth activity - including scanning etc
It is practically possible to make dongles that can start becoming discoverable without waiting for host initialization. This has to be a custom build

Resources