LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   usb wifi on debian, howto? (https://www.linuxquestions.org/questions/linux-networking-3/usb-wifi-on-debian-howto-4175494136/)

Peterken 02-07-2014 07:00 AM

usb wifi on debian, howto?
 
hello everybody,
I'm trying to get a TP link TL-WN823N USB wifi adapter to work on a RPi but I:
a) have never used/installed/configured wifi on a *nix system
b) am puzzled about the driver
so any help will be appreciated a lot. ;-)
It was sold to me together with the RPi as a working combo.

I found some information about the chipset (realtek rtl8192cu) and the driver, but it seems to have some issues.
The adapter should be identical to the TL-WN821 & TL-WN822 model, but I guess it's not plug & play.

TIA,
P.

rokytnji 02-07-2014 08:54 AM

Quote:

rtl8192cu (supported devices)

Supports USB devices based on the RTL8188CUS and RTL8192CU chips.

Introduced in Linux 2.6.39, enabled at linux-2.6 2.6.39~rc7-1~experimental.1.
So in terminal

Code:

uname -r
Code:

lsusb -t
or
Code:

sudo lsusb -t
and post back.

Also

Code:

sudo ifconfig -a

Peterken 02-07-2014 10:48 AM

Hi rokytnji, thank you very much for picking this one up!
I cannot post everything back because I also have a problem of accessing the system through putty (network error: connection refused) so I have to type everything manually.
1) kernel: 3.10.24
2) usb devices: Port 2: Dev 4, If 0, Class=vend., Driver=rtl8192cu, 480 On Port 1: Dev 3 there is a smsc95xx device
3) networkconfiguruation: eth0 is listed and working and there also is a wlan0 but without address info.

In the raspbmc GUI it seems like only 1 NIC can be selected/configured but I guess that through the CLI, both can be set, right?

EDIT: is it normal that /etc/network/interfaces is empty?

rokytnji 02-07-2014 11:53 AM

Kernel is new enough so the driver/ko module is there.

Quote:

Driver=rtl8192cu
By that line there.

You are talking raspberry pi to me now and sorry bro but I don't own one or even know how their desktop
even looks or how it interfaces to wireless with it's desktop connection manager.

If it uses wicd-gtk since I use it alot to connect. Use ifconfig -a to see the wireless name (something like wlan0,eth1, etc......)

In wicd preferences. Wireless interface box will be blank by default. Type in what ifconfig -a shows as the name. Example below of mine (you won't have the inxi command installed)

Code:

$ inxi -Fxz
System:    Host: biker Kernel: 3.5.0-17-generic x86_64 (64 bit, gcc: 4.7.2) Desktop: MATE 1.4.2  Distro: Linux Mint 14 Nadia
Machine:  Mobo: SAMSUNG model: RV410/RV510/S3510/E3510 Bios: Phoenix version: 02UC.P026.20100916.LX date: 09/16/2010
CPU:      Dual core Pentium CPU T4500 (-MCP-) cache: 1024 KB flags: (lm nx sse sse2 sse3 ssse3) bmips: 9176.3
          Clock Speeds: 1: 1200.00 MHz 2: 1200.00 MHz
Graphics:  Card: Intel Mobile 4 Series Integrated Graphics Controller bus-ID: 00:02.0
          X.Org: 1.13.0 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz
          GLX Renderer: Mesa DRI Mobile Intel GM45 Express GLX Version: 2.1 Mesa 9.0.3 Direct Rendering: Yes
Audio:    Card: Intel 82801I (ICH9 Family) HD Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
          Sound: Advanced Linux Sound Architecture ver: 1.0.25
Network:  Card-1: Atheros AR9285 Wireless Network Adapter (PCI-Express) driver: ath9k bus-ID: 06:00.0
          IF: wlan0 state: up mac: <filter>
          Card-2: Marvell 88E8040 PCI-E Fast Ethernet Controller driver: sky2 ver: 1.30 port: 3000 bus-ID: 04:00.0
          IF: eth0 state: down mac: <filter>
Drives:    HDD Total Size: 320.1GB (28.4% used) 1: id: /dev/sda model: SAMSUNG_HM321HI size: 320.1GB
Partition: ID: / size: 18G used: 5.0G (31%) fs: ext4 ID: /home size: 163G used: 80G (52%) fs: btrfs
          ID: swap-1 size: 4.19GB used: 0.00GB (0%) fs: swap
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:  System Temperatures: cpu: 43.0C mobo: 43.0C
          Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 162 Uptime: 3:07 Memory: 710.1/3887.8MB Runlevel: 2 Gcc sys: 4.7.2
          Client: Shell (bash 4.2.37) inxi: 1.9.17

"IF: wlan0 state: up" is my wireless interface showing it is up AND running.
So if I run wicd in this. wlan0 is what I would type in wireless interface blank box.

This is all guess work for me of course because I don't run a raspberry pi device or any
of its operating systems available for them.

Quote:

3) networkconfiguruation: eth0 is listed and working and there also is a wlan0 but without address info.
All that rambling typing in my post is because of that item line. Your wireless driver is loaded,
wlan0 is waiting for you to connect it to the net is why it is blank.
It cannot guess what your router name and password (wpa_supplicant) is.

