Author Message

<  Setup Discussion  ~  XS Stick P14 (1c9e:f000)

PostPosted: Sat Jan 13, 2018 6:30 pm Reply with quote
Posts: 2 Joined: Sat Jan 13, 2018 6:20 pm
Hello,

I'm trying to configure the XS Stick P14 (1c9e:f000) on a Gentoo system where there isn't a GUI and networkmanager.

this is what I see in the dmesg output:

Code:
[   60.966249] usb 1-1.2: new high-speed USB device number 3 using ehci-pci
[   61.119169] usb 1-1.2: New USB device found, idVendor=1c9e, idProduct=f000
[   61.119178] usb 1-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[   61.119185] usb 1-1.2: Product: USB Modem
[   61.119192] usb 1-1.2: Manufacturer: USB Modem
[   61.119198] usb 1-1.2: SerialNumber: 1234567890ABCDEF
[   61.122212] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   61.122628] scsi host2: usb-storage 1-1.2:1.0
[   62.198599] scsi 2:0:0:0: CD-ROM            USBModem Disk             2.31 PQ: 0 ANSI: 2
[   62.201284] sr 2:0:0:0: [sr0] scsi-1 drive
[   62.201291] cdrom: Uniform CD-ROM driver Revision: 3.20
[   62.201758] sr 2:0:0:0: Attached scsi CD-ROM sr0
[   62.201974] sr 2:0:0:0: Attached scsi generic sg1 type 5


lsusb:
Code:
Bus 001 Device 004: ID 1c9e:f000 OMEGA TECHNOLOGY


I enabled the log which says:

Code:
USB_ModeSwitch log from Sat Jan 13 17:25:52 CET 2018

Use global config file: /etc/usb_modeswitch.conf
Adjust delay for USB storage devices ...
 Current value is higher than 10. Leave it alone

Raw args from udev: /1-1.2

Use top device dir /sys/bus/usb/devices/1-1.2
Check class of first interface ...
 Interface 0 class is 08.

----------------
USB values from sysfs:
  manufacturer  USB Modem
  product       USB Modem
  serial        1234567890ABCDEF
----------------
bNumConfigurations is 1 - don't check for active configuration
ConfigList: /etc/usb_modeswitch.d/1c9e:f000 /usr/share/usb_modeswitch/1c9e:f000:uMa=USB_Modem /usr/share/usb_modeswitch/1c9e:f000
SCSI attributes not needed, move on
Check config: /etc/usb_modeswitch.d/1c9e:f000
! matched. Read config data
Use config file from override folder /etc/usb_modeswitch.d
Logger is /usr/bin/logger
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Delay time of 1 seconds
 wait is over, start mode switch
Unbinding driver
Command to be run:
usb_modeswitch -W -D -u -1 -b 1 -g 4 -v 1c9e -p f000 -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.2.5 (C) Josua Dietze 2015
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x1c9e
DefaultProduct= 0xf000
TargetVendor=   0x1c9e
TargetProductList="9000,9603,9605,9607,9900"
MessageContent="555342431234567800000000000001ff000000000000000000000000000000"
NeedResponse=0
System integration mode enabled

Use given bus/device number: 001/004 ...
Look for default devices ...
 bus/device number matched
  found USB ID 1c9e:f000
   vendor ID matched
   product ID matched
 Found devices in default mode (1)
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: USB Modem
     Product: USB Modem
  Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Reset response endpoint 0x81
Reset message endpoint 0x01
ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...
 Read attributes ...

Target config not matching - current values are
    1-1.2:1.0/bInterfaceClass: 08
    bConfigurationValue:       1
    bNumConfigurations:        1
    busnum:                    1
    devnum:                    4
    idProduct:                 f000
    idVendor:                  1c9e
    manufacturer:              USB Modem
    product:                   USB Modem
    serial:                    1234567890ABCDEF

Mode switching may have failed. Exit


Obviously the /dev/ttyUSB* is not created.

This is what I tried manually:

Code:
# /usr/sbin/usb_modeswitch -W -D -u -1 -b 1 -g 4 -v 1c9e -p f000 -V 1c9e -P 9605 -M 55534243123456788000000080000606f50402527000000000000000000000                                                                                                                                                 
Take all parameters from the command line                                                                                                           
                                                                                                                                                     
                                                                                                                                                     
 * usb_modeswitch: handle USB devices with multiple modes                                                                                           
 * Version 2.2.5 (C) Josua Dietze 2015                                                                                                               
 * Based on libusb1/libusbx                                                                                                                         
                                                                                                                                                     
 ! PLEASE REPORT NEW CONFIGURATIONS !                                                                                                               
                                                                                                                                                     
