# Gentoo cant connect to Novatel MIFI 2200

## turtles

I have a Novetal MiFi 2200 wireless hot spot. 

I originaly thought it was a problem with ath9k and posted here

But now I have tried a different PCMCIA wireless card with ndiswrapper and several kernels no luck.

DHCP just times out.

Seems it is a problem with dchcp, wireless-tools or Gentoo's network managing.

Since I can connect with a eeepc running some 2.17 kernel and I can connect with OSX.

I have disabled all security etc.

The pertanant lines from conf.d/net are:

```
config_wlan0=( "dhcp" )

essid_wlan1="Turtlevan"
```

Both wireless cards connect to other access points under Gentoo just fine.

Kernels I have tried are:

[14]  linux-2.6.30-gentoo-r6

  [15]  linux-2.6.30-gentoo-r7

  [16]  linux-2.6.31-gentoo-r3 *

Lines from dmesg:

 wlan0: ethernet device 00:03:2f:38:16:78 using NDIS driver: mrv8000c, version: 0x3000036, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 11AB:1FAA.5.conf

[22391.797903] wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK

iwconfig:

lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11g  ESSID:"Turtlevan"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:21:E8:C6:11:C8

          Bit Rate=36 Mb/s   Sensitivity=-200 dBm

          RTS thr=-1 B   Fragment thr=2346 B

          Encryption key:off

          Power Management:off

          Link Quality:95/100  Signal level:-35 dBm  Noise level:-96 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

start up script:

*   Loading networking modules for wlan0

 *     modules: apipa arping tuntap bridge ccwgroup macchanger macnet rename iwconfig essidnet iptunnel ifconfig pppd system dhcpcd ip6to4

 *       iwconfig provides wireless

 *       ifconfig provides interface

 *       pppd provides ppp

 *       dhcpcd provides dhcp

 *   Configuring wlan0 for MAC address 00:03:2F:38:16:78 ...                                   [ ok ]

 *   Configuring wireless network for wlan0

 *   Scanning for access points

 *     Found "Turtlevan" at 00:21:E8:C6:11:C8 (managed)

 *     Found "lightning" at 00:24:01:34:44:00 (managed)

 *     Found "Python" at 00:1C:10:B1:01:D5 (managed, encrypted)

 *     Found "linksys" at 00:14:BF:45:8C:55 (managed)

 *   Connecting to "Turtlevan" in managed mode (WEP Disabled) ...                              [ ok ]

 *     wlan0 connected to ESSID "Turtlevan" at 00:21:E8:C6:11:C8

 *     in managed mode on channel 11 (WEP disabled)

 *   Configuring wlan0 for ESSID "Turtlevan" ...                                               [ ok ]

 *   Bringing up wlan0

 *     dhcp

 *       Running dhcpcd ...

err, wlan0: timed out

warn, wlan0: using IPV4LL address 169.254.87.102                                               [ ok ]

 *       wlan0 received address 169.254.87.102/16

 * Service net.wlan0 started

----------

## NeddySeagoon

turtles,

Your log shows that the interface, scans, associates then fails to get an IP.

The link local IP is a sign that DHCP gave up for some reason.

Some cards need time delays to go from scanning/associating to normal use.

You can see if thats your issue by bringing the interface ip manually with iwconfig and ifconfig.

The time between you typing commands will be plenty. 

Look at Troubleshooting Wireless Tools near the bottom of this page

----------

## turtles

 *NeddySeagoon wrote:*   

> 
> 
> You can see if thats your issue by bringing the interface ip manually with iwconfig and ifconfig.
> 
> 

 

That leaves me guessing as to what IP address the router assigned me. My guess is one more in the 4th section (192.168.1.X) than the device that connected to it last. It gave the imac 2 It probably gave my other card 3. So this card is probably 4

```
iwconfig wlan1 essid Turtlevan

ifconfig wlan1 inet 192.168.1.4
```

ahh

yes we can ping the router and go to its web page.

No www connection past the router.

I do not know how to make a complete connection manually.

No need to be debugging ath9k anymore.

This must be a software bug or a broken package in my system since a user would not any way to benifit from such  a configuration?

That leaves me wondering what piece of software has this bug?

and what version. Since other linux based devices are connecting.

```
equery b /etc/conf.d/net

[ Searching for file(s) /etc/conf.d/net in *... ]

sys-apps/baselayout-1.12.11.1 (/etc/conf.d/net)

```

And secondly how to fix this problem so I can use the internet.

EDIT tried:

