This is something that i’ve battled with for a little while now, there are several scripts available on the net but I could never get any of them to work. Unfortunately, the MF332 is one of the oldest NextG cards that Telstra use, and it was never officially supported under linux, so information is sparse.
Anyway, i now have 2 methods of getting this card to connect to the internet under Ubuntu:
Method 1: Using pppd
I downloaded the following scripts from the net but I could never get them to connect. After watching what was happening using miniterm in KPPP, I realised that the card needed to be reset most of the time before it would accept any commands. So all I did was added an “ATZ” command to the following script and it works! I’m using this under Ubunto 8.10, but this method will also work under older variants of Ubuntu, and probably other distros as well.
First, create a file “/etc/ppp/peers/ppp0″ and add the following:
connect “/usr/sbin/chat -v -f /etc/chatscripts/ppp0″
/dev/ttyUSB0
# might also try 115200 for the speed
460800
user “User@telstra.pcpack”
defaultroutepersist
usepeerdns
Next, create a file “/etc/chatscripts/ppp0″, and add the following:
ABORT BUSY
ABORT ‘NO CARRIER’
ABORT ERROR
REPORT CONNECT
TIMEOUT 10
“” “ATZ”
“” “AT+CPIN?”
READY-AT+CPIN=XXXX-OK “AT&F”
OK “ATE1″
OK “AT+CGDCONT=1,\042IP\042,\042telstra.pcpack\042″
SAY “Calling Telstra NextG\n”
TIMEOUT 60
OK “ATD*99#”
CONNECT \c
where XXXX is the PIN number for your SIM card. If you don’t have a PIN number, any old 4-digit number will do
To connect, just type
sudo pppd call ppp0
and to disconnect, just type
sudo killall pppd
Method 2: Using NetworkManager
Ubuntu 8.10 included NetworkManager 0.7, which features automatic detection and usage of 3G modems. Unfortunately, the good old MF332 seems to have been forgotten in all of this, but after a bit of tinkering, I managed to find a few things out and get it going. My solution if far from ideal however, so if you have any hints to make this better, please let me know.
When you first plug the card in, Network Manager will recognise it and create a nerw connection under the “Mobile Broadband” tab called “Auto Mobile Broadband (CDMA) connection” You need to edit this connection (or create a new one if you wish), and change the number to “*99#” (ignore the quotes), then press OK.
I identified 3 separate problems with trying to get my MF332 going using NetworkManager
1) I found that I had to disable the PIN on the SIM card. The only way I know how to do that is by using the Telstra Turbo Card Manager in Windows XP, under options-> security settings. This only needs to be done once
2) The second problem is that sometimes (but not always), after plugging the modem in, it needs to be reset, otherwise it just sits there sending back a short string every second or 2. I’ve just been using the miniterm in KPPP to reset it, but I suspect that simply typing “echo ATZ >> /dev/ttyUSB0″ will do it too, although I am yet to confirm this
3) The third problem is that sometimes (but again not always) it would connect successfully, but I could not get anywhere on the web. It turns out that the dns server addresses were not being updated in /etc/resolv.conf. Unfortunately, NetworkManager overwrites this file, so you can’t just set and forget. If you manage to connect, but can’t reach any websites, you either need to try disconnecting/reconnecting to see if the dns servers got added (cat /etc/resolv.conf) or manually enter “nameserver 203.50.2.71″ and “nameserver 139.130.4.4″ to /etc/resolv.conf each time.
I will do some more investigation into this to see if I can automate, but at least it’s working for now. I’m typing this message now while using my MF332 modem.