To Thread - Forum Home

The Mudcat Café TM
https://mudcat.org/thread.cfm?threadid=165102
13 messages

Tech: USB_Modeswitch. Can anyone help?

21 Oct 18 - 07:48 AM (#3957674)
Subject: Tech: USB_Modeswitch. Can anyone help?
From: Stanron

I've just seen Steve Shaw's post in the 'TRY to post' thread about 4G. It reminded me that maybe there is help to be found here for a problem I have had for a while.

I've been using mobile broadband instead of landline broadband for a year now, but it's all on 3G. I have a 4G mobile dongle thing that works fine on Windows but not on Linux. On Linux it thinks it is a memory stick and needs a program called USB_Modeswitch to change it into a modem.

I can find the device using lsusb. I can get USB_Modeswitch to look at the device OK but I can't get it to switch. Can anyone help?


21 Oct 18 - 12:03 PM (#3957696)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: DaveRo

I encountered something like this back in the early days of wlans - a network adapter that emulates a storage device from which it downloads its Windows driver. I didn't know about switchable devices though. I wouldn't have thought that the manufacturer would make them switchable unless they intended to support Linux (or Mac?) in which case you'd think they would publish a howto.

You need to find out what chipset the thing uses: if there's no kernel module for that then you're not going to be able to use it even if you can switch it. Back then we used ndiswrapper to encapsulate windows drivers - I don't know whether that's still maintained or whether there is a more modern equivalent.

What's the device - as written on it (inc version) and the IDs reported by lsusb (often different to what's written on it!) NetOps like Vodafone often source cheap dongles from obscure (but often huge) Chinese manufacturers. You'll be lucky if they work outside Windows

(This should be below the line, I guess.)


21 Oct 18 - 12:12 PM (#3957699)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: Stilly River Sage

Does your mobile system go through a router in the house? Can you run a cable for the Linux side of things directly from the router to the computer, or are you dealing only with "dongles" that pick up the signal from towers in the area with no other hardware?


21 Oct 18 - 12:24 PM (#3957703)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: GUEST,Jon

I'd not heard of these but From the USB_usb_modeswitch man page:

Several new USB devices have their proprietary Windows drivers onboard, most of them WAN dongles. When plugged in for the first time, they act like a flash storage and start installing the Windows driver from there. If the driver is already installed, it makes the storage device disappear and a new device, mainly composite with modem ports, shows up.

On Linux, in most cases the drivers are available as kernel modules, such as "usbserial" or "option". However, the device shows up as "usb-storage" by default. usb_modeswitch can send a provided bulk message (most likely a mass storage command) to the device which is known to initiate the mode switching.


I don't think I'll be able to help but I agree with DaveRo that the first step is to find out exactly what the device is. There may also be some messages from dmesg that could be useful.


21 Oct 18 - 12:52 PM (#3957709)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: Dave the Gnome

Get a 4G router instead of a USB dongle. They are about £100 on Amazon. Is it worth spending time trying to get a poorer solution working? Alternatively, leave the USB dongle plugged into your windows box and set it up as a mobile hotspot.


21 Oct 18 - 01:07 PM (#3957714)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: Stanron

There is no other router. I got rid of my landline a year ago. The device is a USB mobile internet modem. The same sort of thing that gets internet on a phone through a sim card.

Written on the Device is

'4G LTE USB Modem F
DL:100Mbps UL:50Mbps'

various symbols and 'RoHS'

lsusb identifies it as

Bus 003 Device 005: ID 05c6:f000 Qualcomm, Inc.


05c6    is the Vendor id and

f000    is the product id.

$ sudo usb_modeswitch -v 05c6 -p f000 -i 0

gets


Look for default devices ...
   product ID matched
Found devices in default mode (1)
Access device 003 on bus 003
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Qualcomm, Incorporated
    Product: Qualcomm CDMA Technologies MSM
Serial No.: 1234567890ABCDEF
-------------------------
Warning: no switching method given. See documentation
-> Run lsusb to note any changes. Bye!

I can't work out from the documentation what to do next.


21 Oct 18 - 01:14 PM (#3957717)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: DaveRo

Dave the Gnome wrote: Get a 4G router instead of a USB dongle.
Yes, that's a good idea. But it's always worth spending time trying to get something something you already have working. That's how you learn stuff.


21 Oct 18 - 01:29 PM (#3957719)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: DaveRo

That 'f000' looks odd. But it looks like someone's got this working
https://github.com/digidietze/usb-modeswitch-data/blob/master/usb_modeswitch.d/05c6:f000
I'll look further tomorrow.


21 Oct 18 - 01:33 PM (#3957720)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: Dave the Gnome

Dave, I am 65. My time is worth far more than £100 on Amazon :-)

Stanron. Just look up 4G router. It is like your dongle but will service a number of devices using WiFi.


21 Oct 18 - 01:48 PM (#3957726)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: Stanron

Hi Dave the Gnome. I've just looked up a few 4G Routers on Ebay. A lot cheaper than £100. However I would prefer to get what I've got working rather than fork out for something new.

DaveRo,

"
# Siptune LM-75 ("LinuxModem")

TargetVendor= 0x05c6
TargetProduct= 0x9000

MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
"

This looks like a .conf file I've have come across before, I'd swap my Vendor and Product numbers, but what do I do with it?

Tomorrow I expect to get a new data sim so I can have the working 3G dongle in one machine to explore and the 4G dongle in another to experiment.

Cheers

Stan


21 Oct 18 - 01:56 PM (#3957729)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: Dave the Gnome

Aye, I saw same for about £70 but I did not want to set expectations too high. Or low :-)


21 Oct 18 - 02:07 PM (#3957731)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: GUEST,Jon

I'd guess you try adding them to your command line to start with. Going by the man page. -V for target vendor, -P for target product and -M for the message.


21 Oct 18 - 03:23 PM (#3957747)
Subject: RE: Tech: USB_Modeswitch. Can anyone help?
From: DaveRo

I think that the GIT entry means that a 05c6:f000 is really a 05c6:9000:
http://www.linux-usb.org/usb.ids

With luck it'll be handled by this:
https://cateee.net/lkddb/web-lkddb/USB_SERIAL_QUALCOMM.html