Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
vodafone UMTS card with nozomi driver
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
morbus
Tux's lil' helper
Tux's lil' helper


Joined: 10 May 2004
Posts: 139
Location: Munich

PostPosted: Thu Aug 24, 2006 10:14 am    Post subject: vodafone UMTS card with nozomi driver Reply with quote

Hi,
If you have a vodafone UMTS-Card and your lspci has a line like the following, this tutorial will help you to set up your
card.

Code:

0b:00.0 Network controller: Option N.V. Qualcomm MSM6275 UMTS chip


First of all, you will need the nozomi driver. I made up an ebuild, have a look at https://bugs.gentoo.org/show_bug.cgi?id=144913.

To use your card, you have to set the PIN every time you plug in your card. I found a script, credits go to http://www.bsdforen.de/showthread.php?t=14600. BTW it is still kinda insecure to have your PIN hardcoded in the file, so you might consider deactivating your PIn anyway. Another solution would be to read the PIN from an encrypted fs.

Don't forget to adjust $pin!

Code:

#!/usr/bin/env perl

use strict;
use warnings;

my $modem = "/dev/noz0";
my $pin = "1234";

$SIG{ALRM} = sub {
        die("timeout: no response from modem $modem\n");
};

open(MODEM, "+<", $modem) or die("can't open modem $modem");
alarm(10);
print(MODEM "AT+CPIN=\"$pin\"\n\r");
while (<MODEM>) {
        if (m/OK/) {
                close(MODEM);
                print("PIN accepted\n");
                exit(0);
        }
        if (m/ERROR/) {
                close(MODEM);
                print("PIN rejected\n");
                exit(1);
        }
}


Now the only thing you still have to do is to setup the ppp-scripts. First, emerge ppp, after that, append the following lines to your /etc/conf.d/net

Code:

###
#UMTS section
###
config_ppp0=( "ppp" )
link_ppp0="/dev/noz0"    
username_ppp0='user'
password_ppp0=
pppd_ppp0=(
   "defaultroute"
   "debug"
)
phone_number_ppp0=( "*99**1#" )
chat_ppp0=(
   'ABORT' 'BUSY'
   'ABORT' 'ERROR'
   'ABORT' 'NO ANSWER'
   'ABORT' 'NO CARRIER'
   'ABORT' 'NO DIALTONE'
   'ABORT' 'Invalid Login'
   'ABORT' 'Login incorrect'
   'TIMEOUT' '5'
   '' 'ATZ'
   'OK' 'AT' # Put your modem initialization string here
   'OK' 'ATDT\T'
   'TIMEOUT' '60'
   'CONNECT' ''
   'TIMEOUT' '5'
   '~--' ''
)


After that start /etc/init.d/net.ppp0 -- UMTS should work now.

Greetings,
Momsen
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Mon Apr 09, 2007 8:03 pm    Post subject: Re: vodafone UMTS card with nozomi driver Reply with quote

thanks it work...but i had to correct the new patch for the 2.6.20 kernel that wasn't made very well
but now it works
Back to top
View user's profile Send private message
xanthax
Tux's lil' helper
Tux's lil' helper


Joined: 16 Apr 2004
Posts: 91
Location: Bi Nary State

PostPosted: Sun May 20, 2007 5:21 pm    Post subject: Reply with quote

I have a Huwahei E220 and i have a 2.6.21-hardened-r1 kernel and i dont get a /dev/noz0

# uname -a
Linux rubberduck 2.6.21-hardened-r1-via #2 Sun May 20 14:32:59 CEST 2007 i686 VIA Esther processor 1500MHz CentaurHauls GNU/Linux

# lsmod
Module Size Used by
nozomi 15312 0
via 36825 2
drm 63385 3 via
via_agp 7757 1

# dmesg | tail -n 1
Initializing Nozomi driver 2.21alpha (build date: May 20 2007 19:52:01)

Used the newest patch and your ebuild.
Any ideas what can be wrong ?
_________________
God is only an imaginary friend for adults...
Back to top
View user's profile Send private message
xanthax
Tux's lil' helper
Tux's lil' helper


Joined: 16 Apr 2004
Posts: 91
Location: Bi Nary State

PostPosted: Sun May 20, 2007 6:19 pm    Post subject: Reply with quote

though i get som strage warnings when emerging it.

Code:

# emerge -av nozomi

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   Rf  ] net-dialup/nozomi-2.21-r1  0 kB [1]

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Fetch Restriction: 1 package
Portage overlays:
 [1] /usr/local/portage

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) net-dialup/nozomi-2.21-r1 to /
 * nozomi_2.21alpha_060917.tar.gz MD5 ;-) ...                                                                                                         [ ok ]
 * nozomi_2.21alpha_060917.tar.gz RMD160 ;-) ...                                                                                                      [ ok ]
 * nozomi_2.21alpha_060917.tar.gz SHA1 ;-) ...                                                                                                        [ ok ]
 * nozomi_2.21alpha_060917.tar.gz SHA256 ;-) ...                                                                                                      [ ok ]
 * nozomi_2.21alpha_060917.tar.gz size ;-) ...                                                                                                        [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                  [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                 [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                [ ok ]
 * checking nozomi_2.21alpha_060917.tar.gz ;-) ...                                                                                                    [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.21-hardened-r1-via
 * Checking for suitable kernel configuration options...                                                                                              [ ok ]
>>> Unpacking source...
>>> Unpacking nozomi_2.21alpha_060917.tar.gz to /var/tmp/portage/net-dialup/nozomi-2.21-r1/work
 * Applying nozomi-2.21-kernel-2.6.20.patch ...                                                                                                       [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917 ...
 * Preparing nozomi module
Warning: Compiling for 2.6:
make -C /usr/src/linux SUBDIRS=/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917 modules
make[1]: Entering directory `/usr/src/linux-2.6.21-hardened-r1'
  CC [M]  /var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.o
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c: In function `nozomi_setup_interrupt':
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c:1517: warning: passing arg 2 of `request_irq' from incompatible pointer type
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c: In function `nozomi_card_init':
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c:1683: warning: cast to pointer from integer of different size
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c:1736: warning: assignment from incompatible pointer type
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c: At top level:
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c:2326: warning: initialization from incompatible pointer type
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c: In function `ntty_tty_init':
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c:2361: warning: assignment from incompatible pointer type
/var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.c:2362: warning: assignment from incompatible pointer type
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.mod.o
  LD [M]  /var/tmp/portage/net-dialup/nozomi-2.21-r1/work/nozomi_2.21alpha_060917/nozomi.ko
make[1]: Leaving directory `/usr/src/linux-2.6.21-hardened-r1'
>>> Source compiled.
>>> Test phase [not enabled]: net-dialup/nozomi-2.21-r1

>>> Install nozomi-2.21-r1 into /var/tmp/portage/net-dialup/nozomi-2.21-r1/image/ category net-dialup
 * Installing nozomi module
>>> Completed installing nozomi-2.21-r1 into /var/tmp/portage/net-dialup/nozomi-2.21-r1/image/

strip: i686-pc-linux-gnu-strip --strip-unneeded
>>> Merging net-dialup/nozomi-2.21-r1 to /
--- /lib/
--- /lib/modules/
--- /lib/modules/2.6.21-hardened-r1-via/
--- /lib/modules/2.6.21-hardened-r1-via/kernel/
--- /lib/modules/2.6.21-hardened-r1-via/kernel/drivers/
--- /lib/modules/2.6.21-hardened-r1-via/kernel/drivers/pci/
--- /lib/modules/2.6.21-hardened-r1-via/kernel/drivers/pci/hotplug/
>>> /lib/modules/2.6.21-hardened-r1-via/kernel/drivers/pci/hotplug/nozomi.ko
>>> Safely unmerging already-installed instance...
--- cfgpro obj /lib/modules/2.6.21-hardened-r1-via/kernel/drivers/pci/hotplug/nozomi.ko
--- cfgpro dir /lib/modules/2.6.21-hardened-r1-via/kernel/drivers/pci/hotplug
--- cfgpro dir /lib/modules/2.6.21-hardened-r1-via/kernel/drivers/pci
--- cfgpro dir /lib/modules/2.6.21-hardened-r1-via/kernel/drivers
--- cfgpro dir /lib/modules/2.6.21-hardened-r1-via/kernel
--- cfgpro dir /lib/modules/2.6.21-hardened-r1-via
--- !empty dir /lib/modules
--- !empty dir /lib
 * Removing net-dialup/nozomi-2.21-r1 from moduledb.
>>> Original instance of package unmerged safely.
 * Updating module dependencies for 2.6.21-hardened-r1-via ...                                                                                        [ ok ]
 * Adding module to moduledb.
 * Have fun :)
>>> net-dialup/nozomi-2.21-r1 merged.

>>> No packages selected for removal by clean
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.
 * GNU info directory index is up-to-date.



Maybe that could help ?
_________________
God is only an imaginary friend for adults...
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Mon May 21, 2007 2:16 pm    Post subject: Reply with quote

mabe try:
Code:
mknod /dev/noz0 c 241 0; mknod /dev/noz1 c 241 1;
mknod /dev/noz2 c 241 2; mknod /dev/noz3 c 241 3
Back to top
View user's profile Send private message
GNUtoo
Veteran
Veteran


Joined: 05 May 2005
Posts: 1919

PostPosted: Thu Aug 02, 2007 9:53 pm    Post subject: Reply with quote

according to https://forums.gentoo.org/viewtopic.php?p=4169657#4169657 we need to use usepeerdns
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
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 vote in polls in this forum