These videos are usually a good fall back way to get you out of a jam.

https://www.youtube.com/watch?v=CNfOJhxIHMk

https://www.youtube.com/watch?v=L8PhPQw3WFo

Shotgun Link


Happy Trails and Good Luck with the Pi, Rok

Peterken 02-08-2014 03:41 AM

USB wifi on debian with static ip?
 
Hi Rok,

Since I wrote RPi, I assumed it was clear that this is about a Raspberry Pi but isn't Debian on this device the same as on the x86 platform?
The goal of my setup to create an ad hoc connection with a tablet (RPi is running xbmc)

My 3 points were a reply to your questions, so ifconfig -a returned the eth0 and wlan0 information.
So far, we figured out that the driver is loaded and wlan0 is present.
I don't know if an ad hoc connection has the same capabilities regarding security but I will first try to get it working without any.

The only thing now is to find out how/where to put the information for a static ip address.
Thanks a lot anyway for getting me this far! ;-)
R.

EDIT: even though /etc/network/interfaces was empty, I have added this:
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address <free ip>
netmask <my subnet>
gateway <my gateway>
wireless-ssid <my ssid>
wireless-mode <station> (don't know if this is correct)

With 'iwlist scan' I can see my wireless network
I can ping my loopback adapter but not any other network device.
For the moment, wireless security is off

propofol 02-10-2014 12:43 AM

This is what the interfaces file looks like on my RaspPi:
Code:

auto wlan0
iface wlan0 inet static
        wireless-essid <name>
        wireless-mode managed
        wpa-ssid <name>
        wpa-psk  xxxxxxxxxxxx
        address 192.168.xxx.xxx
        network 192.168.xxx.0
        netmask 255.255.255.0
        gateway 192.168.xxx.xxx

wpa-psk generated with "wpa_passphrase"

Alternative you could use wicd. For an interactive version, use wicd-curses if you are working from the command line.

Regards,
Stefan


Quote:

Originally Posted by Peterken (Post 5113846)
Hi Rok,
...
EDIT: even though /etc/network/interfaces was empty, I have added this:
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address <free ip>
netmask <my subnet>
gateway <my gateway>
wireless-ssid <my ssid>
wireless-mode <station> (don't know if this is correct)
...


Peterken 02-21-2014 03:09 AM

Hi Stefan, thank you for stepping in!

What distro are you running on your RPi?
It seems that with Raspbmc, the /etc/network/interfaces file is not used in this version of Debian so changing that didn't have any effect.
I had to install a plugin in Raspbmc to manage wireless networking.

propofol 02-22-2014 07:28 PM

I am using Rasbian. I am not sure what is involved with Raspbmc.

[Edit:] It seems to me that Raspbmc may use Network Manager. If you are willing to use the wpa_supplicant, you could disable network manager. I saw instructions here: http://xmodulo.com/2014/02/disable-n...ger-linux.html.

Code:

sudo /etc/init.d/network-manager stop
sudo update-rc.d network-manager remove

Regards,
Stefan



Quote:

Originally Posted by Peterken (Post 5122125)
Hi Stefan, thank you for stepping in!

What distro are you running on your RPi?
It seems that with Raspbmc, the /etc/network/interfaces file is not used in this version of Debian so changing that didn't have any effect.
I had to install a plugin in Raspbmc to manage wireless networking.



All times are GMT -5. The time now is 01:17 AM.