alcides has quit [Remote host closed the connection]
eebrah|mobile has joined #linux-rockchip
Theueip has quit [Quit: Leaving...]
Theueip has joined #linux-rockchip
eebrah has joined #linux-rockchip
atiti has quit [Ping timeout: 268 seconds]
Theueip has quit [Quit: Leaving...]
atiti has joined #linux-rockchip
eebrah has quit [Ping timeout: 272 seconds]
eebrah has joined #linux-rockchip
eebrah is now known as Guest62806
Theueip has joined #linux-rockchip
eebrah|mobile has quit [Read error: Connection reset by peer]
eebrah|mobile has joined #linux-rockchip
eebrah|mobile has quit [Read error: Connection reset by peer]
shineworld has joined #linux-rockchip
<shineworld>
Morning all. I've got a bad issue with Rockchip linux kernel for Android 3.0.36+ (used in a CUBE_U25GT_PRO tablet). When I connect an accessory device (in this case a FTDI FT312D Android -> FT -> UART converter) just after sending command for accessory request (using libusb_control_transfer with 53) the kernel shutdown the endpoint before to reply to request and causing a (-USHUTDOWN)(-108). In follow link you can get libpcap logs and linux
akaizen has quit [Remote host closed the connection]
akaizen has joined #linux-rockchip
<shineworld>
morning akaizen
Guest62806 is now known as eebrah
<shineworld>
Some android/kernel AOA expert here ?
<mosquito520>
I m not expert...Orz
<shineworld>
I've an issue with USB and android
<shineworld>
I'm enough sure that is an issue on kernel level because I've compared AOSP with android sources and code is same
<shineworld>
when android receive from host the command to enter in Android Accessory Mode the OS does that but 90 times on 100 not reply to request packet (timing questions ?) so the accessory device enter in ERROR
naobsd has joined #linux-rockchip
eebrah has quit [Ping timeout: 240 seconds]
<mosquito520>
shineworld: I have some question, does that FT312D UART TX RX worked?
<shineworld>
YES
<mosquito520>
cuz I don't know that "using libusb_control_transfer with 53" mean? Send another command to communitcation with FT312D?
<shineworld>
they works perfectly in Nexus 4/7
<shineworld>
and sometime in rockchip (10 time in 90)
<shineworld>
Pratically 53 is ACCESSORY_START command which host (FTDI FT312D) send to Android to ask it to enter in Android Accessory Mode
<shineworld>
Just a copy from my previous chat:
<shineworld>
I've got a bad issue with Rockchip linux kernel for Android 3.0.36+ (used in a CUBE_U25GT_PRO_1.0.4 2013/05/18 tablet).
<shineworld>
This happen 90 times on 100 but sometime the kernel is able to rebly to control transfer command before the USB will be restarted to enter in Android Open Accessory Mode.
<shineworld>
When I connect an accessory device (in this case a FTDI FT312D to get Android -> FT312D -> UART interface -> PoS system RS232 port) just after sending command for accessory request (using libusb_control_transfer with ACCESSORY_START = 53) the kernel shutdown the endpoint before it reply to request and causing a USHUTDOWN (-108) error and invalidating connection with FTDI FT312D.
<shineworld>
In follow link you can get libpcap logs and linux program that I wrote to simulate an ADK device and get the error:
<shineworld>
PS: PID and VID should be switched to VID_CUBE and related CUBE PID before to recompile sources.
<mosquito520>
hold on second... Does that FT312D is simple USB to UART converter= =?
<shineworld>
nope, isn't a simple USB to UART but is a Android READY USB to UART
<shineworld>
Pratically is a host device "able" to accept and open a special communication modality (called Android Open Accessory) with Android OS.
<shineworld>
At this point Android, using normal input/output streams can operate with UART ready devices like a PoS terminal
<naobsd>
it doesn't gives /dev/ttyUSB* thing, there is no driver in kernel, it needs libusb, right?
<shineworld>
Android Tablet -> USB cable -> FTDI FT312 chip -> PoS device with UART com
<mosquito520>
uh, I m not realy understand what it mean... I'm wanna trying to figure 1 thing first, does that device has driving already?
<mosquito520>
cuz that spec describe it's a UART converter="=
<mosquito520>
the other thing, I found FTDI usb driver does not enable by default in kernel:)
<shineworld>
A sec. adk-shine.c and binary IS for PC ... is an emulator that I've used to simulate the FTDI CHIP connected with an android tablet and use WireShark to get USB packets
<shineworld>
1) Android Open Accessory is a feature of Android used to change the normal function of USB port present in ALL systems >= 3.1
<shineworld>
2) FTDI CHIP is a little micro which implements the AOA protocol and get add a UART port in any android device
<naobsd>
Android tablet act as host? or device? I'm confusing old one that android device act as device and external unit act as host
<shineworld>
near to usb cable (in board) there is the FTDI FT312 chip.
<shineworld>
with Nexus products N4/N7 (2012/2013) and Samsung S3/S3 Mini all worked fine
<shineworld>
The android application just connect to board and permit to program any settings, get history alarms, charts of memories, and so on
<shineworld>
so my chain is : Android HMI program -> Android OS . usb in AOA mode -> usb cable -> FTDI FT312D chip -> UART signal converter -> My board main CPU
<naobsd>
how about using USB host on RK Android tablet?
<shineworld>
not all devices have USB Host capability (for example Nexus don't have) so use native USB feature is my "must"
<shineworld>
However I wrote a PC simulator which permit a smart guy to debug WHAT'S happen in kernel ah find a fix
<shineworld>
The simulator just do what FTDI FT312D chip does to get the comunication
<shineworld>
with WireShark is then possible to capture the USB traffic an see the problem
<shineworld>
I don't have rockchip kernel and android sources to do by myself (and overall skill in usb device things)