I am trying to pair bluetooth mobile device with my embedded board using bluez.
Now I am able to scan bt devices. But when I am firinf command "hcitool cc and hcitool auth then it showing no device connected.
Other that I used "rfcomm connect 0 1" then at mobile side its asking for PIN. I have added Pin at mobile side. But at board side could not able to pass the same key as I dont know the way How I could enter it from file or by some other way.
Please let me know which file I have to include for it and how i need to configure it.
I am using BLuex 5.18 stack.
hcidump :
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr D4:93:98:C6:9A:DA ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr D4:93:98:C6:9A:DA role 0x01
Role: Slave
HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 1 bdaddr D4:93:98:C6:9A:DA type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 1
HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
HCI Event: Max Slots Change (0x1b) plen 3
handle 1 slots 5
HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 1
Features: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
handle 1 page 1
HCI Event: Command Status (0x0f) plen 4
Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
HCI Event: Read Remote Extended Features (0x23) plen 13
status 0x00 handle 1 page 1 max 1
Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< ACL data: handle 1 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x01b8
Enhanced Retransmission mode
Streaming mode
FCS Option
Fixed Channels
Extended Window Size
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
< ACL data: handle 1 flags 0x02 dlen 10
L2CAP(s): Info req: type 3
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
ACL data: handle 1 flags 0x02 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x00000002
L2CAP Signalling Channel
< ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0040
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
Connection pending - No futher information available
ACL data: handle 1 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
< ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x00b8
Enhanced Retransmission mode
Streaming mode
FCS Option
Fixed Channels
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
ACL data: handle 1 flags 0x02 dlen 10
L2CAP(s): Info req: type 3
< ACL data: handle 1 flags 0x02 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x00000002
L2CAP Signalling Channel
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
ACL data: handle 1 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successful
ACL data: handle 1 flags 0x02 dlen 27
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 15
MTU 1013
RFC 0x00 (Basic)
< ACL data: handle 1 flags 0x02 dlen 27
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 15
MTU 1013
RFC 0x00 (Basic)
< ACL data: handle 1 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 1013
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 2
ACL data: handle 1 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 1013
< ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
< ACL data: handle 1 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
dlci 2 frame_type 0 credit_flow 15 pri 7 ack_timer 0
frame_size 1008 max_retrans 0 credits 7
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
ACL data: handle 1 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
dlci 2 frame_type 0 credit_flow 14 pri 7 ack_timer 0
frame_size 1007 max_retrans 0 credits 7
< ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 2 pf 1 ilen 0 fcs 0x59
HCI Event: Number of Completed Packets (0x13) plen 5
handle 1 packets 1
HCI Event: PIN Code Request (0x16) plen 6
bdaddr D4:93:98:C6:9A:DA
ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c
< ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
Related
I have been running into a lot of issues with Jenkins and permissions. My current issue is that it cannot find a USB debugger, specifically openocd cannot find the cmsis-dap device. Which of course is connected. And running the same script outside of jenkins then openocd finds the device just fine.
Previously I had to add jenkins to dialout group so it can talk to serial ports through one of my scripts.
If anyone can give some insight on what permissions I need to give jenkins or openocd.I had to add my gnu tools binary to the repo so that jenkins would not give a permission denied error, perhaps I have to do the same? I doubt it because it is actually executing openocd just not finding the plugged in device.
The device info as described by lsusb -v :
> Bus 001 Device 007: ID 0d28:0204 NXP ARM mbed Device Descriptor:
> bLength 18 bDescriptorType 1 bcdUSB
> 2.10 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface
> Association bMaxPacketSize0 64 idVendor 0x0d28
> NXP idProduct 0x0204 ARM mbed bcdDevice 10.00
> iManufacturer 1 ARM iProduct 2 DAPLink
> CMSIS-DAP iSerial 3
> 04091702f7f18a2900000000000000000000000097969906 bNumConfigurations
> 1 Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength 0x008b
> bNumInterfaces 5
> bConfigurationValue 1
> iConfiguration 0
> bmAttributes 0x80
> (Bus Powered)
> MaxPower 500mA
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 2
> bInterfaceClass 8 Mass Storage
> bInterfaceSubClass 6 SCSI
> bInterfaceProtocol 80 Bulk-Only
> iInterface 8 USB_MSC
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x83 EP 3 IN
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x04 EP 4 OUT
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 0
> Interface Association:
> bLength 8
> bDescriptorType 11
> bFirstInterface 1
> bInterfaceCount 2
> bFunctionClass 2 Communications
> bFunctionSubClass 2 Abstract (modem)
> bFunctionProtocol 1 AT-commands (v.25ter)
> iFunction 4 mbed Serial Port
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 0
> bNumEndpoints 1
> bInterfaceClass 2 Communications
> bInterfaceSubClass 2 Abstract (modem)
> bInterfaceProtocol 1 AT-commands (v.25ter)
> iInterface 4 mbed Serial Port
> CDC Header:
> bcdCDC 1.10
> CDC Call Management:
> bmCapabilities 0x03
> call management
> use DataInterface
> bDataInterface 2
> CDC ACM:
> bmCapabilities 0x06
> sends break
> line coding and serial state
> CDC Union:
> bMasterInterface 1
> bSlaveInterface 2
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x85 EP 5 IN
> bmAttributes 3
> Transfer Type Interrupt
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0010 1x 16 bytes
> bInterval 32
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 2
> bAlternateSetting 0
> bNumEndpoints 2
> bInterfaceClass 10 CDC Data
> bInterfaceSubClass 0
> bInterfaceProtocol 0
> iInterface 5 mbed Serial Port
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x07 EP 7 OUT
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x86 EP 6 IN
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 0
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 3
> bAlternateSetting 0
> bNumEndpoints 2
> bInterfaceClass 3 Human Interface Device
> bInterfaceSubClass 0
> bInterfaceProtocol 0
> iInterface 6 CMSIS-DAP v1
> HID Device Descriptor:
> bLength 9
> bDescriptorType 33
> bcdHID 1.00
> bCountryCode 0 Not supported
> bNumDescriptors 1
> bDescriptorType 34 Report
> wDescriptorLength 33
> Report Descriptors:
> ** UNAVAILABLE **
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x81 EP 1 IN
> bmAttributes 3
> Transfer Type Interrupt
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 1
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x02 EP 2 OUT
> bmAttributes 3
> Transfer Type Interrupt
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 1
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 4
> bAlternateSetting 0
> bNumEndpoints 0
> bInterfaceClass 255 Vendor Specific Class
> bInterfaceSubClass 3
> bInterfaceProtocol 0
> iInterface 7 WebUSB: CMSIS-DAP Binary Object Store Descriptor: bLength 5 bDescriptorType 15
> wTotalLength 0x0039 bNumDeviceCaps 2 Platform
> Device Capability:
> bLength 24
> bDescriptorType 16
> bDevCapabilityType 5
> bReserved 0
> PlatformCapabilityUUID {3408b638-09a9-47a0-8bfd-a0768815b665}
> WebUSB:
> bcdVersion 1.00
> bVendorCode 33
> iLandingPage 0 Platform Device Capability:
> bLength 28
> bDescriptorType 16
> bDevCapabilityType 5
> bReserved 0
> PlatformCapabilityUUID {d8dd60df-4589-4cc7-9cd2-659d9e648a9f}
> CapabilityData[0] 0x00
> CapabilityData[1] 0x00
> CapabilityData[2] 0x03
> CapabilityData[3] 0x06
> CapabilityData[4] 0xaa
> CapabilityData[5] 0x00
> CapabilityData[6] 0x20
> CapabilityData[7] 0x00 Device Status: 0x0000 (Bus Powered)
I'm able to receive the CAN messages successfully while the CAN is in ERROR-ACTIVE state.
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
7 0 0 10 16 7 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
19321178 2661559 6 0 6 0
TX: bytes packets errors dropped carrier collsns
0 0 0 11 0 0
But when I' trying to send data using cansend 280#22F18C, it shows BUS-OFF.
2: can0: <NO-CARRIER,NOARP,UP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state BUS-OFF (berr-counter tx 248 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
7 0 0 11 17 8 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
20884231 2876864 6 0 6 0
TX: bytes packets errors dropped carrier collsns
0 0 0 11 0 0
I'm receiving messages from another node using a transceiver, but unable to send the message.
I am working with a imx6 dual light digi board. I want to add Ad7879 touch support. I 've been followed the next steps:
-First I changed the kernel config file adding support fo touchscreen and ad7879. In kernel config file I 've made the following changes:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_AD7879=y
CONFIG_TOUCHSCREEN_AD7879_I2C=y
At the first I configured ad7879 as module doing:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_AD7879=m
CONFIG_TOUCHSCREEN_AD7879_I2C=m
After that I made the device initialization in the device tree.
In imx6qdl-ccimx6sbc.dtsi file I put the next:
&i2c3 {
ad7879#2c
{
compatible = "adi,ad7879-1";
reg = <0x2c>;
interrupt-parent = <&gpio6>;
interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
touchscreen-max-pressure = <4096>;
adi,resistance-plate-x = <120>;
adi,first-conversion-delay = /bits/ 8 <3>;
adi,acquisition-time = /bits/ 8 <1>;
adi,median-filter-size = /bits/ 8 <2>;
adi,averaging = /bits/ 8 <1>;
adi,conversion-interval = /bits/ 8 <255>;
};
The ad7879 interrupt controller is conected to the imx6 in EXP_I2C_IRQ_N pin that is the GPIO_6_15, for that reason I put interrupt-parent = <&gpio6> and interrupts = <15 IRQ_TYPE_EDGE_FALLING>;.
In imx6qdl-ccimx6sbc.dts file I put:
&i2c3 {
...
ad7879#2c {
status ="okay";
};
...
};
Then I followed with compile the linux image and device tree.
In the imx6 with the linux image that I configures the ad7879 as module I loaded the ad7879 modules doing this:
root:~> modprobe ad7879
root:~> modprobe ad7879-i2c
but there is not log messages abaout the ad7879 and there is no ad7879 node asociated.
If I check the device node to chek the device node:
root#ccimx6sbc: ls -la /dev/input/
drwxr-xr-x 4 root root 180 Jan 1 2000 .
drwxr-xr-x 14 root root 3480 May 16 14:49 ..
drwxr-xr-x 2 root root 80 Jan 1 2000 by-id
drwxr-xr-x 2 root root 120 Jan 1 2000 by-path
crw-rw---- 1 root input 13, 64 Jan 1 2000 event0
crw-rw---- 1 root input 13, 65 Jan 1 2000 event1
crw-rw---- 1 root input 13, 66 Jan 1 2000 event2
crw-rw---- 1 root input 13, 63 Jan 1 2000 mice
crw-rw---- 1 root input 13, 32 Jan 1 2000 mouse0
root#ccimx6sbc:# cat /sys/class/input/input0/name
da9063-onkey
root#ccimx6sbc:# cat /sys/class/input/input1/name
Genius 4D Scroll Mouse
root#ccimx6sbc:# cat /sys/class/input/input2/name
sgtl5000-audio Headphone Jack
You can see that there is no node asociated.
root#ccimx6sbc:# cat /proc/interrupts
CPU0 CPU1
29: 140884 13795 GIC 29 twd
34: 406 0 GIC 34 sdma
35: 0 0 GIC 35 VPU_JPG_IRQ
37: 1 0 GIC 37 2400000.ipu
38: 12 0 GIC 38 2400000.ipu
42: 28 0 GIC 42
44: 0 0 GIC 44 VPU_CODEC_IRQ
50: 0 0 GIC 50 vdoa
51: 0 0 GIC 51 rtc alarm
54: 52 0 GIC 54 mmc3
55: 52 0 GIC 55 mmc1
57: 3580 0 GIC 57 mmc0
61: 353 0 GIC 61 21f0000.serial
63: 0 0 GIC 63 2008000.ecspi
69: 472 0 GIC 69 21a4000.i2c
70: 1367 0 GIC 70 21a8000.i2c
72: 109 0 GIC 72 2184200.usb
75: 0 0 GIC 75 2184000.usb
79: 0 0 GIC 79 202c000.ssi
81: 0 0 GIC 81 imx_thermal
87: 167 0 GIC 87 i.MX Timer Tick
112: 0 0 GIC 112 20bc000.wdog
134: 0 0 GIC 134 mipi_dsi
137: 466 0 GIC 137 2101000.jr0
138: 0 0 GIC 138 2102000.jr1
139: 0 0 GIC 139 mmdc_1
144: 0 0 GIC 144 mmdc_1
147: 0 0 GIC 147 20e0000.hdmi_video
150: 62234 0 GIC 150 2188000.ethernet
151: 0 0 GIC 151 2188000.ethernet
192: 0 0 gpio-mxc 0 headphone detect
364: 1 0 gpio-mxc 12 da9063-irq
413: 0 1 da9063-irq 3 HWMON
414: 0 0 da9063-irq 0 ONKEY
415: 0 0 da9063-irq 1 ALARM
IPI0: 0 0 CPU wakeup interrupts
IPI1: 0 58 Timer broadcast interrupts
IPI2: 1405 2387 Rescheduling interrupts
IPI3: 0 0 Function call interrupts
IPI4: 19 33 Single function call interrupts
IPI5: 0 0 CPU stop interrupts
IPI6: 426 476 IRQ work interrupts
IPI7: 0 0 completion interrupts
Err: 0
You can se that there is not interrupts asociated to ad7879.
There is no difference when I build the linux kernel with this configuration:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_AD7879=y
CONFIG_TOUCHSCREEN_AD7879_I2C=y
I did run dmesg and there is no log entries associated with ad7879.
In the imx6 linux I did the following commands:
>root#ccimx6sbc:i2cdetect 2
with this response:
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- UU -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- 2c -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
If you can see the identifier of the device is detected (0x2c).
Then I made:
>root#ccimx6sbc: i2cdump -r 0-0x40 2 0x2c
With this response:
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2, address 0x2c, mode byte
Probe range limited to 0x00-0x40.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 00 40 00 00 00 00 00 00 00 00 00 00 00 03 00 ..#...........?.
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00
You can se in 0x02 and 0x0e are two of the default values for the registers of ad7879 and they are correct. So I concluded that the controller is well connected.
I don't if I missing something.
I had to debug a keyboard lag issue that i faced in a logitech wireless USB keyboard and i found that it had runtime autosuspend and it was causing the keyboard to suspend after 2 seconds.
The specifications of my usb 2.0 USB keyboard are
Bus 003 Device 030: ID 062a:4101 Creative Labs Wireless Keyboard/Mouse
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x062a Creative Labs
idProduct 0x4101 Wireless Keyboard/Mouse
bcdDevice 81.13
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 59
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 65
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 168
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0007 1x 7 bytes
bInterval 4
This wireless keyboard has the USB Autosuspend as disabled ie. /sys/devices/pci0000:00/0000:00:14.0/usb3/power/control is on which means autosuspend is disabled.
But the keyboard which has USB autosuspend is a USB 2.0 keyboard and its device descriptor is
Bus 003 Device 027: ID 046d:c52b Logitech, Inc. Unifying Receiver
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x046d Logitech, Inc.
idProduct 0xc52b Unifying Receiver
bcdDevice 12.03
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 84
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 4
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 98mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 1 Keyboard
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 59
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 8
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 148
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 93
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 2
I just want to know if the USB 1.1 protocol supports usb runtime autosuspend or not?If it supports where can i find the code in kernel which says that Runtime autosuspend is applicable to a usb device based on its protocol version.Thanks in advance.
The field I'm interested is iSerial from the output of: lsusb -d <idVendor>:<idProduct> -v
Example output of a non-unique iSerialNumber:
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0402 ALi Corp.
idProduct 0x9665 Gateway Webcam
bcdDevice 0.09
iManufacturer 3
iProduct 1
iSerial 0 <-- Three string descriptors exist to provide details of the manufacturer, product and serial number. There is no requirement to have string descriptors. If no string descriptor is present, a index of zero should be used.
bNumConfigurations 1
Configuration Descriptor:
As far as I know the iSerialNumber does not always include a uniquely identifiable string value.
For example the Iphone and Ipad include this information, but some other devices I've tested do not have this value.
It is not mandatory according to the USB standard to have string descriptors.
Can someone who owns a GoPro tell me if it has a string descriptor for the serial number?
I don't have a camera yet.
Mine returned iSerial 3 123456789ABC, I tested with Hero3 Black Edition
here is the complete result:
Bus 001 Device 004: ID 2672:0004
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x2672
idProduct 0x0004
bcdDevice 0.00
iManufacturer 1 GoPro
iProduct 2 Storage
iSerial 3 123456789ABC
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 4mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 2
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 2
Device Status: 0x0001
Self Powered