Monday, December 22, 2008

Getting WPA-PSK working on PS3 - YellowDog 6.1

I recently got YDL 6.1 going and was struggling with getting WPA encryption working when connecting to my WiFi router.

I found that it worked for me when I ran the wpa_supplicant command as follows, and left it running:
[root@ps3ydl devices]# wpa_supplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &

Then when I did a restart of networking with "service network restart", now everything stayed connected. So I found that the best way for me to get my wifi connecting correctly at boot time, was by modifying the startup script for the wpa_supplicant service.

When using "ps" to list processes with "wpa" as part of their name, I saw:
[root@ps3ydl devices]# ps -ef |grep wpa
root 16427 1 0 00:33 ? 00:00:00 wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log
root
17223 29728 0 00:35 pts/1 00:00:00 wpa_supplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

That first one (process ID 16427 above) was started by the /etc/init.d/wpa_supplicant script (this is effectively the same as running: service wpa_supplicant restart )

While the second process (17223) is clearly the one I executed myself and left running.

But the moment I reboot my machine, I obviously only have a process like that first one (i.e. 16427) and the wireless LAN connection keeps failing to connect properly.

So I modified the "daemon" line in the "start()" section of my /etc/init.d/wpa_supplicant file so that it creates a process with options like the one I ran manually.
This is what the "daemon" line in the "start()" section was BEFORE I changed it:
daemon $prog -c $conf $INTERFACES $DRIVERS -B $OTHER_ARGS

This is what it looks like now:
daemon $prog -Dwext -iwlan0 -c $conf $INTERFACES $DRIVERS -B $OTHER_ARGS

And now when I list the processes I get:
[root@ps3ydl devices]# ps -ef |grep wpa
root 20247 1 0 00:42 ? 00:00:00 wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log

== I also had to set the wpa_supplicant service to start at boot time in the two primary runlevels (3 for normal multi-user mode, without graphics; and 5 for full graphical multi-user mode - this is the init default mode):
-- 1. Created the startup link in runlevel 3 startup rc folder - I chose to start it at number 60 because if I started it too early, it didn't seem to work (the default starting number for networking is 10 - but I changed that to start later too):
[root@ps3ydl ~]# cd /etc/rc3.d/
[root@ps3ydl rc3.d]# ln -s ../init.d/wpa_supplicant S60wpa_supplicant
[root@ps3ydl rc3.d]# ls -l S60wpa_supplicant
lrwxrwxrwx 1 root root 24 Dec 21 16:39 S60wpa_supplicant -> ../init.d/wpa_supplicant
[root@ps3ydl rc3.d]#

-- 2. I moved the startup script for Networking, from starting at number 10, to rather starting later, in this case at number 99:
2008-12-31 Edit: Initially I had set this to start at number 61, i.e. as S61network, but I do get my wireless / wifi networking to start up more reliably if I have it set to start even later during the boot sequence, i.e. rather as S99network
[root@ps3ydl rc3.d]# ls -l S10network
lrwxrwxrwx 1 root root 17 Dec 21 14:00 S10network -> ../init.d/network
[root@ps3ydl rc3.d]# mv S10network S99network
[root@ps3ydl rc3.d]# ls -l S99network
lrwxrwxrwx 1 root root 17 Dec 21 14:00 S99network -> ../init.d/network
[root@ps3ydl rc3.d]#

-- 3. Similarly, for runlevel 5, I created a startup link to get wpa_supplicant started:
[root@ps3ydl rc3.d]# cd ../rc5.d/
[root@ps3ydl rc5.d]# ln -s ../init.d/wpa_supplicant S60wpa_supplicant
[root@ps3ydl rc5.d]# ls -l S60wpa_supplicant
lrwxrwxrwx 1 root root 24 Dec 21 16:40 S60wpa_supplicant -> ../init.d/wpa_supplicant
[root@ps3ydl rc5.d]#

-- 4. And moved the networking to start after the wpa_supplicant service:
[root@ps3ydl rc5.d]# ls -l S10network
lrwxrwxrwx 1 root root 17 Dec 21 14:00 S10network -> ../init.d/network
[root@ps3ydl rc5.d]# mv S10network S99network
[root@ps3ydl rc5.d]# ls -l S99network
lrwxrwxrwx 1 root root 17 Dec 21 14:00 S99network -> ../init.d/network
[root@ps3ydl rc5.d]#

