Author Topic: Enabling USB 3G mdem...  (Read 1187 times)

0 Members and 1 Guest are viewing this topic.

Offline SL4PTopic starter

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Enabling USB 3G mdem...
« on: March 09, 2016, 07:59:01 am »
As it stands, most modern USB modems - initialise as a mass-storage device, so the user can install drivers etc.  And only then - toggle an internal state to expose the modem device to the OS.

There is a Linux tool (usb_modeswitch) to disable/modify this function (feature?), but nothing I can see in the embedded or Windows world.

As I haven't used Unix since before most of you were born, and the urgency of this project is  a bit higher - I'm looking for some help in disabling this startup flag - either from Linux - an embedded platform (USB host), or in Windows.

(The linux process is documented - but I have no idea where I am installing and configuring an application under Ubuntu.)

Ultimately, this will become part of my project - to pre-configure the modems before they're installed in various embedded projects and delivered.
I can currently see the USB device desriptors etc under my embedded platform - so the comms is in place and working - I just need to bang the mass-storage instance on the head!

HELP!
Don't ask a question if you aren't willing to listen to the answer.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3885
  • Country: de
Re: Enabling USB 3G mdem...
« Reply #1 on: March 09, 2016, 08:57:35 pm »
AFAIK, all you have to do is to mount and unmount the mass storage device in Linux. Once you unmount it, it will switch modes. The firmware likely detects the "eject media" command. At least this has worked for my 3G dongle I have got few years ago from SFR here in France.

I have checked the source code for usb_modeswitch, but basically all that it does is to send the eject media message if it sees a mass-storage device. There doesn't seem to be anything in there to make the setting permanent - that may not even be possible, it depends on the firmware in the modem and whether there is any writeable storage onboard in the first place.

You could probably do the same and have your target system that will be using these modems reset it and then send the eject as part of the initialization. The code starts from line 716 in usb_modeswitch.c



 

Offline SL4PTopic starter

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Enabling USB 3G mdem...
« Reply #2 on: March 09, 2016, 09:00:46 pm »
thanks for the info...
I read a few posts that refer to 'writing' a specific string into the modem to change the default behaviour, but your info is certainly worth looking into.
thanks again.
Don't ask a question if you aren't willing to listen to the answer.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf