LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Wireless with WPA2 and without WPA_supplicant (http://www.linuxquestions.org/questions/linux-wireless-networking-41/wireless-with-wpa2-and-without-wpa_supplicant-896507/)

Walzing 08-10-2011 02:14 AM

Wireless with WPA2 and without WPA_supplicant
 
Hello,

I try to add my Sony NAS-S55HDE to my home wlan (WPA2). I found out that the the S55HDE only supports WEP. After some testing I managed to get ssh access to the box (when connected to LAN). My next step was to configure the WLAN with WPA2. As far as I remember I have to use WPA_Supplicant. But this package is not install (list of packages).
But I know that Sony NAS-SC500PK supports WPA2, which also doesn't have wpa_supplicant. The packages are slightly different (List of packges). The wireless tools are the same but the kernel is different (linux-2.6.8.1-13u1-5 -> linux-2.6.8.1-13u1-7).
So - do I need WPA2_Supplicant or does it only make life easier?
I know that I maybe have to build a new driver module or even add a new USB WLAN Adapter. If it is needed I will start a thread for this topic ;-)

thx in advance
Walzing

business_kid 08-10-2011 04:37 AM

I have a similar issue with an old mac.

I am not aware of another implementation of wpa.
It strikes me that if you have a pc around, you can stick a wifi card there and run wep on that in master mode & a dhcp server, and ipv4 forwarding on the box. Don't use an open subnet or all your neighbours kids will burn your bandwidth.

Alternatively, if the cpu is x86 based, you may be able to install the package from an old distro. If you go to slackware-8.1 (which is on kernel 2.4.18) that's close enough. wpa_supplicant is probably in the 'n' section. You'll download a .tgz file. make a directory, cd into it & you can run

tar -zxvf <name of package>

That will give you the files, in a root tree. Copy them in one at a time, making sure you don't overwrite your existing files. That MIGHT get you wpa.

Walzing 08-10-2011 06:00 AM

Hmm,

ok - so WPA_Supplicant is needed. What I don't understand is, that the SC500PK will support WPA2, but WPA_Supplicant is not listed in the package list.
Next question just comes to mind is, what about this old kernel. Will 2.6.8 support WPA2? But also SC500PK will use 2.6.8 Kernel?
Maybe it's just an issue of the usb wlan adapter (Sony UWA-NA1).

cu
Walzing

business_kid 08-11-2011 03:03 AM

Why not check out a slackware-8.1 repository if your box is x86 based?
In Ireland, the local mirror is
ftp://ftp.heanet.ie/mirrors/slackware/pub/slackware

packages are in a slakware directory.

Walzing 08-12-2011 04:40 AM

Hi,

it's not x86 based:
Code:

bash-3.00# cat /proc/cpuinfo
machine                : Cougar-BB
processor        : 0
cpu family        : sh4a
cpu type        : SH7090
cpu flags        : fpu
cache type        : split (harvard)
icache size        : 32KiB
dcache size        : 32KiB
bogomips        : 133.12
cpu clock        : 300.00MHz
bus clock        : 50.00MHz
shwy clock        : 100.00MHz
module clock        : 50.00MHz

But I found some infos about the usb wlan stick:
Code:

bash-3.00# lsusb
Bus 003 Device 001: ID 0000:0000 
Bus 002 Device 001: ID 0000:0000 
Bus 001 Device 003: ID 0411:011b MelCo., Inc.
Bus 001 Device 001: ID 0000:0000

This one seems to work with RT73 (Modprobe rt73 works).
And I found this one:
http://rizzux.org/wiki/index.php?title=Linux-RT73

So I added this stuff to my interfaces:
Code:

auto eth1
iface eth1 inet dhcp
pre-up ifconfig eth1 up
pre-up iwconfig eth1 essid mywlan
pre-up iwconfig eth1 mode Managed
pre-up iwconfig eth1 channel 6
pre-up iwpriv eth1 set AuthMode=WPAPSK
pre-up iwpriv eth1 set EncrypType=TKIP
pre-up iwpriv eth1 set WPAPSK=ClearTestPassword
pre-up iwpriv eth1 set SSID=mywlan

But some of this iwpriv doesn't seem to work. When I type all this iwpriv commands in a terminal I finaly get a connect on my fritzbox:
Code:

WLAN-Gerät angemeldet (2,4 GHz). Name: -, IP-Adresse: 192.168.178.28, MAC-Adresse: 00:1D:73:04:BB:EA, Geschwindigkeit 54 MBit/s.
But the IP is not listed on ifconfig.

I also added ifcfg-eth1 file:
Code:

DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Wireless

When I type ifdown eth1, I see a disconnect on my Fritzbox. When I type ifup eth1 I get this on my linux box:
Code:

bash-3.00# ifup eth1
2.4+ kernel w/o ELF notes? -- report this
Determining IP information for eth1... done.
NOT DHCP IP
Operation failed.
Operation failed.

And I don't see a connect on my Fritzbox.

Any ideas on this?

thx in advance
Walzing

business_kid 08-12-2011 12:32 PM

Best kept secret in all this stuff is wpa_passphrase
http://linux.die.net/man/8/wpa_passphrase
You also want an /etc/wpa_supplicant.conf
http://linux.die.net/man/5/wpa_supplicant.conf

Connect this way:
ifconfig wlan0 up
iwlist wlan0 scan |less and note the mac address of your local lan, & essid
iwconfig wlan0 essid your_essid ap your_mac_address

If you have to spoon feed it, do it this way:
wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -Dwext && iwconfig wlan0 essid your_essid ap your_mac_address

iwconfig wlan0 should then return the mac address of your access point and no message that you're not associated. Then

dhcpcd (or dhclient) wlan0 should give you an IP

Walzing 08-16-2011 08:14 AM

Ok,

it's working now. I have a connection with this settings:
Code:

auto eth1
iface eth1 inet static
pre-up ifconfig eth1 up
pre-up iwconfig eth1 essid mywlan
pre-up iwconfig eth1 mode Managed
pre-up iwconfig eth1 channel 6
pre-up iwpriv eth1 set AuthMode=WPA2PSK
pre-up iwpriv eth1 set EncrypType=AES
pre-up iwpriv eth1 set WPAPSK=ClearTestPassword
pre-up iwpriv eth1 set SSID=mywlan
ifconfig eth1 192.168.178.2

But - it's normally configured by the 'tiger' up. But my wlan config will be done after tiger has started. So tiger will not listen to the ports.
Now I have to find out, how the (tiger) scripts will start the network. Maybe I could paste my wlan config to tiger startup script. But therefore I have to learn some more 'bash' scripting. I come from windows (vbscript, c#,c,...) and don't know something like this:
Code:

if(something)
{
 [ -x $config_file ]
}

I know there is a script, that could startup the wlan. And there is a wlan config file. But the gui will not allow WPA2 - it will only allow WEP. It's a shame, that sony:
- released a wlan product in 2007 without WPA2 support
- released a wlan product that could support WPA2 from linux side, but not from app side
- doesn't deliver updates for their product (even if it's was discontinued 2 years later)

cu
Walzing


All times are GMT -5. The time now is 06:43 PM.