My custom usb is recognized as physical keyboard when attached to Sony mobiles - keyboard

I am developing a product base Android app. That product is behaving absolutely fine in normal Android devices. But behaving bit weird with Sony Xperia mobiles. It is getting recognized as physical keyboard over there. Somehow I successfully detected it when my app is launched manually.
But, the actual requirement is to launch my app as the product is attached to mobile.
Can anyone tell me, why my product is recognized as keyboard instead of normal usb?

Sony Company itself say, they do not guarantee that all usb devices would be supported on Sony devices.
Ref: http://support.sonymobile.com/global-en/xperiaz4tablet/userguide/Connecting-your-device-to-USB-peripherals/
https://support.sonymobile.com/gb/xperiaz3compact/userguide/Connecting-your-device-to-USB-peripherals/
There might be some issue in the code written for your USB device detection. Which might be leading to treat device as physical keyboard by-default.
Ref: Uinput virtual device is detected as physical keyboard on android

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.

Physical USB Keyboard for coding on the Android AIDE app

I am running Android 8.1 Oreo on a smartphone device.
I would like to know, can I mount this KeyTronic USB Keyboard onto my Android phone using a USB to microUSB Adapter?
I want to use it in place the default GBoard soft Keyboard on Android, and use it to code on AIDE.
I don't know if the screen is too small, but I want to try using the keyboard while lying down with a pillow under my head to have me lean up, and the keyboard and smartphone stuck to my upper bent legs. I think this way I can code while lying down and probably don't need a tablet.
Thanks.
Of course, AIDE (Android IDE) supports USB keyboards, as well as mice (e.g. via Bluetooth). In this way, it is possible to code almost like on a laptop.
AIDE on a 10" tablet enables fairly comfortable work, but have in mind that e.g. on a 5" phone you won't be able to show on the sreen more than 13-15 lines (in landscape mode).
The question, however, is whether YOUR DEVICE supports USB keyboards, which cannot be determined since you mentioned neither the brand nor the model. To answer this, simply refer to the manual of your phone.

WebUSB with FT230x serial chip

I'm hoping to use the newly released WebUSB API to communicate with a device i developed. This devices uses a FT230X USB to serial chip. The drivers of this chip are installed on most devices and communicating with it using minicom works smoothly. Now i want to try communicate with it through the browser. I started by downloading this example for arduino: webusb arduino. I set the filter to { 'vendorId': 0x0403, 'productId': 0x6015 } which shows the device. I'm able to find the device but when i try to connect i get the error: NotFoundError: Device unavailable.
Is there a way to find more specific errors? Should i set up a different interface or do i need to change some other configurations? I'm new to USB drivers so any help getting me on my way would be nice. I did read the (short) getting started documentation here. I use Ubuntu 16.04
The FT230X USB to serial chip does not provide an USB interface that Chrome can take control of. This is because, as you mention, the drivers for this chip are available with your operating system. With the serial driver attached Chrome cannot make the device available to your page through the WebUSB API.
The Arduino example programs the Atmel 32u4 chip on many Arduino and Arduino-compatible boards to add an additional USB interface which is not claimed by any system driver and is therefore available to Chrome.
Some developers have also had success either changing the vendor and product ID of their device so that the OS drivers do not claim it or by manually unbinding the driver.

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.

Bluetooth support on Android Emulator

I want to know if the developer team which made the emulator have some information to make bluetooth work in the Android emulator, indicate some links about it, if they have some date for release or if they'll make it works in the future.
as far as I know there is no support in the emulator for bluetooth. And I will have to teach android and bluetooth in some classes. And the students will need to code stuff and test (guess it) in the android emulator.
So I came up with a bare-bone reimplementation of the android bluetooth API on top of tcp. You can find it on here on github.
Basically, you run a tcp-server on your machine, and the emulators will connect through it.
Instead of using the classes in the package android.bluetooth, you just need to use the classes in the package dk.itu.android.bluetooth (and other 2 little modifies).
As for now it supports:
switch on/off the "radio"
discovery devices (only other android emulators)
creating bluetooth services
connecting to bluetooth services
It's not much, but until we got some more from the android guys, I guess there is nothing else around.
Hope it'll be useful, cheers!
The documented bluetooth limitation appears inconsistent with the qemu -bt option. So, how is bluetooth enabled in the emulator so the -bt options can be used, or at least to know that bluetooth is supported?
The target/board/.../BoardConfig.mk having "BOARD_HAVE_BLUETOOTH := true" doesn't provide a bluetooth icon or enable bluetooth. So, how do we turn on bluetooth on the android qemu emulator?
What does it mean that bluetooth is not supported given the -bt option for emulating USB devices that were provided in 2008? The post and limitations are outdated.
The functional limitations of the emulator include:
No support for placing or receiving actual phone calls. You can simulate phone calls (placed and received) through the emulator console, however.
No support for USB connections
No support for device-attached headphones
No support for determining network connected state
No support for determining battery charge level and AC charging state
No support for determining SD card insert/eject
No support for Bluetooth
http://developer.android.com/tools/devices/emulator.html#limitations

Resources