Author Message

<  Everything Coding  ~  usb_modeswitch on win32

PostPosted: Thu Jan 29, 2009 7:12 pm Reply with quote
Posts: 4 Joined: Thu Jan 29, 2009 7:06 pm
Hi all.

I'm looking for a similar tool in win32 environment, under Windows XP.

usb_modeswitch can be compiled and used in win32? Any suggestions?

I'm not too expert in C language, so any help is greatly appreciated.

Bye


Offline
PostPosted: Sat Jan 31, 2009 10:55 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
I doubt you can use libusb on MS Windows (closed source USB sytem). I won't try it, that's for sure.

You might find USB analyzing programs for MS Windows that are able to send commands. I suggest using Google & Co.


Offline
PostPosted: Sun Feb 01, 2009 6:15 pm Reply with quote
Posts: 4 Joined: Thu Jan 29, 2009 7:06 pm
I found libusb-win32. I'll give it a try.

I have an mt503hs (onda). If I'm right, I must only send the command at specific offset, or not?


Offline
PostPosted: Sun Feb 01, 2009 7:25 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
I'm a bit confused about what you are trying to achieve. The whole problem with these devices is only related to other operating systems than MS Windows; the whole point is that on that system they work out of the box with their drivers on board.

Why would you want to switch them in Windows?


Offline
PostPosted: Sun Feb 01, 2009 10:46 pm Reply with quote
Posts: 4 Joined: Thu Jan 29, 2009 7:06 pm
Good news: I did it.

First of all - WHY
Simple: the software provided with MT503HS is unusable. The gui is ugly and you can use it only by mouse. Then, I want a way to automate dialup process and this is impossible using original software

And then - HOW
First of all, usb_modeswitch compiles like a charm in mingw using libusb-win32. The only error it gave was about "sleep as implicit function".

But usb_modeswitch can't claim the mt503hs, because it is used by Win as a storage device.

So, to do the trick you must (to be verified from scratch):
1) let Win install the drivers as usual
2) create a dialup connection using "onda usb proprietary modem"
3) eject the mt503hs using Explorer
4) locate and open the control interface to mt503hs - seen by "Onda NMEA Device" COM port
5) send init commands (surely AT+ZOPRT=5) and the APN selection commands
6) open the dialup connection

That's all, mate, you're on the net!

The only annoying thing (I'm testing yet) is that every three seconds on the NMEA port there is a +ZUSIMR:2 message.

Every man has a target: if he ask for help, don't discuss about the target, but give him help, if you want and you can.


Offline
PostPosted: Mon Feb 02, 2009 12:56 am Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
maiux wrote:
Every man has a target: if he ask for help, don't discuss about the target, but give him help, if you want and you can.

I strongly support that view. You made your point clear enough, and my confusion dissolved into nothingness.
8)

I'm amazed and thrilled that it's even possible to use USB_ModeSwitch with Windows. Thanks for the pioneering work!

Did you try to unmount the storage device from the task bar (not just ejecting) before trying to switch? Did you run with admin rights?

I will do some experimenting myself.


Offline
PostPosted: Mon Feb 02, 2009 4:06 pm Reply with quote
Posts: 4 Joined: Thu Jan 29, 2009 7:06 pm
I tried: if I dismount using "safely remove hardware", it will dismount the whole device, so the ONDA NMEA interface isn't accessible anymore.

I'll ask you a thing: ejecting in linux? What happens?

I know it's strongly driver-implementation dependent!


Offline
PostPosted: Mon Feb 02, 2009 11:37 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
I know that some people switch by ejecting; some others take usb_modeswitch to detach the storage driver and then eject with the separate command line tool of the same name.

The "MessageString" for devices that can be switched by ejecting is basically the storage (SCSI) command for "Eject", which is itself one of the possible START/STOP commands.

Unfortunately, there is no clear picture emerging what works best. It seems to be dependent on the specific system.


Offline
PostPosted: Sat Nov 06, 2010 11:50 pm Reply with quote
Posts: 1 Joined: Sat Nov 06, 2010 11:37 pm
Can you please share the win32 binary somewhere? I would be great to have such a tool available under Windows!

Right now, installing several different datacards in the same computer is an absolute pain. Different driver versions, different crappy "Mobile Partner" stupid tools from braindead network operators that never work correctly... Sigh! It's a horrible mess!

I wish I could simply install one set of the latest drivers and then double click a tool that would switch the card into "modem mode".

You say that Linux users are screwed because vendors forget to support you. But I say that's the other way around: windows users ARE ROYALLY SCREWED because the vendors do their best to shove utter crap down our throats!! :(

Heck, I would love to have a tool that would PERMANENTLY flash the firmware of these damned datacards to behave ALWAYS like a modem.

And to the "smart ass" guy who invented the "Zero-CD" stupid idea: please execute him. Please, I WOULD PAY MONEY TO HAVE THAT GUY KILLED!!!


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
9 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron