Broadband & ADSL  Forums - Internet, Gaming, Hardware, Software
Tech News Business Forums Reviews Blogs Companies Classifieds IT Jobs Photos General  
     Control Panel   |    New Posts    |   Calendar   |   RSS   |   Groups   |   Tag Cloud   |   News Headlines   

Go Back   Broadband & ADSL Forums - Internet, Gaming, Hardware, Software > Other Broadband Services > Vodacom Broadband - 3G, HSDPA, Wi-Fi, iBurst > 3G & HSPA Modems in Linux

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 05-06-2005, 05:02 PM
Tazz_Tux Tazz_Tux is offline
Linux Guru
 
Join Date: Jan 2005
Location: New Germany, Durban
Posts: 622
Post Linux - HOWTO (With Stats)

This is a "howto" to get the 3G cards to work under Linux.
This will be a work in progress so expect changes !!!
If you find this how-to useful please post a little message at the end. I would like to put some stats together as to how many people read it, and from where in the world they are. Thanks !


Kernel Version : 2.6.18 + Gentoo Patch set r6 (http://dev.gentoo.org/~dsd/genpatches/)

The following cards/phones works 100% with my scripts/configs:
  • Novatel U630
  • Option Fusion
  • Option Quad
  • Motorola E1000
  • Nokia 6680 (just don't set the speed/service - no 3gonly and 384k configs)
  • Option HSDPA Card
  • Novatel HSDPA Card
  • Huawei Card E620
  • Huawei Card E220
You need to download the new wvdial.conf for the HSDPA stuff to work !!!

I use Gentoo Linux which compiles everything from source. As a result of things might be a bit different but we can work around it. Firstly, we need to get Linux to detect your card, start your PCMCIA services - normally this can be done using (most distros do this for you):

Code:
/etc/init.d/pcmcia start
Before you insert your card, open a console/switch to an open console and as root run the following

Code:
tail -f /var/log/messages
This will allow you to "see" what Linux is doing

Right, now insert your card and you should see some stuff happening. I have included log traces of what the two cards "look" like under /var/log/messages in the attachment section.

If you see only the option_insert_nousb.txt messages using an option card run the following command:

Code:
modprobe usbserial vendor=0x0af0 product=0x5000
If you had to run the above command, you will need to save the vmc_g file attached into /etc/modules.d

Now we need to find out where your card is - you will see in the messages where the card is - /dev/ttyS? for novatel or /dev/ttyUSB? for option

Code:
find /dev/ | grep ttyS
Should show /dev/ttyS0 or /dev/ttyS1 for a Novatel Card.

Code:
find /dev/ | grep ttyUSB
Should show /dev/ttyUSB0 and USB1 and USB2 for an Option Card. (or /dev/tts/ttyUSB0-2 for udev)

Once we found that, we need to change /etc/wvdial.conf to match your settings, attached is my working wvdial.conf. Now we can start dialing up

For Novatel:

Code:
wvdial novatel internet 3gonly 384k
For Option:

Code:
wvdial option internet 3gonly 384k
If you need to send your PIN, add "pin" infront of all the commands, e.g.

Code:
wvdial pin novatel internet 3gonly 384k
Once your connection is up - surf away Now you can setup things like KPPP and Gnome's Modem Lights to do your dialing for you.

Extra Steps for the HSDPA card:

Download the kernel module from the link below. Extract it to a directory somewhere safe. If you are *still* running the 2.4 series of kernels, you need to change the Makefile to reflect this.

Compile the driver using the following commands:

Code:
make clean && make
Once this is done, run the following command to insert the module into the kernel

Code:
insmod nozomi.ko (2.6 Kernel)
insmod nozomi.o  (2.4 Kernel)
Once you have done that, use the following command to setup the connection:

Code:
wvdial hsdpa
Extra steps for the Novatel U740 Card

Until I get time to update the files etc. our Novatel Linux Users out there can just type this command before using the normal dialing command:

Code:
modprobe usbserial vendor=0x1410 product=0x1400
OR

Code:
modprobe usbserial vendor=0x1410 product=0x1410
Using lsusb will show you the Vendor and Product ID's or cat /proc/bus/usb/devices will do the same.I will still add them into the FAQ but atleast this should help for now

This will add the USB's like the 3G Option did - am I seeing a swap here ? - so just dial /dev/ttyUSB0 or so - check the logs

Extra Steps for the Huawei Cards:

None really - just make sure usbserial is loaded and the card will come up on /dev/ttyUSB0 - check the logs again to confirm

If the card doesn't come up, unload usbserial and reload with the following command:

Code:
rmmod usbserial && modprobe usbserial vendor=0x12d1 product=0x1001
I am still trying to work on the USB only card, so at the moment, I don't know if it will work under Linux.

Huawei E220:

I have found that this modem will only work with the short cable supplied...not the long one with two plugs...*shrug*

Same as the E620, except use the following modprobe command:
Code:
rmmod usb-storage
modprobe usbserial vendor=0x12d1 product=0x1003 (Some have reported an ID of 0x1001 - use lsusb to confirm)
After that, you will notice only one USB serial coming up, then, remove the device and re-attach it, you shouldn't need to re-insert usbserial.

Notes:

I have only seen 3G speeds on this device, but I think it is because of my RF conditions and location. More on this to follow...

Attachments:

wvdial.conf
novatel_insert.txt
option_insert_nousb.txt
option_usbserial.txt
vmc_3g
Option HSDPA Driver

FAQ:

Q) How do I enable "Internet Connection Sharing"

A) Since the 2.6 kernel is main stream etc. I will only cover IPTables and Kernel 2.6. I am also assuming that ppp0 is your dialup and eth0 is your lan

Firstly - we need to add some rules to iptables - run the following commands:

iptables -F (This will CLEAR ALL RULES !!!)
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

then we need to enable routing:
echo "1" > /proc/sys/net/ipv4/ip_forward

That should do it - from here you can add rules to block incomming connections etc.

Q) My card is broken/replies "ERROR" to all the commands

A) You didn't send your PIN to the card - either add the "pin" command or disable the PIN on the SIM

Q) My Novatel card is very slow - +-800 bytes per second

A) Try running "setserial -a /dev/ttyS1 low_latency spd_warp" - replace /dev/ttyS1 with your port
Once you have your setserial command, insert it into /etc/ppp/ip-up.local - this will cause the command to be ran everytime a connection is made.

Q) What does all the wvdial sections do/mean?

A)

Defaults - What to do if nothing is selected (Always included)
pin - send your pin to the card
novatel - select the novatel card
option - select the option card
hsdpa - Option HSDPA card
e1000 - select the E1000 via USB
onboard - select the onboard modem of my notebook
internet - select the internet APN
internetvpn - select the internetvpn APN
myapn - select your apn
384k,144k,64k - select the speed of your 3G connection
2gonly - select GPRS only
3gonly - select 3G only

Q) How do I see the usage under Linux

A) Linux Usage

TODO:
  • Make the Option card call "modprobe usbserial" by itself
  • Make the Novatel card register the second port under Linux
  • Do some research into the signal levels reported via +CSQ
  • Get the PIN to work with wvdial and Novatel

Last edited by Tazz_Tux; 02-02-2007 at 09:25 AM.. Reason: Making the wvdial file and this howto the same :)
  #2  
Old 05-06-2005, 05:10 PM
nicroets nicroets is offline
Senior Member
 
Join Date: Apr 2004
Location: http://openstreetmap.org/?lat=-25.77873&lon=28.29320&zoom=13
Posts: 227
Default

Correct me if I'm wrong :
If you use devfs, the device will be either /dev/usb/tts/n (where n in usually 0) or /dev/? for the PC card device...
  #3  
Old 05-06-2005, 05:18 PM
Tazz_Tux Tazz_Tux is offline
Linux Guru
 
Join Date: Jan 2005
Location: New Germany, Durban
Posts: 622
Default

Hey nicroets,

I also thought this, but running devfs and udev I havn't been able to get that to work - I will keep trying and update the thread as needed

EDIT: Corrected wvdial.conf settings - /dev/tts/USB0

Laterz !

Quote:
Originally Posted by nicroets
Correct me if I'm wrong :
If you use devfs, the device will be either /dev/usb/tts/n (where n in usually 0) or /dev/? for the PC card device...

Last edited by Tazz_Tux; 05-06-2005 at 05:40 PM.. Reason: Corrected wvdial.conf
  #4  
Old 06-06-2005, 08:36 AM
Tazz_Tux Tazz_Tux is offline
Linux Guru
 
Join Date: Jan 2005
Location: New Germany, Durban
Posts: 622
Default

Update:

Changed the wvdial.conf file on the server to correctly insert the PIN command - Init1 was getting replaced by ATZ
  #5  
Old 07-06-2005, 01:26 PM
v3gout v3gout is offline
Senior Member
 
Join Date: Mar 2005
Location: Sunninghill, Jhb
Posts: 123
Default

TazzTux - thanks for all this useful info. One more request .... do you know of a way to query the signal strength (3G and/or GPRS) from the card? Is there an AT command for this?
  #6  
Old 07-06-2005, 03:41 PM
Tazz_Tux Tazz_Tux is offline
Linux Guru
 
Join Date: Jan 2005
Location: New Germany, Durban
Posts: 622
Default

Howzit,

The command that I know doesn't seem to work on the Novatel cards which is:

Code:
AT+CSQ
Laterz !

Quote:
Originally Posted by v3gout
TazzTux - thanks for all this useful info. One more request .... do you know of a way to query the signal strength (3G and/or GPRS) from the card? Is there an AT command for this?
  #7  
Old 07-06-2005, 05:00 PM
vodacom3g vodacom3g is offline
Vodacom Representative
 
Join Date: Jan 2005
Location: (mostly) Plattekloof, Cape Town
Posts: 12,066
Default

I noticed in the Novatel documentation +CSQ is 'optional' so not to sure if it is implemented.

What is your firmware version?
  #8  
Old 08-06-2005, 07:31 AM
Tazz_Tux Tazz_Tux is offline
Linux Guru
 
Join Date: Jan 2005
Location: New Germany, Durban
Posts: 622
Default

Hey v3g,

I sport the latest rev14 under the hood

Laterz !

Quote:
Originally Posted by vodacom3g
I noticed in the Novatel documentation +CSQ is 'optional' so not to sure if it is implemented.

What is your firmware version?
  #9  
Old 08-06-2005, 08:13 AM
vodacom3g vodacom3g is offline
Vodacom Representative
 
Join Date: Jan 2005
Location: (mostly) Plattekloof, Cape Town
Posts: 12,066
Default

Not surprised
  #10  
Old 08-06-2005, 10:04 AM
TheCynick TheCynick is offline
Senior Member
 
Join Date: Sep 2003
Location: Atlanta, GA.
Posts: 371
Default

Hey Tazz_Tux,

Have you any experience in using dial-on-demand with the 3g card under Linux? I have a plan that involves an old PC, a 3G card and an 802.11 AP as a homebrew gateway device, and it strikes me that dial-on-demand is crucial to safeguard precious bundled MBs against nasty unsolicited incoming connections
  #11  
Old 08-06-2005, 12:42 PM
Tazz_Tux Tazz_Tux is offline
Linux Guru
 
Join Date: Jan 2005
Location: New Germany, Durban
Posts: 622
Default

Howzit TheCynick,

Why bother - Vodacom issues private IPs so no connection - except from another 3G is open. But if you really wanna - just run iptables and make some rules to block all incoming traffic - except est. and related.

Download webmin and config it via that - VERY nice tool

Laterz !!!

Quote:
Originally Posted by TheCynick
Hey Tazz_Tux,

Have you any experience in using dial-on-demand with the 3g card under Linux? I have a plan that involves an old PC, a 3G card and an 802.11 AP as a homebrew gateway device, and it strikes me that dial-on-demand is crucial to safeguard precious bundled MBs against nasty unsolicited incoming connections
  #12  
Old 21-06-2005, 10:03 PM
pevans pevans is offline
Active Member
 
Join Date: Mar 2005
Posts: 55
Default

Ok, here's a little hickup in my linux setup.

At work I use LAN (eth0) for my internet access. eth0 is configured with static address (no DHCP)
At home I use my Novatel 3G card.

I connect fine with the 3G card using the wvdial.conf above, but it seems like Linux is still trying to use my LAN for Internet access. I can't ping or do DNS lookups or anything.

If I run,

ifdown eth0

and then connect with wvdial then everything works just fine.

What am I missing?

Oh, I'm currently on Ubuntu 5.04
  #13  
Old 22-06-2005, 09:09 AM
Tazz_Tux Tazz_Tux is offline
Linux Guru
 
Join Date: Jan 2005
Location: New Germany, Durban
Posts: 622
Default

Run this command before you connect:

Code:
route -n
Paste the result You might need to delete your default route since pppd will not replace it, something like:

Code:
route del default gw
Laterz !

Quote:
Originally Posted by pevans
Ok, here's a little hickup in my linux setup.

At work I use LAN (eth0) for my internet access. eth0 is configured with static address (no DHCP)
At home I use my Novatel 3G card.

I connect fine with the 3G card using the wvdial.conf above, but it seems like Linux is still trying to use my LAN for Internet access. I can't ping or do DNS lookups or anything.

If I run,

ifdown eth0

and then connect with wvdial then everything works just fine.

What am I missing?

Oh, I'm currently on Ubuntu 5.04
  #14  
Old 22-06-2005, 11:30 AM
pevans pevans is offline
Active Member
 
Join Date: Mar 2005
Posts: 55
Default

Ok,

This is what I get from: route -n

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.1.250   0.0.0.0         UG    0      0        0 eth0
  #15  
Old 22-06-2005, 12:57 PM
Tazz_Tux Tazz_Tux is offline
Linux Guru
 
Join Date: Jan 2005
Location: New Germany, Durban
Posts: 622
Default

Ok,

You have a default route - delete it with:

Code:
route del default gw
Laterz !!!

Quote:
Originally Posted by pevans
Ok,

This is what I get from: route -n

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.1.250   0.0.0.0         UG    0      0        0 eth0
Closed Thread

Forum Sponsor

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:36 AM.


Gaming News | Games Forum | Broadband Deals | Terms & Conditions

© 2009 MyBroadband. All rights reserved.