Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB Wireless device Tp-Link TL-WN822N rtl8192cu
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
hasansahin
n00b
n00b


Joined: 03 Jun 2010
Posts: 12

PostPosted: Thu Jan 16, 2014 7:59 am    Post subject: USB Wireless device Tp-Link TL-WN822N rtl8192cu Reply with quote

Hello mates,

I have a wireless usb device that is using rlt8192cu kernel module. My security profile is WEP for my wifi network.

When I have a look for my device name

Code:
ls -al /sys/class/net

Quote:
lo wlp0218s2u2


I use following commands to connect my wifi network

Code:
iwconfig wlp0218s2u2 essid <my_essid>
iwconfig wlp0218s2u2 key s:<my_WEP_key>
dhcpcd wlp0218s2u2


it works but sometimes dhcp service stop to working when I changed the user or chroot. and I have to apply again the above-mentioned commands.

Question 1 : iwconfig or wpa_supplicant - I could not decide which is the best? does wpa_supplicant stop to working on sometimes?
Question 2 : how can I automate the wifi-connection command as a system or boot service? or should I use networkmanager?

P.S. : I read gentoo handbook doc. and it does not explain how can I automate wifi connection (iwconfig or wpa_supplicant) as a system or boot service. Or I could not see :)
_________________
Anyone who has never made a mistake has never tried anything new.
Albert Einstein.
Back to top
View user's profile Send private message
MechanicalBear
n00b
n00b


Joined: 31 Jan 2014
Posts: 1

PostPosted: Fri Jan 31, 2014 3:38 am    Post subject: Reply with quote

If you using systemd you can create service file in /etc/systemd/system like wifi.service and place your commands with full path to binary in it.

Code:
[Unit]
Description=WIFI connectivity

[Service]
Type=simple
ExecStart=/sbin/iwconfig wlp0218s2u2 essid <my_essid>
ExecStart=/sbin/iwconfig wlp0218s2u2 key s:<my_WEP_key>
ExecStart=/sbin/dhcpcd wlp0218s2u2


then you must reload services
Code:
systemctl daemon-reload

and then enable your service to run on boot
Code:
systemctl enable.wifi

after reboot service will start wifi connectivity automatically

but the better way (if you using X) to install wicd - it is a tray application to manage both wireless and wired networks for Linux.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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