```
 modules_wlan1=( "!dhcp" "!ppp" )

essid_wlan1="Turtlevan"

config_Turtlevan=( "default via 192.168.1.4 netmask 255.255.255.0" )

routes_Turtlevan=( "default via 192.168.1.1" )

fallback_route_wlan1=( "default via 192.168.1.4" )

```

no luck

and sleep_associate_wlan1

sleep_scan_wlan1 

-no luck

```
iwconfig wlan1 essid Turtlevan

iwconfig wlan1 commit

Error for wireless request "Commit changes" (8B00) :

    SET failed on device wlan1 ; Operation not supported.
```

----------

## NeddySeagoon

turtles,

You need a defualt route and at least one nameserver in /etc/resolv.conf to get to the internet.

To set a default route do, 

```
route add default gw <IP of Router> 
```

check you have a line in /etc/resolv.conf that reads 

```
nameserver <IP of Router>
```

Put your routers IP address in place of the   <IP of Router> placeholder.

What is your wireless interface called in ifconfig ?

Do you have a symlink of that net.name in /etc/init.d/ ?

If your wireless is wlan0, the symlink will be net.wlan0 for example.  It will point to net.lo

----------

## turtles

Wow that was ffast thanks for the help!

 *NeddySeagoon wrote:*   

> 
> 
> What is your wireless interface called in ifconfig ?
> 
> Do you have a symlink of that net.name in /etc/init.d/ ?
> ...

 

it is wlan1 lrwxrwxrwx 1 root root 6 2009-05-09 11:01 /etc/init.d/net.wlan1 -> net.lo

I think the problem is something to do with:

```
iwconfig wlan1 essid Turtlevan

liwconfig wlan1 commit

Error for wireless request "Commit changes" (8B00) :

    SET failed on device wlan1 ; Operation not supported.
```

```
 ifconfig wlan1 inet 192.168.1.4

SIOCSIFFLAGS: Unknown error 132

ifconfig

eth0      Link encap:Ethernet  HWaddr 00:08:0d:4e:a9:d4

          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:44834 errors:0 dropped:0 overruns:0 frame:0

          TX packets:44129 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:30293087 (28.8 MiB)  TX bytes:6455357 (6.1 MiB)

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:1024 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1024 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:91466 (89.3 KiB)  TX bytes:91466 (89.3 KiB)

iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan1     IEEE 802.11bgn  ESSID:"Turtlevan"

          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated

          Tx-Power=off

          Retry  long limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:on

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0 
```

----------

## NeddySeagoon

turtles,

```
liwconfig wlan1 commit 
```

is not required - as far as I know, the commit command does not exist.

```
ifconfig wlan1 inet 192.168.1.4
```

 should be

```
ifconfig wlan1 192.168.1.4
```

to assign the IP to the interface.

It will also get you the 192.168.1.0/24 route for free but not the default route.

----------

## turtles

Ok thanks! I have 2 different pcmcia cards I can use on this laptop this one uses ath9k the other is older and uses ndiswrapper and is wlan0. I am hoping to hone in on the issue if I use different kernels and cards.

As noted before both cards connect fine to other access points although the ath9k has been buggy hence I am using a recent kernel as I read in other threads. 

Linux lapcat 2.6.31-gentoo-r3 #1 SMP Tue Oct 20 14:56:18 PDT 2009 i686 Intel(R) Celeron(R) CPU 2.60GHz GenuineIntel GNU/Linux

```
ifconfig wlan1 up

SIOCSIFFLAGS: Unknown error 132

ifconfig wlan1 192.168.1.4

SIOCSIFFLAGS: Unknown error 132
```

```
lsmod

Module                  Size  Used by

ath9k                 226148  0

ath                     7348  1 ath9k

dm_crypt               11148  1

sr_mod                 12932  0

snd_intel8x0           26484  0

snd_intel8x0m          12376  0

snd_ac97_codec         91636  2 snd_intel8x0,snd_intel8x0m

cdrom                  30004  1 sr_mod

ac97_bus                1456  1 snd_ac97_codec

parport_pc             22584  0
```

----------

## turtles

I am posting some info here from the OSX imac that I have connected to the sprint MIFI:

```
ifconfig en1

en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

   inet6 fe80::21d:4fff:fef6:c1d0%en1 prefixlen 64 scopeid 0x4 

   inet 192.168.1.3 netmask 0xffffff00 broadcast 192.168.1.255

   ether 00:1d:4f:f6:c1:d0 

   media: autoselect status: active

   supported media: autoselect
```

(I unplugged the network just to make sure.)

OK a work around is:

modprobe ndiswrapper (or ath9k depending what pcmcia card it is) iwconfig wlan0 essid Turtlevan  ifconfig wlan0 192.168.1.2 ifconfig wlan0 broadcast 192.168.1.255  route add default gw 192.168.1.1 echo nameserver 192.168.1.1 > /etc/resolv.conf 

