mirror of https://gerrit.osmocom.org/simtrace2
Phone uses USB endpoints 4 to 6 instead of 1 to 3 now
This commit is contained in:
parent
6355ecedf7
commit
b65b881de1
|
@ -8,13 +8,9 @@
|
||||||
|
|
||||||
#define BUFLEN 5
|
#define BUFLEN 5
|
||||||
|
|
||||||
//#define PHONE_DATAOUT 4
|
#define PHONE_DATAOUT 4
|
||||||
//#define PHONE_DATAIN 5
|
#define PHONE_DATAIN 5
|
||||||
//#define PHONE_INT 6
|
#define PHONE_INT 6
|
||||||
|
|
||||||
#define PHONE_DATAOUT 1
|
|
||||||
#define PHONE_DATAIN 2
|
|
||||||
#define PHONE_INT 3
|
|
||||||
|
|
||||||
typedef struct ring_buffer
|
typedef struct ring_buffer
|
||||||
{
|
{
|
||||||
|
|
|
@ -365,7 +365,7 @@ const SIMTraceDriverConfigurationDescriptorPhone configurationDescriptorPhone =
|
||||||
USBGenericDescriptor_INTERFACE,
|
USBGenericDescriptor_INTERFACE,
|
||||||
0, /* This is interface #0 */
|
0, /* This is interface #0 */
|
||||||
0, /* This is alternate setting #0 for this interface */
|
0, /* This is alternate setting #0 for this interface */
|
||||||
4, /* Number of endpoints */
|
3, /* Number of endpoints */
|
||||||
0xff, /* Descriptor Class: Vendor specific */
|
0xff, /* Descriptor Class: Vendor specific */
|
||||||
0, /* No subclass */
|
0, /* No subclass */
|
||||||
0, /* No l */
|
0, /* No l */
|
||||||
|
|
|
@ -102,21 +102,16 @@ def handle_phone_request(dev, state):
|
||||||
try:
|
try:
|
||||||
state = handle_msg_funcs[WAIT_RST](dev)
|
state = handle_msg_funcs[WAIT_RST](dev)
|
||||||
except usb.USBError as e:
|
except usb.USBError as e:
|
||||||
print e
|
print(e)
|
||||||
state = handle_msg_funcs[state](dev)
|
state = handle_msg_funcs[state](dev)
|
||||||
return state
|
return state
|
||||||
|
|
||||||
INS = 1
|
INS = 1
|
||||||
CNT = 4
|
CNT = 4
|
||||||
|
|
||||||
#PHONE_DATAOUT = 0x04
|
PHONE_DATAOUT = 0x04
|
||||||
#PHONE_DATAIN = 0x85
|
PHONE_DATAIN = 0x85
|
||||||
#PHONE_INT = 0x86
|
PHONE_INT = 0x86
|
||||||
|
|
||||||
|
|
||||||
PHONE_DATAOUT = 0x01
|
|
||||||
PHONE_DATAIN = 0x82
|
|
||||||
PHONE_INT = 0x83
|
|
||||||
|
|
||||||
def send_response(dev, cmd):
|
def send_response(dev, cmd):
|
||||||
# FIXME: We could get data of length 5 as well! Implement another distinct criteria!
|
# FIXME: We could get data of length 5 as well! Implement another distinct criteria!
|
||||||
|
|
Loading…
Reference in New Issue