== This is my wpa_supplicant.conf file ("wifi pre shared key" is obviously not my real WPA key):
[root@ps3ydl ~]# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
network={
ssid="BeBox"
scan_ssid=1
key_mgmt=WPA-PSK
#proto=WPA2
#pairwise=TKIP
#group=TKIP
psk="wifi pre shared key"
}

[root@ps3ydl ~]#

== In my ifcfg-eth0 I told the system to not start up the eth0 (ethernet LAN port) at boot time, coz without a cable plugged in it wastes time waiting to receive an IP address to be received, by setting this value / option: ONBOOT=no

== My ifcfg-wlan0 looks like this:
[root@ps3ydl ~]# cat /etc/sysconfig/networking/devices/ifcfg-wlan0
DEVICE=wlan0
BOOTPROTO=dhcp
ESSID=BeBox
HWADDR=00:19:C5:A1:B2:C3
IPADDR=
IPV6ADDR=
IPV6PREFIX=
IPV6_AUTOCONF=yes
ONBOOT=yes
DHCP_HOSTNAME=ps3ydl
DOMAIN=
NETMASK=
TYPE=Wireless
USERCTL=no
IPV6INIT=no
PEERDNS=yes
CHANNEL=1
#MODE=Master
MODE=Auto
RATE=Auto

[root@ps3ydl ~]#

== My keys-wlan0 has the same network password. It doesn't look like i need that IWPRIV line, so that is why it is commented out (there are no spaces in my actual pre shared key value!):
[root@ps3ydl ~]# cat /etc/sysconfig/networking/devices/keys-wlan0
KEY=s:wifi pre shared key
#IWPRIV="set_alg 2"
[root@ps3ydl ~]#

== now when I restart the wpa_supplicant service I see this:
[root@ps3ydl ~]# service wpa_supplicant restart
Stopping wpa_supplicant: [ OK ]
Starting wpa_supplicant: /etc/wpa_supplicant/wpa_supplicant[ OK ]

[root@ps3ydl ~]#

== and then when I restart networking I see this at the command line - not sure why I see all those lines of error messages.. but at least I now get an "OK" and no longer get a "FAILED" for the "Determining IP info..." line:
[root@ps3ydl ~]# service network restart
Shutting down interface wlan0: [ OK ]
Shutting down loopback interface: [
OK ]
Bringing up loopback interface: [
OK ]
Bringing up interface wlan0: Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Operation not supported.
Error for wireless request "Set Frequency" (8B04) :
SET failed on device wlan0 ; Operation not supported.
Error for wireless request "Set Bit Rate" (8B20) :
SET failed on device wlan0 ; Operation not supported.


Determining IP information for wlan0... done.
[
OK ]

== While making the changes above, I was monitoring my system messages file in a different terminal window using: tail -f /var/log/messages

== These are some of the interesting lines of log messages I saw during the execution of "service wpa_supplicant restart":
..
Dec 22 01:14:55 ps3ydl avahi-daemon[4085]: Interface wlan0.IPv4 no longer relevant for mDNS.
..
Dec 22 01:14:55 ps3ydl avahi-daemon[4085]: Withdrawing address record for 192.168.1.69 on wlan0.
Dec 22 01:14:56 ps3ydl avahi-daemon[4085]: New relevant interface wlan0.IPv4 for mDNS.
..
Dec 22 01:14:56 ps3ydl avahi-daemon[4085]: Registering new address record for 192.168.1.69 on wlan0.
Dec 22 01:14:57 ps3ydl kernel: gelic_eurus_sync_cmd_worker: cmd issue failed
..
Dec 22 01:14:58 ps3ydl kernel: gelic_eurus_sync_cmd_worker: cmd issue failed
Dec 22 01:14:58 ps3ydl kernel: gelic_eurus_sync_cmd_worker: cmd issue failed
Dec 22 01:14:59 ps3ydl kernel: gelic_wl_associate_bss: connected