I am now able to post this from the MIFI. Hooraah

The question remains unsolved as how to make gentoo associate with it automatically and securely.

EDIT here are some more things I have tried:

in /etc/conf.d/net

```
essid_wlan0="Turtlevan"

config_wlan0=( "192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1" )

```

 does not set the gateway or dns

I ended up having to write a custom runscript:

File: /etc/init.d/net.wlan0_custom

```

#!/sbin/runscript

#NB: Config is in here

# Distributed under the terms of the GNU General Public License v2

# (C) 2009 By turtles use if you are turtle on turtles laptop or at your own risk.

start() {

iwconfig wlan0 essid Turtlevan

ifconfig wlan0 up

ifconfig wlan0 192.168.1.2

ifconfig wlan0 broadcast 192.168.1.255

route add default gw 192.168.1.1

echo nameserver 192.168.1.1 > /etc/resolv.conf

eend ${?}

}

stop() { ifconfig wlan0 down

eend ${?}

}

```

This works for now.

----------

## NeddySeagoon

turtles,

As I said earlier, I suspect a timing issue.  The link I posted to the handbook contains options fro adding delays to work around this.

What sort of security do you want? 

WEP is almost useless - you will give yourself a false sense of security.

WPK2 is supported by wpa_supplicant but you will have to hunt for the windows patch if you want WPK2 on windows.

----------

## turtles

I attempted the following delays with no luck:

sleep_associate_wlan0="-t 60 "

sleep_scan_wlan0="-t 60 "

dhcpcd_wlan0="-t 60 "

 *gentoo handbook wrote:*   

> iwconfig_eth0  See the iwconfig man page for details on what to send iwconfig 
> 
>   iwpriv_eth0  See the iwpriv man page for details on what to send iwpriv 
> 
>   sleep_scan_eth0  0   The number of seconds to sleep before attempting to scan. This is needed when the driver/firmware needs more time to active before it can be used. 
> ...

 

What in the baselayout app is responsible for setting the route, netmask and gateway? ifconfig?

If that is dhcpcd then perhaps it is configured wrong somewhere else on my part?

Or could I have some incompatable versions of packages?

I have 

```
[I] sys-apps/net-tools

     Available versions:  1.60-r13 1.60_p20071202044231-r1 ~1.60_p20090728014017-r1 {nls static}

     Installed versions:  1.60_p20071202044231-r1(10:09:13 PM 11/22/2008)(nls -static)

     Homepage:            http://net-tools.berlios.de/

     Description:         Standard Linux networking tools

lapcat conf.d # eix dhcpcd

[D] net-misc/dhcpcd

     Available versions:  [m]4.0.7 [m]4.0.13 [m]~4.0.15 [m]~5.0.4 [m]~5.0.5 [m]~5.0.6 [m]~5.1.0 [m]~5.1.1 [m]~5.1.2 {compat zeroconf}

     Installed versions:  3.2.3(12:56:47 AM 12/07/2008)(zeroconf -vram)

     Homepage:            http://roy.marples.name/projects/dhcpcd/

     Description:         A fully featured, yet light weight RFC2131 compliant DHCP client

lapcat conf.d # eix baselayout

[I] sys-apps/baselayout

     Available versions:  [P]1.11.15-r3 1.12.11.1 ~1.12.12 ~1.12.13 ~2.0.0 ~2.0.1 {bootstrap build static unicode}

     Installed versions:  1.12.11.1(01:07:04 AM 12/07/2008)(unicode -bootstrap -build -static)

     Homepage:            http://www.gentoo.org/

     Description:         Filesystem baselayout and init scripts

```

I even called sprint tech support. (They said they do support linux unlike other carriers)

(The only thing that works right now is my hacked init script)

Thank you again for helping get it working!

RE security: The MIFI has a 5GB per month limit. I dont know what they do if I go over 5GB.  I can probably log how much i have used some how but it would be nice to not share it with the public. 

However the very weak WEP is fine for me I have used it for years it keeps the masses out.

I am open to trying wpa_supplicant but I have not had anyluck with linux support in the past.

I have 2 pcmcia wireless cards and one is a Dlink DWA-642 it uses the ath9k driver the other is a Marvell chipset ndiswrapper or a opensolaris driver which I cant get to compile ( I have an abandned post here some where about it)

If that supports some sort of WEP then I would try it.

I have done research in the past and not found definitive evidence that wpa_supplicant works with ath9k driver.  

Thanks

Turtle

----------

