How to switch a USB Modem from storage to Modem

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
tytower
 
Posts: 61
Joined: Fri Sep 18, 2009 12:47 am

How to switch a USB Modem from storage to Modem

Post by tytower »

I'm experimenting with the above and its plugged into an arduino board with a USB host shield attached and fixed with a bridging wire from D7 to reset so the recent Version 2 of USB Host Library works on it.

I have to pass the string "HueweiMode=1" to the device which is plugged into the shield
Just passing the string from a sketch does not seem to work

Anyone got any ideas?

User avatar
cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Re: How to switch a USB Modem from storage to Modem

Post by cstratton »

Unless you are following in the footsteps of someone else who has already made this work on the arduino host shield, perhaps you should start by understanding how the modem is normally utilized by a PC - for example, see if it has a linux (or otherwise open source) driver that you can study.

User avatar
tytower
 
Posts: 61
Joined: Fri Sep 18, 2009 12:47 am

Re: How to switch a USB Modem from storage to Modem

Post by tytower »

I am intrigued by what you say.
The driver is installed in the device and windows reads it and sets it up as a storage device , an optical device and a modem.On Linux I think USB-modeswitch does the switching to modem , the storage area comes up as a removable drive and the optical device as a CD.

So what I need help on is sending the switch over to modem command when usb_modeswitch is not available as will be the case when plugged autonymously into a sparkfun USB host shield on a Duemielanove Arduino Board

User avatar
cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Re: How to switch a USB Modem from storage to Modem

Post by cstratton »

So what I need help on is sending the switch over to modem command when usb_modeswitch is not available as will be the case when plugged autonymously into a sparkfun USB host shield on a Duemielanove Arduino Board
You have an open source example in usb modeswitch or whatever linux uses to accomplish it. Granted, you may have to take some time to understand the kernel interfaces it is using to accomplish things and then translate those to the context of how you would do things with the arduino host shield.

User avatar
tytower
 
Posts: 61
Joined: Fri Sep 18, 2009 12:47 am

Re: How to switch a USB Modem from storage to Modem

Post by tytower »

OK Anybody else got any ideas?

darkcity
 
Posts: 1
Joined: Wed Nov 02, 2011 2:52 pm

Re: How to switch a USB Modem from storage to Modem

Post by darkcity »

this thread may help you :D
http://murga-linux.com/puppy/viewtopic.php?t=72980

including typo huawei

User avatar
tytower
 
Posts: 61
Joined: Fri Sep 18, 2009 12:47 am

Re: How to switch a USB Modem from storage to Modem

Post by tytower »

No that is just a link to my post on another forum and does not solve my problem
I thought I made it clear that usb_modeswitch switches it OK but will not be available.

User avatar
cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Re: How to switch a USB Modem from storage to Modem

Post by cstratton »

tytower wrote:I thought I made it clear that usb_modeswitch switches it OK but will not be available.
In which case you have the ingredients of a solution, you just need to take time to understand that open source program and write something for your arduino that does the same USB operations. In particular, look at the switchHuaweiMode() function, figure out what it is pulling in from headers, and what if anything you need to do before or after that.

User avatar
tytower
 
Posts: 61
Joined: Fri Sep 18, 2009 12:47 am

Re: How to switch a USB Modem from storage to Modem

Post by tytower »

If you have done this then why not just fully explain what you have done ?
If you havn't then thanks for your input and lets leave it at that.

I'm looking for somebody who can explain how to do it, not a generalisation hinting it might be possible

User avatar
cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Re: How to switch a USB Modem from storage to Modem

Post by cstratton »

I'm not witholding information from you - it's not a project I have done, though I did go as far as to look through the code after our last go-around and satisfy myself that the needed information is there.

But I think it's unfortunate that you prefer to leave the question sitting here for a couple of weeks rather than make an effort to solve the problem yourself using the sufficient resources that are available to you.

User avatar
tytower
 
Posts: 61
Joined: Fri Sep 18, 2009 12:47 am

Re: How to switch a USB Modem from storage to Modem

Post by tytower »

So what you like to do is just hint at a solution rather than give it . OK thats fine but now perhaps allow somebody else to have a go at actually answering the question, which is why I posted it here in the first place .

I don't need or want your opinion on whether I should look deeper into your hinted direction. I seek an answer not a clue.

User avatar
tytower
 
Posts: 61
Joined: Fri Sep 18, 2009 12:47 am

Re: How to switch a USB Modem from storage to Modem

Post by tytower »

cstratton wrote: I did go as far as to look through the code after our last go-around and satisfy myself that the needed information is there.
.
If you wish to answer the question then exactly what code are you talking about?

Its a bit like a car mechanic saying well I know that the gearbox is about to drop out of your car and I know how to fix it although I havn't done one of that model before but I am not going to explain it to you , go look for yourself !

Why do you waste your time and mine?
In addition. because there are answering posts, other people now stay away because they think the problem is sorted

User avatar
cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Re: How to switch a USB Modem from storage to Modem

Post by cstratton »

I named the function you would likely need to port in my previous post. Have you looked at its code yet?

If you want the problem solved for you, post it over in the jobs section. I estimate it would take several hours plus the expense or loan of test hardware. You might do better with something like a beagle bone (or in a few months, rasberry pi) where you could just use the linux driver and utilities as is.

bigmessowires
 
Posts: 69
Joined: Sun Jun 05, 2011 7:34 pm

Re: How to switch a USB Modem from storage to Modem

Post by bigmessowires »

tytower, it looks like there is no ready-made Arduino solution. Porting the Linux code that cstratton mentioned is likely your best path.

User avatar
tytower
 
Posts: 61
Joined: Fri Sep 18, 2009 12:47 am

Re: How to switch a USB Modem from storage to Modem

Post by tytower »

Usually when people post such vague statements as this above it means they don't know but they want to appear as though they do.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”