Activation Codes and Methods, Hardware Details, Sniffing
Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Fri May 31, 2019 6:46 pm

Finally EnableLogging =1 didn't solve the problem, unless there is some other setting to change.
However, the issue here is not about switching usb storage/mode but that the system detects/ recognises a wrong zte model.

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Josh » Fri May 31, 2019 8:45 pm

Enabling the logging was not supposed to solve the problem.

It is for recording what usb_modeswitch is doing. Look into the folder /var/log - there will be a file named "usb_modeswitch_xxx" where the xxx is some numbers and dots.

Please open the file with "leafpad". Then copy the content here like you did with the file "usb_modeswitch.conf"

Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Thu Jun 06, 2019 7:30 am

I finally found the file and the content is as follows.



USB_ModeSwitch log from Thu Jun 6 07:58:58 2019

Use global config file: /etc/usb_modeswitch.conf


Started via systemd
Raw args from udev: 2-3

Bus ID for device not given by udev.
Trying to determine it from kernel name (2-3) ...
Use top device dir /sys/bus/usb/devices/2-3

USB dir exists: /sys/bus/usb/devices/2-3

SCSI dir exists: /sys/bus/usb/devices/2-3
Warning: SCSI attribute "vendor" not readable.
Warning: SCSI attribute "model" not readable.
Warning: SCSI attribute "rev" not readable.
Use interface /sys/bus/usb/devices/2-3/2-3:1.0
----------------
USB values from sysfs:
idVendor 19d2
idProduct 2000
manufacturer ZTE,Incorporated
product ZTE CDMA Technologies MSM
serial P673A2VDF_MS
bNumConfigurations 1
bConfigurationValue 1
devnum 4
busnum 2
----------------
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*
Searching overriding entries named: /etc/usb_modeswitch.d/19d2:2000*
SCSI attributes not needed, move on.

Extract config 19d2:2000 from collection /usr/share/usb_modeswitch/configPack.tar.gz
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 /run/usb_modeswitch/current_cfg -u -1 -b 2 -g 4 -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: /run/usb_modeswitch/current_cfg

