# Trouble connecting via Netgear N150 wifi USB dongle

## Gurt

Hi all,

I just installed Gentoo via Systemrescuecd and everything seems to be fine, except that I can't get my wireless to work. I boot into Gentoo, log in, and the dongle isn't even recognized, ifconfig won't show ist. I configured the kernel to load the appropriate drivers (ath9k_htc, built-in, not as module), emerged the necessary firmware (sys-kernel/linux-firmware), installed and configured wpa_supplicant, edited /etc/conf.d/net to have the peripheral (beautifully named wlp0s29f7u1u2) use dhcp and checked that CONFIG_PACKET is enabled in the kernel. Now I'm at a loss about what else I should do to get it up and running.

It's my first Gentoo install, so kindly bear with me if the question is silly or the solution is trivial...  :Smile: 

Cheers!

----------

## eccerr0r

Well, the fact that you get the wlp0.... device is a good sign... but the question is what's working and what's not working?

Do you get an ip address from dhcp (ifconfig wlp0s29f7u1u2)?  Does localhost at least get set up (ping localhost)?  What are you trying to connect to/What encryption system are you using (WEP? WPA? none)?  Do you receive any packets at all on the interface? (does ifconfig wlp0s29f7u1u2 report packets?)

Any info if you run "iw wlp0s29f7u1u2 info"?

----------

## Gurt

I can only see wlp0s29f7u1u2 from the livecd, if I boot my Gentoo install I can't see it at all.

----------

## NeddySeagoon

Gurt,

Make kernel support for your WiFi as a module, not built it.

If the kernel support in built in, the firmware must be built in too.

You will need sys-kernel/linux-firmware but you also need to tell menuconfig what to include in the kernel binary.

Don't you just love udev and persisand device names wlp0s29f7u1u2?

Yuck.  The name in USB port dependant too.

If you want wlan0 back, you can tell udev to leave your device names alone.

----------

## eccerr0r

Oh... that's different.

So first things first, is USB working (lsusb)?  If you have keyboard, mouse, or especially USB flash storage, that would suffice to say that's working.

Then run dmesg and look for any traces of ath9k.  Does lsmod show the drivers being loaded?

----------

## Gurt

Sorry for the delay!

Anyway, I have been able to make the system see the dongle by running wpa_supplicant as a service (why it would need wpa_supplicant to do that is beyond me). Now the problem is that iwconfig outputs "no wireless extensions" for wlan0 and ifconfig shows wlan0 as ethernet device ("Link encap:Ethernet etc"). And of course I can't connect...

----------

## NeddySeagoon

Gurt,

iwconfig will only show wireless extensions when the interface is up. 

```
ifconfig wlan0 up
```

will bring the interface up.

Now try iwconfig wlan0 again.

wlan0 does't sound right with a default setup

----------

## Gurt

 *NeddySeagoon wrote:*   

> Gurt,
> 
> iwconfig will only show wireless extensions when the interface is up. 
> 
> ```
> ...

 

Thank you for the quick reply.

The interface is already up. It shows in both ifconfig and iwconfig. The problem is that, as the output of both commands indicate, the system keeps seeing it as an ethernet interface instead of a wireless interface.

----------

## eccerr0r

Something's really messed up with your udev or kernel config.  Did you make any custom edits?  What kernel (version) are you using?  Did you use a recent stage3?

Have you run etc-update or dispatch-conf to make sure your udev config is up to date?

----------

## Gurt

 *eccerr0r wrote:*   

> Something's really messed up with your udev or kernel config.  Did you make any custom edits?  What kernel (version) are you using?  Did you use a recent stage3?
> 
> Have you run etc-update or dispatch-conf to make sure your udev config is up to date?

 

I tweaked the kernel (latest gentoo-sources, 4.2.0-r1), but nothing too exoteric. Basically I just disabled support for file systems and peripherals I know I'm not going to use, like gaming devices etc, specified the cpu arch and little else. The stage3 was the most recent available when I downloaded it, a few days ago.

I haven't run those commands yet, I'll try.

In other news, I got connectivity to work. I had made a stupid mistake and not started dhcpcd. wlan0 STILL shows up as a wired connection, but I guess I can live with that... although I'd like to understand what happened and why.

----------

## eccerr0r

I recall that some of the wireless tools API is getting deprecated, perhaps that's what's happened.  Or perhaps some of the wireless extensions API was not enabled in the kernel and your userland apps are trying to use them (and failing).

But having it come up as wlan0 is still odd.

----------

