c# interfacing with a USB 3G modem

dirkieman

Well-Known Member
Joined
Apr 21, 2008
Messages
373
Reaction score
0
Location
Pretoria
I would appreciate if anyone would help met getting started on this:
I need to check state, connect and disconnect a 3G Vodafone USB modem.
 
The Vodafone Mobile Connect software that comes with those modems is written in .NET.

Just use Reflector .NET and see what they do for yourself.
 
I would appreciate if anyone would help met getting started on this:
I need to check state, connect and disconnect a 3G Vodafone USB modem.

not a c# coder, but the coding should be the same for any connection, whether it be a Vodafone modem, dialup or dsl.

google will help.
 
not a c# coder, but the coding should be the same for any connection, whether it be a Vodafone modem, dialup or dsl.

google will help.


You could hook into the Windows API to check the connection, but you'd get a lot more information of you asked the modem directly (3G vs HSDPA connection for example).

Choice of language shouldn't be an issue in either option :confused:
 
You could hook into the Windows API to check the connection, but you'd get a lot more information of you asked the modem directly (3G vs HSDPA connection for example).

Choice of language shouldn't be an issue in either option :confused:

I'm sure ginggs will be able to help though, he's pretty clued up with that

but it sounds like the op just wants to check the online status, and be able to connect/disconnect :o
 
You should use a .NET library that allows you to communicate with a serial device.
Using the AT command set for the modem in question will then allow you to
control the modem and/or read the stats that you are interested in.

Example:
1) at+cfun="1,1" Turn on modem
2) at+cpin="0000" enter the sim pin
3) at+cgdcont=1 start 3g/gprs connection
3) at+cops? should give provider details
4) at*enap=0 should turn off 3g/gprs connection
 
Get yourself a "Dialup Networking" or "RAS" library for .net, you'll need it, then research how to dial for gprs (*99# I believe), setup apn's etc...
As far as I understand, the Voda software simply creates a dialup networking connection dynamically and "dials" it.... Dialup Networking then takes care of PPP and IP within the OS realm....

Connecting directory to the virtual serial port of the device won't work unless the voda software isn't running and there's no open connection via dialup networking. Even then, you'll have to handle PPP and IP yourself too....
 
Top
Sign up to the MyBroadband newsletter
X