I am trying to connect my phone to a device with the phone acting as the host 
(using the OTG USB cable).

Once connected, I have new entry "usb0" when I do ifconfig.

I assigned 192.168.3.100 to the phone and 192.168.3.99 to the device.

When I do a tcpdump, I saw that the arp request from the phone got to the 
device correctly, the device answered corrected but by the time it gets to the 
phone, it is no longer correct.  I suspect that this is the problem within the 
u_ether driver/gadget.

When the device reply to the ARP request, tcpdump on the device gives:

2       0.000091        5a:65:6b:1b:de:37       62:18:d4:57:77:6c       ARP     
42      192.168.3.99 is at 5a:65:6b:1b:de:37
Frame 2: 42 bytes on wire (336 bits), 42 bytes captured (336 bits)
Ethernet II, Src: 5a:65:6b:1b:de:37 (5a:65:6b:1b:de:37), Dst: 62:18:d4:57:77:6c 
(62:18:d4:57:77:6c)
0000  62 18 d4 57 77 6c 5a 65  6b 1b de 37 08 06 00 01   b..WwlZe k..7....
0010  08 00 06 04 00 02 5a 65  6b 1b de 37 c0 a8 03 63   ......Ze k..7...c
0020  62 18 d4 57 77 6c c0 a8  03 64                     b..Wwl.. .d      

Which is correct.  However, tcpdump on the phone gives:

2       0.000030        CatenaNe_65:6b:1b       AvlabTec_00:06:04       0xde37  
28      Ethernet II
Frame 2: 28 bytes on wire (224 bits), 28 bytes captured (224 bits)
Ethernet II, Src: CatenaNe_65:6b:1b (00:02:5a:65:6b:1b), Dst: AvlabTec_00:06:04 
(00:01:08:00:06:04)
0000  00 01 08 00 06 04 00 02  5a 65 6b 1b de 37 c0 a8   ........ Zek..7..
0010  03 63 62 18 d4 57 77 6c  c0 a8 03 64               .cb..Wwl ...d    


>From the look of it, the section "62 18 d4 57 77 6c 5a 65  6b 1b de 37 08 06" 
>is missing from the frame.

I suspect that I have to make changes to "drivers/usb/gadget/u_ether.c" and/or 
"drivers/net/usb/cdc_ether.c" but I am not so sure.  Do you know where is the 
good place to start tackling this problem?

Thank you.

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to