== before doing the network restart, i see the network is down:
[root@ps3ydl ~]# ping google.com
connect: Network is unreachable
[root@ps3ydl ~]#

== And then when doing a network restart with "service network restart" I saw the following interesting system messages:
..
Dec 22 01:25:19 ps3ydl avahi-daemon[4085]: Withdrawing address record for 192.168.1.69 on wlan0.
..
Dec 22 01:25:19 ps3ydl avahi-daemon[4085]: iface.c: interface_mdns_mcast_join() called but no local address available.
Dec 22 01:25:19 ps3ydl avahi-daemon[4085]: Interface wlan0.IPv4 no longer relevant for mDNS.
..
Dec 22 01:25:19 ps3ydl avahi-daemon[4085]: iface.c: interface_mdns_mcast_join() called but no local address available.
..
Dec 22 01:25:24 ps3ydl kernel: gelic_wl_assoc_worker: no bss matched. association failed
Dec 22 01:25:24 ps3ydl kernel: gelic_wl_assoc_worker: no bss matched. association failed
Dec 22 01:25:24 ps3ydl kernel: gelic_wl_associate_bss: connected
Dec 22 01:25:25 ps3ydl dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Dec 22 01:25:25 ps3ydl dhclient: DHCPACK from 192.168.1.254
Dec 22 01:25:25 ps3ydl avahi-daemon[4085]: New relevant interface wlan0.IPv4 for mDNS.
..
Dec 22 01:25:25 ps3ydl avahi-daemon[4085]: Registering new address record for 192.168.1.69 on wlan0.
Dec 22 01:25:25 ps3ydl NET[427]: /sbin/dhclient-script : updated /etc/resolv.conf
Dec 22 01:25:25 ps3ydl
dhclient: bound to 192.168.1.69 -- renewal in 39187 seconds.

== and finally when I ping google I get a response.. confirming my wifi network is up and working:
[root@ps3ydl ~]# ping google.com
PING google.com (74.125.45.100) 56(84) bytes of data.
64 bytes from yx-in-f100.google.com (74.125.45.100): icmp_seq=1 ttl=243 time=113 ms


P.S. I originally started adding this as a comment to the following blog post, but decided to publish it here too, with additional details. This one may be helpful in providing you with further background or suggestions if you are having troubles like I was having: http://dachaac.blogspot.com/2007/08/guide-to-get-wpa-psk-working-on-ps3-ydl.html

