一边是平板 android3.1,作为device端
一边是pc机或者arm板,作为host端
他们之间通过usb线连接,虚拟串口来通信。现在host端发送数据过来,device总是出现丢弃1次数据,50%;而反过来,device发送给host倒是100%成功。
以下为logcat:
host上第1次发过来时情况,看上去device收到数据,但是中间好像卡了:
E/DataRouter( 236): Got command as string
E/DataRouter( 236): last char is 10
E/DataRouter( 236): last second char is 57
E/DataRouter( 236): IsDeviceManagerCmd buffer in usb = 123456789
E/DataRouter( 236):
E/DataRouter( 236): IsDeviceManagerCmd buffer in usb: return false
E/DataRouter( 236): DSR is OFF, can not send the packet to Modem
E/DataRouter( 236): write [19] bytes of data to USB fd[0]
E/DataRouter( 236): Before the usb select
host上第2次发过来时情况,看上去device收到的是第1次卡的数据:
E/DataRouter( 236): After the usb select
D/---JniLog---( 1068): callback len:10, buf:123456789
D/---JniLog---( 1068):
E/DataRouter( 236): Before checking the modem suspend state
E/DataRouter( 236): PDP is resumed now
E/DataRouter( 236): After checking the modem suspend state
D/BatteryService( 292): update start
host上第3次发过来时情况,重复轮回:
E/DataRouter( 236): Got command as string
E/DataRouter( 236): last char is 10
E/DataRouter( 236): last second char is 57
E/DataRouter( 236): IsDeviceManagerCmd buffer in usb = 123456789
E/DataRouter( 236):
E/DataRouter( 236): IsDeviceManagerCmd buffer in usb: return false
E/DataRouter( 236): DSR is OFF, can not send the packet to Modem
E/DataRouter( 236): write [19] bytes of data to USB fd[0]
E/DataRouter( 236): Before the usb select
D/BatteryService( 292): update start
host上第4次发过来时情况:
E/DataRouter( 236): After the usb select
D/---JniLog---( 1068): callback len:10, buf:123456789
D/---JniLog---( 1068):
E/DataRouter( 236): Before checking the modem suspend state
E/DataRouter( 236): PDP is resumed now
E/DataRouter( 236): After checking the modem suspend state
一边是pc机或者arm板,作为host端
他们之间通过usb线连接,虚拟串口来通信。现在host端发送数据过来,device总是出现丢弃1次数据,50%;而反过来,device发送给host倒是100%成功。
以下为logcat:
host上第1次发过来时情况,看上去device收到数据,但是中间好像卡了:
E/DataRouter( 236): Got command as string
E/DataRouter( 236): last char is 10
E/DataRouter( 236): last second char is 57
E/DataRouter( 236): IsDeviceManagerCmd buffer in usb = 123456789
E/DataRouter( 236):
E/DataRouter( 236): IsDeviceManagerCmd buffer in usb: return false
E/DataRouter( 236): DSR is OFF, can not send the packet to Modem
E/DataRouter( 236): write [19] bytes of data to USB fd[0]
E/DataRouter( 236): Before the usb select
host上第2次发过来时情况,看上去device收到的是第1次卡的数据:
E/DataRouter( 236): After the usb select
D/---JniLog---( 1068): callback len:10, buf:123456789
D/---JniLog---( 1068):
E/DataRouter( 236): Before checking the modem suspend state
E/DataRouter( 236): PDP is resumed now
E/DataRouter( 236): After checking the modem suspend state
D/BatteryService( 292): update start
host上第3次发过来时情况,重复轮回:
E/DataRouter( 236): Got command as string
E/DataRouter( 236): last char is 10
E/DataRouter( 236): last second char is 57
E/DataRouter( 236): IsDeviceManagerCmd buffer in usb = 123456789
E/DataRouter( 236):
E/DataRouter( 236): IsDeviceManagerCmd buffer in usb: return false
E/DataRouter( 236): DSR is OFF, can not send the packet to Modem
E/DataRouter( 236): write [19] bytes of data to USB fd[0]
E/DataRouter( 236): Before the usb select
D/BatteryService( 292): update start
host上第4次发过来时情况:
E/DataRouter( 236): After the usb select
D/---JniLog---( 1068): callback len:10, buf:123456789
D/---JniLog---( 1068):
E/DataRouter( 236): Before checking the modem suspend state
E/DataRouter( 236): PDP is resumed now
E/DataRouter( 236): After checking the modem suspend state