* 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: 002/004 ...
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 CDMA Technologies MSM
Serial No.: P673A2VDF_MS
-------------------------
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
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/2-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 CDMA Technologies MSM
serial: P673A2VDF_MS
bNumConfigurations: 1
bConfigurationValue: 1
devnum: 4
busnum: 2
Mode switching was successful, found 19d2:2000 (ZTE,Incorporated: ZTE CDMA 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

Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Thu Jun 06, 2019 7:59 am

For comparison, i also post here the usb_modeswitch log from the Lenovo machine (as above) where k 3565z is working, .



USB_ModeSwitch log from Thu Jun 6 08:41:07 2019

Use global config file: /etc/usb_modeswitch.conf


Started via systemd
Raw args from udev: 2-1

Bus ID for device not given by udev.
Trying to determine it from kernel name (2-1) ...
Use top device dir /sys/bus/usb/devices/2-1

USB dir exists: /sys/bus/usb/devices/2-1

SCSI dir exists: /sys/bus/usb/devices/2-1
Warning: SCSI attribute "vendor" not readable.
Warning: SCSI attribute "model" not readable.
Warning: SCSI attribute "rev" not readable.
Use interface /sys/bus/usb/devices/2-1/2-1:1.0
----------------
USB values from sysfs:
idVendor 19d2
idProduct 2000
manufacturer ZTE,Incorporated
product ZTE CDMA Technologies MSM
serial P673A2VDF_MS
bNumConfigurations 1
bConfigurationValue 1
devnum 2
busnum 2
----------------
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*
Searching overriding entries named: /etc/usb_modeswitch.d/19d2:2000*
SCSI attributes not needed, move on.

Extract config 19d2:2000 from collection /usr/share/usb_modeswitch/configPack.tar.gz
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 /run/usb_modeswitch/current_cfg -u -1 -b 2 -g 2 -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: /run/usb_modeswitch/current_cfg

* 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"

StandardEject=1
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=0
Success check enabled, max. wait time 20 seconds
System integration mode enabled

Use given bus/device number: 002/002 ...
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 CDMA Technologies MSM
Serial No.: P673A2VDF_MS
-------------------------
Sending standard EJECT sequence
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).
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 3 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 3 (CSW) ...
Response successfully read (0 bytes).
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 ...
USB dir exists: /sys/bus/usb/devices/2-1
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 CDMA Technologies MSM
serial: P673A2VDF_MS
bNumConfigurations: 1
bConfigurationValue: 1
devnum: 2
busnum: 2
Mode switching was successful, found 19d2:2000 (ZTE,Incorporated: ZTE CDMA 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

Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Thu Jun 13, 2019 12:23 pm

Is there something to do with this content :?

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Josh » Mon Sep 30, 2019 9:16 pm

Sorry for the late reply, I was away for personal reasons.

There is an obvious difference between the configurations.

Lubuntu 16.04.6, Dell:

Code: Select all

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
Lenovo:

Code: Select all

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"

StandardEject=1     <===========<
MessageContent="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=0
Someone tampered around with the configuration file. The "StandardEject" switching method is missing on the Dell, so the modem never switches modes.

Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Sun Oct 06, 2019 9:27 am

Thank you for your response.
Do you mean that if i add to StandardEjec=1 this will work ?

Last time i downloaded a new 16.4.06 iso, burned it to a dvd and tested live without installing.
The result was the same in both machines. The modem was not working. It seems someone from Lubuntu maintainers missed something in this vesrion.

From the version 18.4.01 onwards, there is no problem with this modem. Very strange !!

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Josh » Sun Nov 10, 2019 3:39 pm

Without "StandardEject=1", the mode switch will likely not happen. Add it if it's missing.

You can simply copy the content of the Lenovo config into a file named "19d2:2000" in the folder "/etc/usb_modeswitch.d". That should do.

Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Thu Nov 21, 2019 8:14 pm

I will try to see if it works.
Thank you very much Josh. :)

Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Thu Dec 12, 2019 8:39 pm

There is no 19d2L2000 in usb_modeswitch.d folder, so i created one and pasted the content of the lenovo conf file, but it doesn't work either,
unless i' m doing something wrong during the proccedure.

I' m now with the 18.4 version that is ok.
I tried to possibly find what's going on, but never mind.

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Josh » Fri Dec 13, 2019 9:38 am

The file in /etc/usb_modeswitch.d must be named "19d2:2000" - colon, not "L".

If it still doesn't work, what does the log say after you plugged the modem in?

Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Sat Dec 14, 2019 11:37 pm

Sorry, wrong typing. I entered it correctly, 19d2:2000' and i copied/pasted the text from the lenovo usb_modeswitch.conf file
I will see the log again and come back with the content.

Makinen
Posts: 21
Joined: Thu May 16, 2019 12:56 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Makinen » Sun Dec 15, 2019 11:55 am

Here is the workaround about what i did, in case something is wrong.

-first i created an empty file '19d2:2000' as follows:
'sudo -i leafpad /etc/usb_modeswitch.d/19d2:2000'
-then i pasted the content of the correct(lenovo) usb_modeswitch.conf
file and saved it. It's content is the following:
----------
# Configuration for the usb_modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
#
# Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher
#
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"


# Disable automatic mode switching globally (e.g. to access the original
# install storage)

DisableSwitching=0

# Disable check for MBIM module presence and configuration globally (to aid
# special embedded environments)

DisableMBIMGlobal=0

# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_<interface-name>" and probably others

EnableLogging=1


# Optional increase of "delay_use" for the usb-storage driver; there are hints
# that a recent kernel default change to 1 sec. may lead to problems, particu-
# larly with USB 3.0 ports. Set this to at least 3 (seconds) in that case.
# Does nothing if the current system value is same or higher