DefaultVendor=  0x1c9e                                                                                                                               
DefaultProduct= 0xf000                                                                                                                               
TargetVendor=   0x1c9e                                                                                                                               
TargetProduct=  0x9605                                                                                                                               
MessageContent="55534243123456788000000080000606f50402527000000000000000000000"                                                                     
NeedResponse=0                                                                                                                                       
System integration mode enabled                                                                                                                     
                                                                                                                                                     
Use given bus/device number: 001/004 ...
Look for default devices ...
 bus/device number matched
  found USB ID 1c9e:f000
   vendor ID matched
   product ID matched
 Found devices in default mode (1)
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: USB Modem
     Product: USB Modem
  Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
 No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 Sending the message returned error -7. Try to continue
Reset response endpoint 0x81
Reset message endpoint 0x01
ok:busdev



I have another gentoo system where in the past was configured only one device with the following command:
Code:
# usb_modeswitch -v 19d2 -p 1015 -W -I -c /usr/share/usb_modeswitch/19d2\:1013


On that system the XS Stick P14 is working without do anything :shock: ...so what I am missing??

Thanks.


Offline
PostPosted: Mon Jan 15, 2018 6:23 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
First, I suggest to repeat the manual test. Do not try to use a different "MessageContent"; use the one that's in the correct config file.

It's important to run the manual command after a fresh insert. Disable the automatic mode switching by editing /etc/usb_modeswitch.conf. Then re-insert the stick, wait a moment and run the manual command.

You don't need most of the flag parameters. Just do this:
Code:
# usb_modeswitch -W -v 1c9e -p f000 -M "555342431234567800000000000001ff000000000000000000000000000000"

You should not get an error for sending "message 1". There may be other errors after this but these would be a sign that the mode switch is ongoing. Check any changes with repeated "dmesg" commands.


Offline
PostPosted: Tue Jan 16, 2018 6:52 pm Reply with quote
Posts: 2 Joined: Sat Jan 13, 2018 6:20 pm
Hi, thanks for the answer.

After a fresh reboot I inserted the usb stick, this is the dmesg output I see:
Code:
[   48.868309] usb 1-1.2: new high-speed USB device number 3 using ehci-pci
[   49.020995] usb 1-1.2: New USB device found, idVendor=1c9e, idProduct=f000
[   49.021004] usb 1-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[   49.021011] usb 1-1.2: Product: USB Modem
[   49.021018] usb 1-1.2: Manufacturer: USB Modem
[   49.021024] usb 1-1.2: SerialNumber: 1234567890ABCDEF
[   49.026069] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   49.026506] scsi host2: usb-storage 1-1.2:1.0
[   50.090864] scsi 2:0:0:0: CD-ROM            USBModem Disk             2.31 PQ: 0 ANSI: 2
[   50.093575] sr 2:0:0:0: [sr0] scsi-1 drive
[   50.093583] cdrom: Uniform CD-ROM driver Revision: 3.20
[   50.094032] sr 2:0:0:0: Attached scsi CD-ROM sr0
[   50.094258] sr 2:0:0:0: Attached scsi generic sg1 type 5


And the result of the command you suggested:

Code:
# usb_modeswitch -W -v 1c9e -p f000 -M "555342431234567800000000000001ff000000000000000000000000000000"
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.4.0 (C) Josua Dietze 2016
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x1c9e
DefaultProduct= 0xf000
MessageContent="555342431234567800000000000001ff000000000000000000000000000000"

Look for default devices ...
  found USB ID 1c9e:f000
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0003
  found USB ID 0438:7900
  found USB ID 1d6b:0002
  found USB ID 0438:7900
  found USB ID 1d6b:0002
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 003 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: USB Modem
     Product: USB Modem
  Serial No.: 1234567890ABCDEF
-------------------------
Looking for active driver ...
 OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 1 (CSW) ...
 Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!


There aren't still /dev/ttyUSB*

No changes in dmesg after the usb_modeswitch command.


Offline
PostPosted: Wed Jan 17, 2018 10:14 am Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
The USB ID of the stick did not change after the manual run of usb_modeswitch ?

Anyway, at least you should see that the storage device [sr0] is gone after the storage driver is detached by usb_modeswitch.
If that is not the case, check if there is probably a complete reset of the stick so that it starts up as a fresh storage device after the mode switch. You should notice a thing like this if you go back a bit further in the dmesg output.


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
4 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum