Re: Olivetti - Olicard 300: automate driver loading
Posted: 12 May 2015, 12:35
Logging was already enabled, but Olicard there aren't any ttyUSB related logs files in /var/log/.
Let's clean all old logs:
Then let's try to re-plugin olicard dongle... and see what dmesg reports.
Ok, now let's go to var log dir and we should have an usbmodeswitch log file related to "2-4.1" usb device...
As expected...
Now we can open that log file and read what contains...
So, we don't have any ttyUSB related log file...
I remember first time I attached my the other dongle... Huawei, ttyUSB related log files were created...
As regard tcl script, on my system dispatcher is a binary executable...
Anyway I can access to source code and read what usb_modeswitch.tcl contains.
....
Mmmm, it's a bit difficult for me to clearly understand it... and why gsmmodem links is not created, nor I have any ttyUSB related log file
Anyway I'll try to re-read it....
If you can already says something about log I posted, let me know...
Thank again,
see you!
Let's clean all old logs:
Code: Select all
# rm /var/log/usb_modeswitch_*
Code: Select all
[ 8480.942782] usb 2-4.1: new high-speed USB device number 12 using ehci-pci
[ 8481.023404] usb 2-4.1: New USB device found, idVendor=2020, idProduct=0002
[ 8481.023409] usb 2-4.1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 8481.023412] usb 2-4.1: Product: MT6225
[ 8481.023415] usb 2-4.1: Manufacturer: Network Connect
[ 8481.023417] usb 2-4.1: SerialNumber: 531598307853860
[ 8481.024113] usb-storage 2-4.1:1.0: USB Mass Storage device detected
[ 8481.024336] scsi host15: usb-storage 2-4.1:1.0
[ 8482.044907] usb 2-4.1: USB disconnect, device number 12
[ 8482.734788] usb 2-4.1: new high-speed USB device number 13 using ehci-pci
[ 8482.828280] usb 2-4.1: New USB device found, idVendor=2020, idProduct=4000
[ 8482.828284] usb 2-4.1: New USB device strings: Mfr=9, Product=10, SerialNumber=0
[ 8482.828287] usb 2-4.1: Product: MT6225
[ 8482.828290] usb 2-4.1: Manufacturer: Network Connect
[ 8482.831077] cdc_mbim 2-4.1:1.0: cdc-wdm1: USB WDM device
[ 8482.831318] cdc_mbim 2-4.1:1.0 wwan1: register 'cdc_mbim' at usb-0000:00:04.1-4.1, CDC MBIM, e6:28:27:10:ea:90
[ 8482.832121] option 2-4.1:1.2: GSM modem (1-port) converter detected
[ 8482.832263] usb 2-4.1: GSM modem (1-port) converter now attached to ttyUSB3
[ 8482.832975] option 2-4.1:1.3: GSM modem (1-port) converter detected
[ 8482.833097] usb 2-4.1: GSM modem (1-port) converter now attached to ttyUSB4
[ 8482.833851] option 2-4.1:1.4: GSM modem (1-port) converter detected
[ 8482.833932] usb 2-4.1: GSM modem (1-port) converter now attached to ttyUSB5
[ 8482.834352] option 2-4.1:1.5: GSM modem (1-port) converter detected
[ 8482.834433] usb 2-4.1: GSM modem (1-port) converter now attached to ttyUSB6
[ 8482.834807] usb-storage 2-4.1:1.6: USB Mass Storage device detected
[ 8482.834879] scsi host16: usb-storage 2-4.1:1.6
[ 8483.838931] scsi 16:0:0:0: Direct-Access UsbModem Storage Disk 6225 PQ: 0 ANSI: 0 CCS
[ 8483.853161] sd 16:0:0:0: [sdd] Test WP failed, assume Write Enabled
[ 8483.855162] sd 16:0:0:0: [sdd] Asking for cache data failed
[ 8483.855166] sd 16:0:0:0: [sdd] Assuming drive cache: write through
[ 8483.856784] sd 16:0:0:0: [sdd] Attached SCSI removable disk
Code: Select all
# ls /var/log/usb_*
/var/log/usb_modeswitch_2-4.1
Now we can open that log file and read what contains...
Code: Select all
USB_ModeSwitch log from Tue May 12 12:10:00 CEST 2015
Use global config file: /etc/usb_modeswitch.conf
Raw args from udev: /2-4.1
Use top device dir /sys/bus/usb/devices/2-4.1
Check class of first interface ...
Interface class is 08.
----------------
USB values from sysfs:
manufacturer Network Connect
product MT6225
serial 531598307853860
----------------
ConfigList: /usr/share/usb_modeswitch/2020:0002
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/2020:0002
! matched. Read config data
config: TargetVendor set to 2020
config: TargetProductList set to 2000,4010,4000
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Device may have an MBIM configuration, check driver ...
driver for MBIM devices is available
Find MBIM configuration number ...
No MBIM configuration found, switch to legacy modem mode
Command to be run:
usb_modeswitch -W -D -s 20 -b 2 -g 12 -v 2020 -p 0002 -f $configBuffer
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.0 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x2020
DefaultProduct= 0x0002
TargetVendor= 0x2020
TargetProductList="2000,4010,4000"
MessageContent="555342430820298900000000000003f0010100000000000000000000000000"
NeedResponse=0
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Use given bus/device number: 002/012 ...
Look for default devices ...
bus/device number matched
found USB ID 2020:0002
vendor ID matched
product ID matched
Found devices in default mode (1)
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: Network Connect
Product: MT6225
Serial No.: 531598307853860
-------------------------
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
Reset response endpoint 0x81
Reset message endpoint 0x01
Bus/dev search active, refer success check to wrapper. Bye!
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Check success of mode switch for max. 20 seconds ...
Wait for device file system (1 sec.) ...
Read attributes ...
All attributes matched
Mode switching was successful, found 2020:4000 (Network Connect: MT6225)
Logger is /usr/bin/logger
No vendor-specific class found, skip driver check
Check for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated
All done, exit
I remember first time I attached my the other dongle... Huawei, ttyUSB related log files were created...
As regard tcl script, on my system dispatcher is a binary executable...
Code: Select all
# file /usr/sbin/usb_modeswitch*
/usr/sbin/usb_modeswitch: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
/usr/sbin/usb_modeswitch_dispatcher: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped
....
Mmmm, it's a bit difficult for me to clearly understand it... and why gsmmodem links is not created, nor I have any ttyUSB related log file
Anyway I'll try to re-read it....
If you can already says something about log I posted, let me know...
Thank again,
see you!