I have installed usb-modeswitch but am unable to install usb-modeswitch-data.
How do I find out why?
The error msg just says 'Cannot install'.
The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
I have installed usb-modeswitch but am unable to install usb-modeswitch-data.
How do I find out why?
The error msg just says 'Cannot install'.
opkg update
opkg list | grep usb-modeswitch
Note: as of r36812, usb-modeswitch package had been under major overhaul from ordinary draisberghof usb_modeswitch found in many linux distributions. usb-modeswitch-data is included in the package, with the new json format.
opkg update opkg list | grep usb-modeswitch
Just noticed....on Arch Linux it's called usb_modeswitch .... notice the subtle difference?
On my OpenWrt box it says
Package usb-modeswitch (2017-05-24-453da8e5-1) installed in root is up to date.
So am not sure about what usb-modeswitch-data is supposed to be...
On Arch Linux, all the Vid/Pids are in /usr/share/usb_modeswitch. I don't see an equivalent directory on OpenWrt.
So am not sure about what usb-modeswitch-data is supposed to be...
This package doesn't exist any more (only usb-modeswitch available): https://openwrt.org/packages/table/star … modeswitch
https://openwrt.org/docs/guide-user/network/wan/wwan/3gdongle wrote:Note: as of r36812, usb-modeswitch package had been under major overhaul from ordinary draisberghof usb_modeswitch found in many linux distributions. usb-modeswitch-data is included in the package, with the new json format.
I've never come across the json format and don't really know what it is.
I did notice that /etc/usb-mode.json does contain various pairs of strings which must be Vid/Pid combinations, but I don't see 12d1:14dc...
Just re-read post https://forum.openwrt.org/viewtopic.php … 53#p373053 which shows that modeswitching has already taken place. the original Vid/Pid of 12d1:1f01 being present in /etc/usb-mode.json.
I guess the way modeswitching takes place is beginning to sink in finally, but is this action logged by the system anywhere?
Just re-read post https://forum.openwrt.org/viewtopic.php … 53#p373053 which shows that modeswitching has already taken place. the original Vid/Pid of 12d1:1f01 being present in /etc/usb-mode.json.
I guess the way modeswitching takes place is beginning to sink in finally, but is this action logged by the system anywhere?
Yes. dmesg.
balanga wrote:Just re-read post https://forum.openwrt.org/viewtopic.php … 53#p373053 which shows that modeswitching has already taken place. the original Vid/Pid of 12d1:1f01 being present in /etc/usb-mode.json.
I guess the way modeswitching takes place is beginning to sink in finally, but is this action logged by the system anywhere?
Yes. dmesg.
After re-inserting the modem dmesg shows:
USB Mass Storage device detected
Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
Attached SCSI removable disk
... nothing about usb-modeswitch or modem/network...
(Last edited by balanga on 13 Mar 2018, 19:51)
What's in /dev that wasn't there before?
After following https://openwrt.org/docs/guide-user/net … rusb_rndis I've installed
kmod-usb-net-rndis and now dmesg includes
eth1: unregister 'cdc_ether' usb-ehci-platform-1.1, CDC Ethernet Device
What's in /dev that wasn't there before?
Can't see anything, but didn't have a directory listing to compare....
What sort of thing should I be looking for?
I see -ptmx and +sda have recent timestamps. Never noticed them before.
Can't see anything, but didn't have a directory listing to compare....
So take one. Grab the contents of /dev, then plug the device in, then grab the contents of /dev again.
What sort of thing should I be looking for?
Something that appears after you plug the device in, but isn't there when the device isn't plugged in.
balanga wrote:Can't see anything, but didn't have a directory listing to compare....
So take one. Grab the contents of /dev, then plug the device in, then grab the contents of /dev again.
balanga wrote:What sort of thing should I be looking for?
Something that appears after you plug the device in, but isn't there when the device isn't plugged in.
The only thing I can spot is the creation of this entry under /dev - no idea what it is
brw------- 1 root root 8, 0 Mar 15 09:14 sda
The only thing I can spot is the creation of this entry under /dev - no idea what it is
brw------- 1 root root 8, 0 Mar 15 09:14 sda
When I look ar the directory listing for /dev now, it seems obvious that sda refers to a storage device, ie my Huawei E3372 which is seen as an attached SCSI removable disk, so it looks like usb_modeswitch has not done what is expected.
BTW is 'blkid' or 'lsblk' not available on OpenWrt?
BTW is 'blkid' or 'lsblk' not available on OpenWrt?
opkg update
opkg list | grep blkid
opkg list | grep lsblk
(Last edited by 600cc on 16 Mar 2018, 13:50)
Ok so now I run
root@LEDE:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mtdblock0 31:0 0 128K 1 disk
mtdblock1 31:1 0 1.2M 1 disk
mtdblock2 31:2 0 6.6M 1 disk /rom
mtdblock3 31:3 0 4.4M 0 disk /overlay
mtdblock4 31:4 0 64K 1 disk
mtdblock5 31:5 0 7.8M 0 disk
So where is sda?
Ok so now I run
root@LEDE:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mtdblock0 31:0 0 128K 1 disk
mtdblock1 31:1 0 1.2M 1 disk
mtdblock2 31:2 0 6.6M 1 disk /rom
mtdblock3 31:3 0 4.4M 0 disk /overlay
mtdblock4 31:4 0 64K 1 disk
mtdblock5 31:5 0 7.8M 0 diskSo where is sda?
Is /dev/sda attached to a mount point?
It seems like something isn't set up correctly... When I plug in a different Modem several /dev/ttyUSB* devices appear... With the E3372 it shows /dev/sda.
Seems like I'm missing a step... Should usb-modeswitch initiate creation of a /dev/ttyUSB* device?
Usb-modeswitch attempts to turn off the storage mode in the device and restart it fully in modem mode. This may be necessary before the modem drivers can detect and attach to the modem mode.
Usually there is a way to change the non-volatile configuration in the modem to turn off storage mode "permanently". This is preferable.
Should usb-modeswitch initiate creation of a /dev/ttyUSB* device?
Depends.
Is it an E3372s, which behaves as a serial device?
Is it an E3372h, which behaves as an Ethernet device?
The discussion might have continued from here.