В одном из форумов в интернете, я прочитал, что причина ошибки может быть в недостаточной мощности запитки USB порта. Решил проверить. Для этого 01.04.2016 я купил USB концентратор с внешним блоком питания. Попробовал, но это не помогло. Надеясь, что мой bug исчезнет в новой версии Ubuntu, вчера 02.04.2016 я скачал бэта версию 16.04 LTE и установил её с чистого листа. Это заняло много времени. Баги в Ubuntu затратны! Они требуют времени и денег. После установки новой версии модем с ходу не завёлся. Печально. Пришлось идти тем же путём и выполнять действия из моего предыдущего поста.
1. Извлёк из архива в папке
/usr/share/usb_modeswitch/ конфигурацинный файл
19d2:2000 и добавил в него строку
ReleaseDelay=3000 в самое начало. Как он теперь выглядит - см. в спойлере:
# ZTE devices
ReleaseDelay=3000
TargetVendor= 0x19d2
TargetProductList="0001,0002,0015,0016,0017,0019,0031,0033,0037,0042,0052,0055,0061,0063,0064,0066,0091,0108,0117,0128,0151,0157,0177,1402,2002,2003"
StandardEject=1
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
Кстати, у извлечённого файла 19d2:2000 владелец и группа должны быть выставлены на
root, а права доступа
-rw-r--r--. Инача, наверное получатся дополнительные сложности, которых хочется избежать. Файл оствляется в той же папке, где и архив. Исходный экземпляр файла в архиве можно не удалять.
2. Второе действие я выполнять не стал. Вместо этого полез в конфигурационный файл
/etc/usb_modeswitch.conf. В нём выставил флаг
EnableLogging=1 и снял комментарий с опции
SetStorageDelay=4.
Эти действия к желаемому результату не привели. Но в файле
usb_modeswitch.log из папки
/var/log/ произошли некоторые изменения. Ошибка
Error-9 сменилась на ошибку
Error-7. Читая этот файл, я увидел, что после ошибки
Error-7 система пытается прикрутить к модему драйвер "
option" и терпит неудачу. Я решил удалить модуль с этим драйвером, в надежде, что система найдёт ему замену. Выполняю команду
sudo rmmod -v optionПока ничего не происходит. Команда
lsmod показывает, что что модуль
option ушёл и ушли зависимости от него, прописанные в модулях
usbserial и
usb_wwan. Выполняю команду
sudo usb_modeswitch -v 0x19d2 -p 0x2000 -Kи получаю ошибку.
Error opening the device. Abort. После этого я решаю наудачу вынуть и вновь вставить модем в USB разъём в концентраторе с внешним питанием. И о чудо! Модем распознался, произошло подключение и заработал интернет. В папке
/dev появились долгожданные устройства
ttyUSB0,
ttyUSB1,
ttyUSB2,
ttyUSB3. Я решил зафиксировать это событие. Выкладываю содержимое log файла
usb_modeswitch.log из папки
/var/log/ в спойлере.
USB_ModeSwitch log from Sun Apr 3 07:53:00 2016
Use global config file: /etc/usb_modeswitch.conf
Started via systemd
Adjust delay for USB storage devices ...
Current value is higher or equal to 4. Leave it alone
Raw args from udev: 3-1.4.3
Bus ID for device not given by udev.
Trying to determine it from kernel name (3-1.4.3) ...
Use top device dir /sys/bus/usb/devices/3-1.4.3
USB dir exists: /sys/bus/usb/devices/3-1.4.3
SCSI dir exists: /sys/bus/usb/devices/3-1.4.3
Warning: SCSI attribute "vendor" not readable.
Warning: SCSI attribute "model" not readable.
Warning: SCSI attribute "rev" not readable.
Check class of first interface ...
Device is in install mode.
Use interface (null)
----------------
USB values from sysfs:
idVendor 19d2
idProduct 2000
manufacturer ZTE,Incorporated
product ZTE WCDMA Technologies MSM
serial MF1800MTSD010000
bNumConfigurations 1
bConfigurationValue 1
devnum 9
busnum 3
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
Searching entries named: /usr/share/usb_modeswitch/19d2:2000*
SCSI attributes not needed, move on.
Use overriden config 19d2:2000 from collection /usr/share/usb_modeswitch
config: TargetVendor set to 19d2
config: TargetProduct set to 0001,0002,0015,0016,0017,0019,0031,0033,0037,0042,0052,0055,0061,0063,0064,0066,0091,0108,0117,0128,0151,0157,0177,1402,2002,2003
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
! matched, now switching
Unbinding driver
Command to be run:
/usr/sbin/usb_modeswitch -W -D -s 20 -c /usr/share/usb_modeswitch/19d2:2000 -u -1 -b 3 -g 9 -v 19d2 -p 2000 2>&1
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are expected in the process)
--------------------------------
Read config file: /usr/share/usb_modeswitch/19d2:2000
* 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= 0x19d2
DefaultProduct= 0x2000
TargetVendor= 0x19d2
TargetProductList="0001,0002,0015,0016,0017,0019,0031,0033,0037,0042,0052,0055,0061,0063,0064,0066,0091,0108,0117,0128,0151,0157,0177,1402,2002,2003"
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=0
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Use given bus/device number: 003/009 ...
Look for default devices ...
bus/device number matched
found USB ID 19d2:2000
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: ZTE,Incorporated
Product: ZTE WCDMA Technologies MSM
Serial No.: MF1800MTSD010000
-------------------------
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
Wait for 3000 ms before releasing interface ...
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Check success of mode switch for max. 20 seconds ... Read attributes ...
USB dir exists: /sys/bus/usb/devices/3-1.4.3
idProduct doesn't match the expected value. ('0001,0002,0015,0016,0017,0019,0031,0033,0037,0042,0052,0055,0061,0063,0064,0066,0091,0108,0117,0128,0151,0157,0177,1402,2002,2003' != '2000')
Attributes are different but target values are unexpected: idVendor: 19d2
idProduct: 2000
manufacturer: ZTE,Incorporated
product: ZTE WCDMA Technologies MSM
serial: MF1800MTSD010000
bNumConfigurations: 1
bConfigurationValue: 1
devnum: 9
busnum: 3
Mode switching was successful, found 19d2:2000 (ZTE,Incorporated: ZTE WCDMA Technologies MSM)Now check for bound driver ...
no driver has bound to interface 0 yet
Device not in "bind_list" yet, bind it now
Module loader is /sbin/modprobe
Try to load module "option"
Module was loaded successfully: 0
Try to add ID to driver "option"
ID added to driver; check for new devices in /dev
driver binding failed
Check for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated
All done, exit
Проблему полностью решённой пока не считаю, поскольку после перезагрузки, скорее всего, удаление модуля
option и переподключение модема придйтся выполнять опять. Это неудобно.