21 comments:

  1. Anonymous12:01 AM

    hi, excellent work... i folowed this with great anticipation, but i'm afraid i fall at the final hurdle. after following all your "instructions" when it trys to renew the ip it still fails, everything else happens just as you said but i get nothing from the router. My SSID is hidden so i may try and change that to see if i changes things.

    ReplyDelete
  2. Anonymous12:12 AM

    Hi, great work, however after following all this, i still fail to get an ip address, i thought maybe it was due to me hiding my essid but i've just tried changeing that with no luck. everything else is pretty normal. Any ideas, cheers Mark.

    ReplyDelete
  3. Anonymous3:44 AM

    Didn't work for me :/

    ReplyDelete
  4. Hi Mark.

    Do you never get an IP address? Or is it just after a new boot of the box that you don't get an IP?

    What do you get if you type (as the root user at a bash terminal / command prompt) the command iwconfig - does it look like you are connected to your wireless network (for my network "BeBox" I get this which shows me it is connected at a wifi level: wlan0 IEEE 802.11bg ESSID:"BeBox" Nickname:"gelic_wl")?
    If not, is there a difference straight after you run this: service wpa_supplicant restart
    and then when you try: iwconfig
    If you are connected at a wifi level to your wireless network, also try restart the networking again at a command line / shell prompt with: service network restart

    I presume your Ethernet networking is set to not start up (i.e. is disabled), or at least you have your ethernet cable unplugged from the PS3 when trying to connect to the wifi network - connecting two interfaces to the same network segment is likely to confuse the operating system.

    Troubleshooting network connection problems remotely like this is always going to be difficult. There could be any number of potential problem points. For example, when I had a BT ADSL Broadband router and first connected a laptop via an ethernet LAN port to it and then via wifi, it wouldn't connect via wifi straight off.. until I flushed the list of "known" machines from the router's hidden "Management Diagnostics Console" settings menu (by connecting to the "mdc" URL on the router and then selecting Troubleshooting -> Resets -> Local Network -> clear, i.e. the URL looked something like http://1.2.3.4/mdc).

    But for now, try rather getting networking on your PC3's YDL to start right at the end of the boot sequence scripts. I'm going to modify my posting above to rather get networking to start as an S99 instead of an S61. This does seem to actually work better for me too.

    Let me know if any of this helps.

    ReplyDelete
  5. Anonymous7:14 AM

    Thanks a mill. Worked for me. Just one point and perhaps its the font but:
    wlan0 looks like it has the letter o at the end and not the number zero.

    Had me a bit confused initially but new it had to be a zero :)

    Interestingly wicd still shows me as being disconnected! No matter how cute you make it look, Linux will eventually have to be administered from the shell :)

    ReplyDelete
  6. This is a copy of a comment I published on daChaac's blog "Guide to get WPA-PSK working on PS3 - YDL 5.0.2" (http://dachaac.blogspot.com/2007/08/guide-to-get-wpa-psk-working-on-ps3-ydl.html) as I thought it may be useful here too.

    Hi Calvin

    Since this guide is over a year old, and it is based on a version of YDL from a while ago (v5.0.2), it is a good starting point, but quite out of date. So that's why I felt the need to put up my notes on how I got things working with the current version of Yellowdog. It is certainly not the only way, but it seems to at least get things working for now until someone can help find a more efficient and effective method.

    Some quick pointers:
    - YDL 6.1 has more recent versions of the software packages already installed. So you can ignore daChaac's tips on getting the packages downloaded and installed. The current version has all the right software to get things working, it is just odd that for some reason the easy way of doing things doesn't seem to work (well, it doesn't work for some of us at least). Hence the need to break out a bash shell and start typing stuff at the command line (unfortunately!).
    - eth0 is conventionally assigned by Linux systems as the name for the first Ethernet device into which you plug a LAN cable for networking. By definition, that device/port/socket (whatever you want to call it) does not perform wireless networking. So that is why you get nothing when you try to get iwconfig to probe that device.
    - wlan0 is one of the typical names given to a wireless networking device. So that is why iwconfig DOES give you details when you tell it to probe that device.
    - to reinforce the obvious here: there is one Ethernet device (eth0) and one Wifi device (wlan0) on the PS3 [by the way, there is also another device name for the Bluetooth device on the box which does a form of wireless communication, but I won't get into that as it'll confuse things further]
    - since iwconfig is showing info for wlan0 it proves, amongst other things, that: a) the wireless tools software is installed and working fine; b) the device is properly recognised by the operating system. You should therefore be able to get basic unencrypted wifi networking, or even WEP encrypted wifi networking going quite easily (although I didn't try this, as I use WPA now for my network.. as I expect you do too, otherwise you would never have ended up reading this thread)

    Please do try my tips on getting it going. I know it looks quite scarily advanced (it is not really that scary nor advanced), but one of the main reasons I put in so much detail was to (hopefully) help anyone who is a bit unsure to see what the output of the commands should look like, instead of just talking about typing something without you seeing an example of what I mean.

    If you follow the steps on my blog page from where I have "-- 1. Created the startup link in runlevel 3".

    You should be able to follow each step from there - the prompt should look the same or quite similar (ending in the '#' sign) and you type the commands in from there as I typed them in. You should see the same or similar out put. For each command you are not sure of what it is or means, try google for the manual page info (e.g. google for: man cd) and you will get an idea of what things like the following are doing: cd, ln, ls, mv, cat

    To edit files like wpa_supplicant.conf you will probably do best to use the Gnome Text Editor "gedit", i.e. at the command line type: gedit /etc/wpa_supplicant/wpa_supplicant.conf

    When you are done, save and close it, then use cat to display (or "catalogue") the contents of the file to confirm your changes.

    Similarly, to edit the interface configuration file for eth0 to change that "ONBOOT" setting, edit the file with: gedit /etc/sysconfig/networking/devices/ifcfg-eth0

    And in the interface configuration file for wlan0 (/etc/sysconfig/networking/devices/ifcfg-wlan0) the key ones to worry about should be: DEVICE=wlan0; BOOTPROTO=dhcp; ESSID=YourWifiNetworkName; TYPE=Wireless; MODE=Auto; RATE=Auto

    And when I talk earlier on about modifying the /etc/init.d/wpa_supplicant file, try that also with: gedit /etc/init.d/wpa_supplicant

    If you do not login to the GNOME desktop, it may be worth you trying that too: at the graphical login prompt, there is a "Session" button/menu where you can select "GNOME" before you input your user ID and password to login.

    Good luck in your Linux crash-course!

    ;->

    ReplyDelete
  7. Hi Adhir Lalla

    Thank you for the feedback. I've changed the font and template for my blog, so hopefully it will be easier to distinguish between a zero and the letter "O" now.

    ReplyDelete
  8. Anonymous1:21 PM

    Hi Stephen,
    I'm back on this now after a bit of a break using the ps3 to play games!.... shock horror.
    I never get an ip address.
    Everything looks exactly as it should on the wireless setup, iwconfig shows the SSID i'm connected to and the correct chanel etc. However after a short period of time when its tried to get the IP and i restart networking, it drops all the iwconfig details. I know i'm close to getting it working, could it possibly be the wpa supplicant? as i've noticed different effects when trying to set the wireless up in the GUI and choosing different supplicants. My router is a netgear DG834GT.
    I'm going to have another stab at it tonight.

    ReplyDelete
  9. Anonymous12:01 AM

    wow thanks a lot for the really thorough comment/response. i had a feeling that things would be different between 5.0 ydl and 6.1 ydl but i was hearing people got it to work with that guide so i figured i would try using that 5.0 guide.

    first off (sorry i'm still stuck) i signed in to GNOME desktop and opened terminal. logged in with su and my password. anyways right at the beginning when you type this:
    wpa_supplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &

    i typed it too and i got this:
    [1] 5224
    [root@localhost (my username)]# bash: wpa_supplicant: command not found.

    ^notice how there isn't a [root@localhost (my username)]# at the end. when i pressed return on the keyboard, i got this:

    [1]+ Exit 127 wpa_suplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
    [root@localhost (my username)]#

    ^now the [root@localhost (my username)]# is at the end. i'm not sure why there isn't even a wpa_supplicant that's not being found. that's my biggest problem, as from what i'm seeing a lot of this fix deals with that wpa_supplicant file.

    -another problem
    when you typed ps -ef |grep wpa you got this:
    root 20247 1 0 00:42 ? 00:00:00 wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log

    when i typed that, i got this:
    root 5236 5206 0 13:41 pts/2 00:00:00 grep wpa

    -another problem
    when i first opened the wpa_supplicant.conf file, what i saw was this (exactly):
    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=wheel
    ^ is that supposed to be correct? because i just figured everything was wrong, deleted it all and copied what you had, making necessary changes for my router.

    i basically did everything else up until here:
    == now when I restart the wpa_supplicant service I see this
    ^ and i couldn't get farther than that. still trying to figure out why i'm getting that bash command even though i was able to at least edit the wpa_supplicant file (i can open it but terminal cannot).

    btw, another thing i noticed:
    the order of the different things in your ifcfg-wlan0 (DEVICE, BOOTPROTO, etc) were different from mine. for example, PEERDNS is last in my list, while PEERDNS is 5th from the bottom in your ifcfg-wlan0 file. does the order make a difference?

    hopefully you can help me out with my problems. it seems once i get that wpa_supplicant file to work i shouldn't be having problems from here on out. thanks a lot for your reply though! i got farther today than i did yesterday.

    and you were right. it does look scarily advanced but when i took the time to read it, it actually ended up not being that bad (minus this wpa_supplicant problem i'm having). thanks again for the help!

    -calvin (logged in with my blogspot account)

    ReplyDelete
  10. Anonymous12:03 AM

    ^ sorry, i was logged in with my blogspot account but i was getting an error so i had to write as a guest. thanks again for the third or so time!

    ReplyDelete
  11. Anonymous6:50 PM

    Sorry to ask, it might seem like a bit of a stupid question. Is this for WPA or WPA2. Also are you required to put 0x by the encryption key. Last, for some of the txts you have "" for the network name, yet in come areas you do not. Are the "" signs needed. I just followed the guide almost to the dot and it did not work, im reinstalling the os today and will try again when I come back from work.

    It's wierd because in some instances my router detects the os yet in others it does not. I was able to connect in 6.0 but it never worked on boot, only after following the process stated in the previous guide by dachaac

    ReplyDelete
  12. Anonymous6:53 AM

    I did get it working, i line up altering the same exact files in a different area after completely reinstalling. I also figured out what was incorrect i guess about the key, i wasnt including the "" marks, althought i did not believe those needed to be entered. But Hurra, i got it working, in great great part thanks to this amazing guide. I think key is to just not give up, although i did spend close to 12 hours with the 3-4 uninstalls before i finally got it working.

    ReplyDelete
  13. Anonymous7:02 AM

    ok while it worked for a moment, it did decide to quit on me, leading me to believe that linux is not for everyone.

    ReplyDelete
  14. Hi Tom

    Yes, as you eventually found out, in some places, like those configuration files, the quotation marks are required.

    I know it is a pain and very frustrating that it doesn't work as expected straight away. It is really something that the YDL authors should put out a fix for.

    Also, this should work with WPA or WPA2. I think the difference is that WPA by default only supports the TKIP encryption, while WPA2 supports TKIP as well as AES: http://en.wikipedia.org/wiki/Advanced_Encryption_Standard

    ReplyDelete
  15. Hi Calvin

    Yes, you are also encountering an issue which I think is due to one of the (many!) peculiarities of Linux. In this case there is a difference between switching user using "su" and doing so using "su -" to get root / superuser privileges.

    The "(my username)" part you quoted, is actually the name of the current folder that you are in. One part of the process of opening a shell prompt is for bash to put the user into his home directory by default (per the contents of the HOME environment variable)

    Using su to switch user to root does NOT cause your bash shell to absorb all the setting of the root user - instead it keeps the settings of the user you were before issuing "su". While using "su -" (and that is the short hand way, the full way would be "su - root") causes the bash shell to a) switch to user root, and b) execute certain profile and bash setting files for the root user - the end result is that you get placed in root's home folder and also get things like your PATH environment variable updated properly.

    I'm not on the PS3 right now, so I can't record exact examples. But try the following:
    1. Open a terminal window.
    2. type "pwd" (without the quotes!) and hit enter to see your present working directory. Also see the content of your HOME variable with: echo $HOME
    3. now switch to root (keeping your user's environment variables, etc) with: su
    4. "pwd" should show you are still in the same home directory as your personal user account. Check out the HOME variable as above.
    5. See what your PATH environment variable contains (check out http://www.cs.purdue.edu/homes/cs348/unix_path.html) with: echo $PATH
    [by the way, Windows uses a PATH variable too]
    6. Type "exit" to exit out of the switch user shell you are now in (i.e. back to the normal user shell you started in)
    7. Now switch to root, including getting root's full environment variables, with: su -
    8. You will probably see a tilda (~) for the name of your home directory. This is Linux / Unix "shorthand" for "your home directory". Confirm the current directory location with: pwd
    [again also try: echo $HOME]
    9. Notice how your PATH variable is different now (you will probably have some extra places where the bash shell looks for executable files to run, like /sbin and /usr/sbin, which were not there for your normal non-root user) with: echo $PATH
    10. now can you ask the shell to tell you whether it can find an executable file within the directories listed in the PATH variable, without launching the executable, e.g. with: which wpa_supplicant
    11. you will find that, as your normal non-root user, you could also execute that program by specifying the full path to it, but without root privileges, you will not be able to do too much with it, e.g. just refer to it as: /usr/sbin/wpa_supplicant
    12. Another thing you could try which might help clarify the difference between executable files and configuration (text) files is to ask the shell to tell you something about the types of files by using the "file" program, e.g.: file /usr/sbin/wpa_supplicant
    and: file /etc/wpa_supplicant/wpa_supplicant.conf
    By the way, the order of entries (or lines of settings) in configuration files is often not important.

    So yes, Linux can be quite picky and unforgiving if you don't type in things exactly as it is expecting you to, but once you get the hang of it, you will start to appreciate how the strict rules like this help to make it such a versatile environment to work in.

    By the way, to get the shell to print out all your environment variables, in either Linux or at a Windows cmd.exe shell prompt, type: set

    If you are keen to become more familiar with the bash shell while using Windows, check out: http://www.cygwin.com/

    And then when you have time, try checking out something from: http://www.google.com/search?q=bash+tutorial

    One last thing I guess I should explain is the difference between typing a command with the "&" and the end of the line and without it.

    With it, the command runs and stays running in the background and you get returned back to the shell prompt to execute other commands. Without it, the command will run and you will not be returned to the shell prompt until it finishes or until it is "killed".. try that "wpa_supplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &" without the "&" at the end and then in a different shell window you can still get the list of running processes with "ps". It will stay running until you press the keyboard key sequence [ctrl]+[c] to kill / stop it in the first shell / terminal window.

    To push a job to the background, which you are currently running at a shell prompt (i.e. in the foreground), use [ctrl]+[z]
    The [ctrl]+[z] key sequence effectively just adds an "&" to your current job's process and it becomes a job running in the background and you get dropped back at the shell prompt.


    To see what jobs you are currently running type "jobs". To bring the most recently launched job from the background to the foreground, type "fg". And then kill it with: ^C
    {That "^C" is another "shorthand" notation version for using the [ctrl] button, i.e. in this case: [ctrl]+[c]}


    I know this is way more info than necessary, but you may have guessed that I am quite passionate about Linux. Having said that, I'm pretty disappointed at the responsiveness / speed you get on the PS3 when running Linux. I think that may be more to do with how little RAM there is on the box. But hey..

    ReplyDelete
  16. Anonymous1:44 AM

    hey Stephen. thanks again for the reply.

    something really weird happened but was the result i was looking for. i was going to play games on my ps3 and worry about fixing this WPA issue with ydl later, but i wasn't able to log in so i figured eh why not, i'll try it now. so i loaded my safari (mac user here) web browser and went to your blog again. i loaded ydl and logged in the GNONE. while i was waiting for it to finish loading i was reading your reply to my comment above. so then when i was about to run terminal and type pwd command, i noticed something i didn't see before: a notification of updates to my software. that automatically told me that my WPA connection was working in ydl. so i started firefox and typed "hello" in google and sure enough, a google page loaded. awesome. your tutorial in both the first reply you wrote to me as well as the original blog worked, so i gotta say thanks for making my life and struggles a LOT easier (even though it looked hard at first. ha ha). i appreciate all the help, man!

    ReplyDelete
  17. Anonymous1:48 AM

    btw

    ^ that comment above as well as this one, i posted on my ps3 ha ha. good stuff.

    ReplyDelete
  18. Anonymous8:30 PM

    Well i've tried everything you can imagine now, i just cannot get the damn thing to give me an ip address at all, when i first start up and run iwconfig it looks fine seems to be associated ok but just never gets an ip, as soon as i restart networking or wpa-supplicant it drops all wireless settings and won't associate to the router again. Final thing i will try is a re-install and run through this again before touching anything else.

    ReplyDelete
  19. Anonymous6:14 AM

    stephen i've noticed you reply to a lot of your comments on here. i've read through your entire blog here and can't understand it. i know this seems like a monumental task, but could you in any way take me through this step by step? i really wan this on my ps3. i can get iwconfig to recognize it, but i don't know what to do after that. please help soon.

    ReplyDelete
  20. Anonymous11:28 AM

    I have this stupid WPA-PSK with my PS3 YDL 6.1 released on february 2009. Just cannt connect my YDL to my network at all. Did everything but still failed. Is there any thing you can help me fix this? it found the Wifi but cannot connect, it keep on drop out. I don't know why. I reinstalled 3 times already and spent more than 20hours on fixing it.

    ReplyDelete
  21. This blog is very interesting... Thanks for share awesome blog. i think it's very useful for me.. really amazing content... keep it up.
    More info:- Netgear Router Technical Support

    ReplyDelete