#SetStorageDelay=4
-------

-Then pluged modem in, The content of the log file is as follows:
----------
USB_ModeSwitch log from Sun Dec 15 11:16:36 2019

Use global config file: /etc/usb_modeswitch.conf


Started via systemd
Raw args from udev: 2-1

Bus ID for device not given by udev.
Trying to determine it from kernel name (2-1) ...
Use top device dir /sys/bus/usb/devices/2-1

USB dir exists: /sys/bus/usb/devices/2-1

SCSI dir exists: /sys/bus/usb/devices/2-1
Warning: SCSI attribute "vendor" not readable.
Warning: SCSI attribute "model" not readable.
Warning: SCSI attribute "rev" not readable.
Use interface /sys/bus/usb/devices/2-1/2-1:1.0
----------------
USB values from sysfs:
idVendor 19d2
idProduct 2000
manufacturer ZTE,Incorporated
product ZTE CDMA Technologies MSM
serial P673A2VDF_MS
bNumConfigurations 1
bConfigurationValue 1
devnum 5
busnum 2
----------------
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*
Searching overriding entries named: /etc/usb_modeswitch.d/19d2:2000*
SCSI attributes not needed, move on.

Use overriden config 19d2:2000 from collection /etc/usb_modeswitch.d
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 /etc/usb_modeswitch.d/19d2:2000 -u -1 -b 2 -g 5 -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: /etc/usb_modeswitch.d/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
NeedResponse=0
Success check enabled, max. wait time 20 seconds
System integration mode enabled

Use given bus/device number: 002/005 ...
Note: No target parameter given; success check limited
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

USB description data (for identification)
-------------------------
Manufacturer: ZTE,Incorporated
Product: ZTE CDMA Technologies MSM
Serial No.: P673A2VDF_MS
-------------------------
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/2-1
All attributes matched
Mode switching was successful, found 19d2:2000 (ZTE,Incorporated: ZTE CDMA 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
----------------

Comments: i wonder if there is something to do with the configPack.tar.gz
file in /usr/share/ directory.
-end-
Do you thing i miss something?

LOM
Posts: 1292
Joined: Wed Jul 11, 2012 3:14 pm
Location: Koh Samui, TH

Re: zte k3565z on Lubuntu 16.04.6

Post by LOM » Sun Dec 15, 2019 1:39 pm

Makinen wrote: Here is the workaround about what i did, in case something is wrong.

-first i created an empty file '19d2:2000' as follows:
'sudo -i leafpad /etc/usb_modeswitch.d/19d2:2000'
-then i pasted the content of the correct(lenovo) usb_modeswitch.conf
file and saved it.
The destination dir /etc/usb_modeswitch.d/ is correct but you don't need to create an empty file there, you only need to
copy the correct file into the dir. usb_modeswitch.conf is NOT a device config file it is a global config file

Makinen wrote: /--- snip /

Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
Searching entries named: /usr/share/usb_modeswitch/19d2:2000*
Searching overriding entries named: /etc/usb_modeswitch.d/19d2:2000*
The device config file can reside in two places, in a pack containing device config files for some 500++ different modems
or it can reside in the override dir etc/usb_modeswitch.d.

Now find your 19d2:2000 device config file in the Lenovo and copy it to the override dir in the Dell and you are all done!

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: zte k3565z on Lubuntu 16.04.6

Post by Josh » Mon Dec 16, 2019 9:31 am

Makinen wrote:Sorry, wrong typing. I entered it correctly, 19d2:2000' and i copied/pasted the text from the lenovo usb_modeswitch.conf file
I will see the log again and come back with the content.
There was a fundamental misunderstanding. DO NOT use the content of the global config file in a device config file.

You need to paste the following into your "19d2:2000" file (copy it from here):

Code: Select all

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"

Post Reply