View previous topic :: View next topic |
Author |
Message |
while true Guru
Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Sun Feb 20, 2011 1:18 am Post subject: [newbie] wireless from cli [RE-OPENED] |
|
|
Ola
I switched to Ratpoison WM (Oh, yeah!)
and I am leaving wfce and gnome apps behind.
How can I connect to wireless from shell?
I used to connect to wireless like so:
(disconect cable first)
Code: | $ su
#NetworkManager
#nm-applet |
and let terminal run.
This bruoght a nice icon in panel,
from which I could choose wireless connection.
I disconnected like so:
(connect cable)
Code: | #^C
#pkill NetworkManager
#/etc/init.d/net.eth0 restart
#exit |
This also works now if I run it in shell, but I can not choose from networks,
and it only connects me with my own wireless network.
I found some links, basicly like so:
Code: | $su
#ifconfig wlan0 up
#iwlist wlan0 scan
#iwconfig wlan0 essid my_network
#iwconfig wlan0 key s:my_password
#dhclient wlan0 |
but I got this error that I am stucked with:
Code: | # iwconfig wlan0 key s:my_password
Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; Invalid argument. |
Even on this forum I found someone asking about this,
but I do not think it is a driver or kernel problem,
since it was working before,
and also works now if I run NetworkManager and nm-applet,
but I do not know what I am talking about...
Also I do not have dhclient but I TABed dhc
and I came up with dhcpcd wlan0,
which seems to do the job on unsecured (open) wireless network.
Is there another way to connect to wireless with shell,
or is this the only one?
Also, there was this thing to put my password in HEX,
and I am interested to know, how to change text to HEX in bash shell?
Thank you _________________ Kind regards, Goran Mitic
alive
while true
kick ass
Last edited by while true on Tue Dec 27, 2011 11:11 pm; edited 2 times in total |
|
Back to top |
|
|
lxg Veteran
Joined: 12 Nov 2005 Posts: 1019 Location: Aachen, Germany
|
Posted: Sun Feb 20, 2011 10:24 pm Post subject: |
|
|
If you use NetworkManager, have you looked at cnetworkmanager?
Code: | * net-misc/cnetworkmanager
Available versions: (~)0.21-r1 (~)0.21.1
Homepage: http://vidner.net/martin/software/cnetworkmanager/
Description: Command line interface for NetworkManager.
|
_________________ lxg.de – codebits and tech talk |
|
Back to top |
|
|
while true Guru
Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Mon Feb 21, 2011 6:06 am Post subject: |
|
|
lxg, that simple, ha?
Man, big THANK YOU! _________________ Kind regards, Goran Mitic
alive
while true
kick ass |
|
Back to top |
|
|
while true Guru
Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Tue Dec 27, 2011 11:04 pm Post subject: |
|
|
Oi, newbie, here we go again...
so, I havent used wireless for quite a while,
and last working solution went like so:
Code: | (unplug the wire!!!)
C6820s grom # NetworkManager
C6820s grom # cnetworkmanager -a
Active | HwAddress | Ssid
-------+-------------------+-----------------
| 00:1F:CF:10:19:F8 | RG60SE
| 00:19:E0:64:8F:52 | TP-LINK
| 00:80:48:61:98:33 | eduroam
| 00:80:48:61:97:8C | eduroam
| 02:30:B4:67:C7:10 | rdeca kapica
| 00:22:3F:94:C6:17 | miroslav
| 00:1E:E5:5B:3C:AD | wirelessMRR
| 00:14:6C:07:07:B2 | studentje
| 00:1D:7E:D7:66:A4 | DelamoTudiPonoci
C6820s grom # cnetworkmanager -C DelamoTudiPonoci --wpa-pass password_in_plain_text
Entering mainloop
(16:22:14) State: CONNECTING
(16:22:21) State: CONNECTED |
and now:
Code: | C6820s grom # NetworkManager
C6820s grom # cnetworkmanager -a
Traceback (most recent call last):
File "/usr/bin/cnetworkmanager", line 178, in <module>
aap = dev["ActiveAccessPoint"]
File "/usr/lib64/python2.7/site-packages/dbusclient/__init__.py", line 174, in __getitem__
value = super(DBusClient, self).__getitem__(key)
File "/usr/lib64/python2.7/site-packages/dbusclient/__init__.py", line 77, in __getitem__
return pmi.Get(iface, key, byte_arrays=True)
File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 68, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 143, in __call__
**keywords)
File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 630, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Property "ActiveAccessPoint" of interface "org.freedesktop.NetworkManager.Device" isn't exported (or may not exist)
C6820s grom # |
so, I will post some things that might help:
Code: | C6820s grom # ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1c:c4:cd:40:24
inet6 addr: fe80::21c:c4ff:fecd:4024/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:938 errors:0 dropped:0 overruns:0 frame:0
TX packets:987 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:726291 (709.2 KiB) TX bytes:160169 (156.4 KiB)
Memory:dc500000-dc520000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2912 (2.8 KiB) TX bytes:2912 (2.8 KiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 00:1a:73:f8:a5:fd
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
C6820s grom # lspci
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 0c)
00:19.0 Ethernet controller: Intel Corporation 82562GT 10/100 Network Connection (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc RV516 [Mobility Radeon X1350]
10:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 02)
C6820s grom # |
how can I revive my wireless to work again...?
Thank you _________________ Kind regards, Goran Mitic
alive
while true
kick ass |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Wed Dec 28, 2011 3:53 pm Post subject: |
|
|
I use iwconfig, dhclient, ifconfig and route (more or less in that order) to
configure a wireless interface - OTOH that's to a single known access point,
so the script has to be re-written for each new case. But the man pages
for those commands should get you connected.
Will |
|
Back to top |
|
|
|
|
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
|
|