My USB modem called Anydata W150. My goal is to send AT commands to the modem via USB and get some information from it.
When I'm connecting the USB modem, first of all it connects for a few seconds as /dev/ttyACM0,
then changes it's mode to flash drive mode and then becomes an internet interface with address like enp0s...
Here is my lsusb output.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 059: ID 0e8d:2004 MediaTek Inc. uf906_lowram_adr_20211118
Bus 001 Device 004: ID 04d9:fa51 Holtek Semiconductor, Inc. USB Optical gaming mouse
Bus 001 Device 030: ID 0416:c345 Winbond Electronics Corp. Gaming Keyboard
Bus 001 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The device with address 0e8d:2004 is my USB modem.
Here is my dmesg output:
[275592.103620] usb 1-9: new high-speed USB device number 60 using xhci_hcd
[275592.244562] usb 1-9: New USB device found, idVendor=0e8d, idProduct=2000, bcdDevice= 1.00
[275592.244576] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[275592.244581] usb 1-9: Product: MT65xx Preloader
[275592.244585] usb 1-9: Manufacturer: MediaTek
[275592.267780] cdc_acm 1-9:1.0: Zero length descriptor references
[275592.267790] cdc_acm: probe of 1-9:1.0 failed with error -22
[275592.348134] cdc_acm 1-9:1.1: ttyACM0: USB ACM device
[275601.426952] usb 1-9: new high-speed USB device number 61 using xhci_hcd
[275601.571247] usb 1-9: New USB device found, idVendor=0e8d, idProduct=2008, bcdDevice=ff.ff
[275601.571261] usb 1-9: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[275601.571267] usb 1-9: Product: uf906_lowram_adr_20211118
[275601.571271] usb 1-9: Manufacturer: MediaTek
[275601.571276] usb 1-9: SerialNumber: W1502022081454
[275641.660198] usb 1-9: new high-speed USB device number 62 using xhci_hcd
[275641.801278] usb 1-9: New USB device found, idVendor=0e8d, idProduct=201d, bcdDevice=ff.ff
[275641.801290] usb 1-9: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[275641.801296] usb 1-9: Product: uf906_lowram_adr_20211118
[275641.801301] usb 1-9: Manufacturer: MediaTek
[275641.801305] usb 1-9: SerialNumber: W1502022081454
[275642.564116] usb 1-9: USB disconnect, device number 62
[275642.893553] usb 1-9: new high-speed USB device number 63 using xhci_hcd
[275643.035170] usb 1-9: New USB device found, idVendor=0e8d, idProduct=2008, bcdDevice=ff.ff
[275643.035183] usb 1-9: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[275643.035189] usb 1-9: Product: uf906_lowram_adr_20211118
[275643.035194] usb 1-9: Manufacturer: MediaTek
[275643.035198] usb 1-9: SerialNumber: W1502022081454
[275643.629773] usb 1-9: USB disconnect, device number 63
[275643.990292] usb 1-9: new high-speed USB device number 64 using xhci_hcd
[275644.137932] usb 1-9: New USB device found, idVendor=0e8d, idProduct=2004, bcdDevice=ff.ff
[275644.137940] usb 1-9: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[275644.137943] usb 1-9: Product: uf906_lowram_adr_20211118
[275644.137945] usb 1-9: Manufacturer: MediaTek
[275644.137947] usb 1-9: SerialNumber: W1502022081454
[275644.142808] rndis_host 1-9:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-9, RNDIS device, 16:50:ad:07:74:9c
[275644.143294] usb-storage 1-9:1.2: USB Mass Storage device detected
[275644.144374] scsi host4: usb-storage 1-9:1.2
[275644.255327] rndis_host 1-9:1.0 enp0s20f0u9: renamed from usb0
[275645.164442] scsi 4:0:0:0: CD-ROM Linux File-CD Gadget 0318 PQ: 0 ANSI: 2
[275645.165306] sr 4:0:0:0: Power-on or device reset occurred
[275645.166137] sr 4:0:0:0: [sr0] scsi-1 drive
[275645.167227] sr 4:0:0:0: Attached scsi CD-ROM sr0
[275645.167541] sr 4:0:0:0: Attached scsi generic sg2 type 5
I googled a lot and found out, that I need to create udev rules. I created rules file with path /etc/udev/rules.d/99-usb-modem.rules
Contents of the file:
ACTION=="add", KERNEL=="enp0s*", SUBSYSTEM=="net", ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2004", SYMLINK+="/dev/ttyUSB10"
So, I'm trying to create a symlink, but it does nothing. I tried a lot of variations of this file and it's contents but nothing is working.
Also, I tried to load drivers via modprobe command. Command syntax was like this:
# modprobe rndis_host
And also tried this with defining the ID from lsusb.
I have remote HID device but seems to be constantly reconnected.
Is there a way to use it on linux? For windows computer the driver is available but not for linux. I assume it's possible to be used but doesn't have clue how.
I try to list devices with python code like:
import evdev
devices = [evdev.InputDevice(fn) for fn in evdev.list_devices()]
print (devices)
for device in devices:
print(device.fn, device.name, device.phys)
but script doesn't list any device. Appear that device is constantly reconnected. Here is lsusb and dmesg output:
xxx#yyy:~$ lsusb -v -d6125:2012
Bus 003 Device 106: ID 6125:2012 Friendess Technology Cypcut Wireless USB Receiver
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x6125
idProduct 0x2012
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 4
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 26
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 0x0020 1x 32 bytes
bInterval 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 2
xxx#yyy:~$
and dmesg output:
[429762.438205] usb 1-1.5.1.4: new full-speed USB device number 17 using ehci-pci
[429762.652341] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429762.652344] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429762.652346] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429762.652348] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429762.652350] usb 1-1.5.1.4: SerialNumber: 201301300001
[429762.656084] hid-generic 0003:6125:2012.0926: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429763.521113] usb 1-1.5.1.4: USB disconnect, device number 17
[429763.842171] usb 1-1.5.1.4: new full-speed USB device number 18 using ehci-pci
[429764.056330] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429764.056333] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429764.056336] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429764.056338] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429764.056340] usb 1-1.5.1.4: SerialNumber: 201301300001
[429764.060064] hid-generic 0003:6125:2012.0927: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429764.929078] usb 1-1.5.1.4: USB disconnect, device number 18
[429765.254126] usb 1-1.5.1.4: new full-speed USB device number 19 using ehci-pci
[429765.468321] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429765.468324] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429765.468326] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429765.468328] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429765.468330] usb 1-1.5.1.4: SerialNumber: 201301300001
[429765.471962] hid-generic 0003:6125:2012.0928: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429766.336910] usb 1-1.5.1.4: USB disconnect, device number 19
[429766.662072] usb 1-1.5.1.4: new full-speed USB device number 20 using ehci-pci
[429766.876312] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429766.876316] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429766.876318] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429766.876319] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429766.876321] usb 1-1.5.1.4: SerialNumber: 201301300001
[429766.880257] hid-generic 0003:6125:2012.0929: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429767.745028] usb 1-1.5.1.4: USB disconnect, device number 20
[429768.070038] usb 1-1.5.1.4: new full-speed USB device number 21 using ehci-pci
[429768.284303] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429768.284307] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429768.284309] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429768.284311] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429768.284313] usb 1-1.5.1.4: SerialNumber: 201301300001
[429768.288110] hid-generic 0003:6125:2012.092A: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429769.153078] usb 1-1.5.1.4: USB disconnect, device number 21
[429769.474034] usb 1-1.5.1.4: new full-speed USB device number 22 using ehci-pci
[429769.688292] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429769.688296] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429769.688298] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429769.688299] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429769.688301] usb 1-1.5.1.4: SerialNumber: 201301300001
[429769.692092] hid-generic 0003:6125:2012.092B: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429770.561074] usb 1-1.5.1.4: USB disconnect, device number 22
[429770.882003] usb 1-1.5.1.4: new full-speed USB device number 23 using ehci-pci
[429771.096284] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429771.096287] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429771.096289] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429771.096291] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429771.096293] usb 1-1.5.1.4: SerialNumber: 201301300001
[429771.100080] hid-generic 0003:6125:2012.092C: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429771.969058] usb 1-1.5.1.4: USB disconnect, device number 23
[429772.293959] usb 1-1.5.1.4: new full-speed USB device number 24 using ehci-pci
[429772.508293] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429772.508297] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429772.508299] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429772.508301] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429772.508302] usb 1-1.5.1.4: SerialNumber: 201301300001
[429772.512198] hid-generic 0003:6125:2012.092D: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429773.377049] usb 1-1.5.1.4: USB disconnect, device number 24
[429773.701934] usb 1-1.5.1.4: new full-speed USB device number 25 using ehci-pci
[429773.916283] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429773.916286] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429773.916289] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429773.916291] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429773.916292] usb 1-1.5.1.4: SerialNumber: 201301300001
[429773.920187] hid-generic 0003:6125:2012.092E: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429774.785037] usb 1-1.5.1.4: USB disconnect, device number 25
[429775.109902] usb 1-1.5.1.4: new full-speed USB device number 26 using ehci-pci
[429775.324275] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429775.324278] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429775.324280] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429775.324282] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429775.324284] usb 1-1.5.1.4: SerialNumber: 201301300001
[429775.328214] hid-generic 0003:6125:2012.092F: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429776.193028] usb 1-1.5.1.4: USB disconnect, device number 26
[429776.513871] usb 1-1.5.1.4: new full-speed USB device number 27 using ehci-pci
[429776.728265] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429776.728268] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429776.728270] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429776.728272] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429776.728273] usb 1-1.5.1.4: SerialNumber: 201301300001
[429776.732205] hid-generic 0003:6125:2012.0930: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429777.601020] usb 1-1.5.1.4: USB disconnect, device number 27
[429777.925836] usb 1-1.5.1.4: new full-speed USB device number 28 using ehci-pci
[429778.140111] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429778.140114] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429778.140116] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429778.140118] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429778.140120] usb 1-1.5.1.4: SerialNumber: 201301300001
[429778.143890] hid-generic 0003:6125:2012.0931: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429779.009010] usb 1-1.5.1.4: USB disconnect, device number 28
[429779.329802] usb 1-1.5.1.4: new full-speed USB device number 29 using ehci-pci
[429779.543974] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429779.543977] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429779.543980] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429779.543982] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429779.543983] usb 1-1.5.1.4: SerialNumber: 201301300001
[429779.547786] hid-generic 0003:6125:2012.0932: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429780.417007] usb 1-1.5.1.4: USB disconnect, device number 29
[429780.741783] usb 1-1.5.1.4: new full-speed USB device number 30 using ehci-pci
[429780.955815] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429780.955817] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429780.955818] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429780.955819] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429780.955820] usb 1-1.5.1.4: SerialNumber: 201301300001
[429780.959480] hid-generic 0003:6125:2012.0933: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429781.824855] usb 1-1.5.1.4: USB disconnect, device number 30
[429782.149748] usb 1-1.5.1.4: new full-speed USB device number 31 using ehci-pci
[429782.363814] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429782.363818] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429782.363820] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429782.363822] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429782.363823] usb 1-1.5.1.4: SerialNumber: 201301300001
[429782.368627] hid-generic 0003:6125:2012.0934: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429783.232987] usb 1-1.5.1.4: USB disconnect, device number 31
[429783.557677] usb 1-1.5.1.4: new full-speed USB device number 32 using ehci-pci
[429783.771817] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429783.771820] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429783.771821] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429783.771822] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429783.771823] usb 1-1.5.1.4: SerialNumber: 201301300001
[429783.775468] hid-generic 0003:6125:2012.0935: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429784.640979] usb 1-1.5.1.4: USB disconnect, device number 32
[429784.965668] usb 1-1.5.1.4: new full-speed USB device number 33 using ehci-pci
[429785.179938] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429785.179942] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429785.179944] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429785.179946] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429785.179948] usb 1-1.5.1.4: SerialNumber: 201301300001
[429785.183878] hid-generic 0003:6125:2012.0936: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429786.048962] usb 1-1.5.1.4: USB disconnect, device number 33
[429786.373619] usb 1-1.5.1.4: new full-speed USB device number 34 using ehci-pci
[429786.587785] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429786.587789] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429786.587791] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429786.587793] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429786.587794] usb 1-1.5.1.4: SerialNumber: 201301300001
[429786.591608] hid-generic 0003:6125:2012.0937: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429787.456934] usb 1-1.5.1.4: USB disconnect, device number 34
[429787.777656] usb 1-1.5.1.4: new full-speed USB device number 35 using ehci-pci
[429787.991920] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429787.991924] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429787.991926] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429787.991928] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429787.991929] usb 1-1.5.1.4: SerialNumber: 201301300001
[429787.995979] hid-generic 0003:6125:2012.0938: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429788.864945] usb 1-1.5.1.4: USB disconnect, device number 35
[429789.189571] usb 1-1.5.1.4: new full-speed USB device number 36 using ehci-pci
[429789.403788] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429789.403791] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429789.403793] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429789.403795] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429789.403796] usb 1-1.5.1.4: SerialNumber: 201301300001
[429789.407883] hid-generic 0003:6125:2012.0939: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
[429790.272906] usb 1-1.5.1.4: USB disconnect, device number 36
[429790.601520] usb 1-1.5.1.4: new full-speed USB device number 37 using ehci-pci
[429790.819778] usb 1-1.5.1.4: New USB device found, idVendor=6125, idProduct=2012, bcdDevice= 1.00
[429790.819782] usb 1-1.5.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[429790.819784] usb 1-1.5.1.4: Product: Cypcut Wireless USB Receiver
[429790.819786] usb 1-1.5.1.4: Manufacturer: Friendess Technology
[429790.819788] usb 1-1.5.1.4: SerialNumber: 201301300001
[429790.823860] hid-generic 0003:6125:2012.093A: hiddev0,hidraw1: USB HID v1.11 Device [Friendess Technology Cypcut Wireless USB Receiver] on usb-0000:00:1a.0-1.5.1.4/input0
I have a device(STM32 Virtual COM Port).In Linux it is detected normally /dev/ttyACM0. After starting the operating system, I do not receive data from the device. If turn it off and back on it works fine. The problem appears only when I reboot the operating system. Can you tell me how to make it work after restarting the OS.
Its my dmesg
[ 1.077892] usb 1-5: new full-speed USB device number 2 using xhci_hcd
[ 1.228321] usb 1-5: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[ 1.228335] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.228341] usb 1-5: Product: STM32 Virtual COM Port
[ 1.228345] usb 1-5: Manufacturer: STMicroelectronics
[ 1.228349] usb 1-5: SerialNumber: 5CF862553730
I have a STEVAL STWINCSV1 board with an STM32L4R9 chip connected to my computer via USB. I am trying to use OpenOCD to flash a new image. I am using the command openocd -d -f board/stm32l4discovery.cfg to try to open a connection to the board. Here are the contents of the cfg file
# Explicitly for the STM32L476 discovery board:
# http://www.st.com/web/en/catalog/tools/PF261635
# but perfectly functional for any other STM32L4 board connected via
# an stlink-v2-1 interface.
# This is for STM32L4 boards that are connected via stlink-v2-1.
source [find interface/stlink.cfg]
transport select hla_swd
source [find target/stm32l4x.cfg]
reset_config srst_only
When I plug in the board via USB and check the output of dmesg | grep usb, here is what I get (I plugged the board in multiple times):
[15316.981696] usb 1-1.3: new full-speed USB device number 7 using xhci_hcd
[15317.119120] usb 1-1.3: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[15317.119121] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15317.119122] usb 1-1.3: Product: STM32 Virtual ComPort in FS Mode
[15317.119123] usb 1-1.3: Manufacturer: STMicroelectronics
[15317.119123] usb 1-1.3: SerialNumber: FFFFFFFEFFFF
[15317.169176] usbcore: registered new interface driver cdc_acm
[15726.366247] usb 1-1.3: USB disconnect, device number 7
[15733.238286] usb 1-1.3: new full-speed USB device number 8 using xhci_hcd
[15733.363181] usb 1-1.3: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[15733.363182] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15733.363183] usb 1-1.3: Product: STM32 Virtual ComPort in FS Mode
[15733.363184] usb 1-1.3: Manufacturer: STMicroelectronics
[15733.363184] usb 1-1.3: SerialNumber: FFFFFFFEFFFF
[15822.875489] usb 1-1.3: USB disconnect, device number 8
[15861.278256] usb 1-3.4: new full-speed USB device number 9 using xhci_hcd
[15861.400511] usb 1-3.4: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[15861.400512] usb 1-3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15861.400513] usb 1-3.4: Product: STM32 Virtual ComPort in FS Mode
[15861.400514] usb 1-3.4: Manufacturer: STMicroelectronics
[15861.400514] usb 1-3.4: SerialNumber: FFFFFFFEFFFF
[16196.113834] usb 1-3.4: USB disconnect, device number 9
[16251.868195] usb 1-1.3: new full-speed USB device number 10 using xhci_hcd
[16252.006377] usb 1-1.3: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[16252.006378] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[16252.006379] usb 1-1.3: Product: STM32 Virtual ComPort in FS Mode
[16252.006380] usb 1-1.3: Manufacturer: STMicroelectronics
[16252.006380] usb 1-1.3: SerialNumber: FFFFFFFEFFFF
When I run openocd -d -f board/stm32l4discovery.cfg, here is the output (pastebinned since it was a bit long): https://pastebin.com/biVLuf7U
Does anyone know what might be going wrong here?
I figured out the issue. First of all, the eval board I was using does not support stlink over its usb port, so I had to use a stlink/v3 mini external programmer instead. Also, the latest OpenOCD release on my distro did not support stlink/v3, so I had to compile OpenOCD from source. That fixed my issue.
I have consecutive log messages:
usb-storage 2-1.5:1.0: USB Mass Storage device detected
usb-storage 2-1.5:1.0: Quirks match for vid 05e3 pid 0723: 8000
scsi host25: usb-storage 2-1.5:1.0
usb 2-1.5: USB disconnect, device number 49
usb 2-1.5: new high-speed USB device number 50 using ehci-pci
usb 2-1.5: new high-speed USB device number 53 using ehci-pci
usb 2-1.5: new high-speed USB device number 54 using ehci-pci
usb 2-1.5: new high-speed USB device number 57 using ehci-pci
usb 2-1.5: New USB device found, idVendor=05e3, idProduct=0723
usb 2-1.5: New USB device strings: Mfr=3, Product=4, SerialNumber=2
usb 2-1.5: Product: USB Storage
usb 2-1.5: Manufacturer: Generic
usb 2-1.5: SerialNumber: 000000009451
usb-storage 2-1.5:1.0: USB Mass Storage device detected
usb-storage 2-1.5:1.0: Quirks match for vid 05e3 pid 0723: 8000
scsi host26: usb-storage 2-1.5:1.0
scsi 26:0:0:0: Direct-Access Generic STORAGE DEVICE 9451 PQ: 0 ANSI: 0
sd 26:0:0:0: Attached scsi generic sg2 type 0
sd 26:0:0:0: [sdc] Attached SCSI removable disk
usb 2-1.5: USB disconnect, device number 57
usb 2-1.5: new high-speed USB device number 58 using ehci-pci
usb 2-1.5: New USB device found, idVendor=05e3, idProduct=0723
usb 2-1.5: New USB device strings: Mfr=3, Product=4, SerialNumber=2
usb 2-1.5: Product: USB Storage
usb 2-1.5: Manufacturer: Generic
usb 2-1.5: SerialNumber: 000000009451
usb-storage 2-1.5:1.0: USB Mass Storage device detected
usb-storage 2-1.5:1.0: Quirks match for vid 05e3 pid 0723: 8000
scsi host27: usb-storage 2-1.5:1.0
scsi 27:0:0:0: Direct-Access Generic STORAGE DEVICE 9451 PQ: 0 ANSI: 0
sd 27:0:0:0: Attached scsi generic sg2 type 0
sd 27:0:0:0: [sdc] Attached SCSI removable disk
This disturb me because of sound of plugged/unplugged device, even when sound is muted (I setup 0% volume, and the sound icon in taskbar is grayed)
How to prevent this?
This command seems helps me:
echo "2-1.5:1.0" > /sys/bus/usb/drivers/usb-storage/2-1.5:1.0/driver/unbind