In this blog I will tell you about my development activities related to open source and other software. Occasionally I might give some hints on how to do something.

4 Aug 2007

Guide to get WPA-PSK working on PS3 - YDL 5.0.2

There were some requests for easier guide on how to get WPA working on Playstation 3 for Yellow Dog Linux 5.0.2. I looked around and found some free webspace for prebuilt binaries and for modified source RPMs. Please note that you will need your YDL root account in order to complete steps below.

This guide was last updated on: 4.8.2007

1. Update your wireless tools package

Yellow Dog Linux 5.0.2 comes with wireless tools package compiled for PowerPC-32. While this may work for other systems with Playstation 3 this is a bit problematic as ioctl32 wireless interface is a bit broken. So easiest workaround for this is to compile wireless tools as PowerPC-64 binaries. You can get modified source RPMs and pre-built binaries for easier installation from my packages website. Most users just need to download wireless-tools-28-1.ppc64.rpm and install it. You can use USB Flash Memory or any other medium to transfer files.

rpm -Uvh wireless-tools-28-1.ppc64.rpm

If it complains for conflicts add --force to command line (usually don't do this, but I didn't want to update release numbers in case Yellow Dog Linux releases updated packages to replace this). Please note that this is modification of YDL's source RPM package so it is a bit older that what kernel would like to use. It will generate some warnings, but you can ignore those.

2. Test that wireless tools works

Next step is to test out that wirless tools works. Tools needed in this experiment are ifconfig, iwconfig, iwpriv, iwlist, and dhclient.

First lets test out that you can wireless module loaded correctly. For this we will use iwconfig:

You should note last line per entry Extra:ap_sec=. This number will tell what encryption algorithm is needed for your connection. 0201 means WPA-PSK - TKIP and 0202 would mean WPA2-PSK - AES. I have not been able to test out WPA2-PSK - AES, but it might work for you. For me 0100 shows up for WPA2-PSK - AES which is incorrect as that would mean WEP encryption.

Next lest try manually connecting to Access Point. For this you will need to know your access point's ESSID, used encryption algorithm (WPA-PSK (TKIP), WPA2-PSK (AES)) and passphrase to access network.

iwpriv eth0 set_alg 2

iwconfig eth0 key s:passphrase

iwconfig eth0 essid ESSID

If you have WPA2-PSK replace set_alg 2 with set_alg 3. For WEP this would be set_alg 1. After that you can observe output of iwconfig eth0 to see if you have been associated to access point (Access Point field changes from Not-Associated to MAC address of your AP).

Next you can check out if you can get an IP address with dhclient.

dhclient eth0

If it gives you an IP address you are free to test out your internet connection with your web browser or any other tool that needs connection.

3. Setting it up automatically on boot

Now that you have Wireless connection working it would be nice that it would work automatically after being rebooted.

There are only two files to be modified.

First, lets modify /etc/sysconfig/networking/devices/ifcfg-eth0.

Set following fields to values shown below (of course change your ESSID) (other fields can be left empty):

DEVICE=eth0BOOTPROTO=dhcpONBOOT=yesESSID=ESSIDTYPE=Wireless

Next we need to store your passphrase so it will be automatically configured.

Hi All, i see everyone has got this wireless working on the yd 5.02 on the PS3, i Have not, and have played around with this for hours now, never used linux before, so any help to get this wireless working would be great.

I have HK PS3.Latest ydl 5.02Downloaded and install the wireless tools.

I am logged in under my username and password, cant find where these tools are so i can do all the relivent tests, by using the tools from the download givin in this guide.What am i doing wrong,

WPA works, but for some reason the automated start does not work. I have set up everything the way it was described but during the boot process I get the message that my PS3 does not get an IP address. After booting is completed, the command "ifup eth0" starts the WLAN connection and everything is all right. Why does this not work automatically?

Thanks so much for the rpm and the short HOWTO. One note: I had to copy the device configuration files to /etc/sysconfig/network-scripts to brign up the device correctly, just in case someone runs into the same problem. Thanks again, it was really time for WPA to work!

With Gentoo you may need 64bit userland to get it working correctly. It seems to be missing some important patches. How ever, new way to use wpa_supplicant seems to be on move to get integrated to kernel. I'll do a post when that happens.

About unable to associate issue: try to see if iwlist scan results as ap_sec: 0x400 or so. This means that you have configured your access point as WPA2 and you have installed new firmware (2.x+). Mind you that this also happens if you have WPA+WPA2 configuration as firmware returns only best possible mode. You either need to patch your kernel or lower your security settings.

it works great on ydl 6!but for automatically start i must change the file /etc/sysconfig/networking/devices/ifcfg-eth0 as follow:DEVICE=eth0BOOTPROTO=dhcpHWADDR=00:xx:xx:xx:xx:xxONBOOT=yesESSID='networks name'TYPE=WirelessNETMASK=DHCP_HOSTNAME=IPADDR=DOMAIN=USERCTL=noIPV6INIT=noPEERDNS=yesCHANNEL=6MODE=AutoRATE=Auto-----------note ' by essid!

For ydl 6 fw 2.x with WEP password, wifi does not work. Could it have anything to do with my user name and password that are not in hex.This is the format of my ssud and passSSID: happy feetpassword: abcdef

please any help with setting up wifi with ydl 6 on the PS3 is greatly appreciated.

I'm trying to follow this guide to get my wireless working on YDL 6.0 ...... so i try doing the first step of dowloading and installing that rpm package, it gives me an error telling me that i have a package thats more current than that and it won't let me install. So I figured move on to the next step, of testing the wireless tools, so i typed in iwconfig eth0 just as it says and it tells me no such command or something to that effect. Now i'm a newb to Linux so if anybody has any thoughts or ideas they would be appreciated. Thanks

I found that installing the latest version of wireless-tools from here enabled me to configure WPA-PSK even with firmware 2.10. My problem is that despite editing the ifcfg-eth0 and keys-eth0 correctly to show the same parameters as I used on the command line, it still won't start on reboot. Instead I have to go through the manual process every time.

i must be a complete newb to linux ok so trying to get it installed on 6.0 i managed to force the install of the rpm package.....now i'm under root@localhost in the terminal and i type iwconfig eth0 and i get the error command not found....what am i doing wrong someone please help

I followed the steps closely and got this warning after running rpm -Uvh cmd : "Warning: Driver for device eth0 has been compiled with version 22 of..(blah blah blah)Something must be broken...". Ignore this message and include --force in the rpm cmd.

Also, I can't get wi-fi to turn on upon boot when the files ifcfg-eth0 and keys-eth0 are in /etc/sysconfig/networking/devices/. I copied them to /etc/sysconfig/network-scripts/ and it works perfectly. After that I just delete them from the "devices" folder.

Fifth installation with different versions of YDL and the Wireless-Tools:Now everything's working fine via WPA-PSK, even with the actual PS3 firmware 2.2.I only took the actual versions free YDL 6-DVD image, wireless-tools-29-2.fc9.ppc64.rpm and followed this guide.

I use YDL 6 on my PS3 with firmware 2.20 and I've first installed the rpm package with the --force option.Then I created the ifcfg-eth0 in /etc/sysconfig/network-scripts/ including this:DEVICE=eth0BOOTPROTO=dhcpHWADDR=00:xx:xx:xx:xx:xxONBOOT=yesESSID="ESSID"TYPE=WirelessNETMASK=DHCP_HOSTNAME=IPADDR=DOMAIN=USERCTL=noIPV6INIT=noPEERDNS=yesCHANNEL=6MODE=AutoRATE=Auto

Then I've created keys-eth0 as you told me to do and place it in /etc/sysconfig/network-scripts/

I am running YDL 6.0 and I followed all the directions but couldn't get my ps3 to connect to my WPA-PSK (AES) wifi. After several wrong turns, I figured out what my problem was: AES doesn't work whereas TKIP does work. Made the change in my router settings and it's good to go now! Hope this might help someone else!

Have YDL 6.0 installed on my PS3 with the latest firmware. When I try to install wireless-tools-28-1.ppc64.rpm with the -force command. I get this error "error: can't create transaction lock on /var/lib/rpm/__db.000". I tried looking in this directory and can not find any __db.000 file in there.

Have YDL 6.0 installed on my PS3 with the latest firmware. When I try to install wireless-tools-28-1.ppc64.rpm with the -force command. I get this error "error: can't create transaction lock on /var/lib/rpm/__db.000". I tried looking in this directory and can not find any __db.000 file in there.

***To whoever was having this problem:

Make sure you're logged in as the root when you do this. Type "su", then your root password when prompted.

Unfortunately, I'm stuck at the very next step: I got it installed, but when typing any of the commands, I'm given the message: "command not found". Do I have to be in a specific directory? I'm totally new to Linux. ;)

Took me a while to realise that I had to put /sbin/ before the commands but got there.The very last step /sbin/ifup eth0 comes back with determining IP information for eth0... failed; no link present. Check cable?

I followed the stepps above installing wireless-tool-29-2.fc.9. I configured both networks scrips with correct WiFI into but I am still unable to get it to launch upon bootup. If i run the commands manually it works but fails upon boot-up....

I have managed to get the initial connection when the "dhclient eth0" line is executed, but when I continue with the rest of the steps i will lose the connection. So i can connect but i have to write atleast 4 lines in the teminal after every restart to get it working. And step 3 onwards isnt working. It's very frustrating because i can connect, but cant "save the configuraton".BTW- YDL6 on PS3 fresh install, only added the wireless tools pack from this blog.

I've followed the tutorial, tried many packages, but I just get "command not found" each time I'm trying to do something. I am a Linux newbie, so that may be the problem. Would anyone please tell me what I'm doing wrong????? I've tried the --force thingi ang get the message with

ok... so i have a great connection. However I am unable to edit the system files to enable on reboot. I yhink it has something to do with being read only files. Can anybody help me to edit them. I am using ydl 6

I'm having a bit of trouble. When i run the iwlist eth0 scanning command, I get 2 cell descriptions and in the first one which has my ESSID info, I have Extra:ap_sec=0402 instead of this Extra:ap_sec=0201.

I've also had problems with the reboot. I had it all working previously but I switched from TKIP to AES, also used the new wireless-tools-28-4.fc7.ppc64.rpm then the reboot seemed stopped working (don't think i stuffed anything else up). So I've just put a temporary startup script together until the real fix comes along.

Tried this after MANY attempts to get 6.0 YDL on my PS3.Now, it works!!

Note.....Being new to LINUX, I kept typing -force instead of --force !!!the biggest hurdle I had was in the routers name...the name wasblah's networkit seems LINEX didn't like the ' in the name. I logged on as root, edited the ifcfg-eth0 file, MANUALLY added in " at the begining and the end of the ESSID name....and Bingo!!

Thanks for the guide pal!! Very helpful for a complete bozo like me! Without out this guide I would be bald by now!!

Success on PS3. Everything you need is in the guide and the forums. I have the lastest firmware on the PS3 and had no problems getting YDL6 to run wireless following the guide to the [b]tee[/b]. I used the original wireless tools package and these worked just fine. Only took about 10 minutes once I got all the commands down and replaced some batteries... Linux is very picky about file directories. If you place the wireless package on your desktop you need to specify that file location for the rpm cpmmand to find the file i.e after you are root type cd Desktop (or where ever you put the file. Also note that the directories are case sensitive. A lower case "D" on desktop will not work.) Then run the rpm command from the correct directory. After the file installs successfully use the cd /sbin command to get to the sbin directory. From here continue with the guide. Make sure you place ./ before the commands ie "./ifconfig eth0 up". Again, 99% of this is listed in the above forums. Take some time, print the whole thing out and follow the directions exactly.

I used nano for editing the files for the reboot to work. For example, when you are in root under /sbin, enter: nano /etc/systemconfig/networking/devices/ifcfg-eth0 to begin editing the file. When done hit ctrl x, then y then enter to save the changes.

Remember the ssid is case sensitive and to type the commands exactly as you see them. Also, if yo uare using a wireless keyboard, make sure the batteries are fresh. Seems trivial, but for speedy typers this can be a big pain when half your carachters are not registering lol. Hope this helps some more of you out.

This thread was a life saver! I'm a complete newbie at this Yellowdog thing and this was really straight forward. All the extra comments about what folders to go to and having to be in the root, etc...were REALLY helpful and I couldn't have made it without all of them! Thank you and keep up the great work!

It shows:Known Issues with GameOS 2.43At this time, it is not recommended to update to GameOS 2.43 due to known issues with wifi and usb drives. In addition, there is an issue with using the "Boot Game OS" menu option to switch from YDL to GameOS. Note that you can switch to Game OS by shutting down YDL and pressing the power button.

I am one of those who has upgraded to 2.43 firmware and also recieve for ap_sec=0402 because my router is configured for:

Security Mode: WPA-PersonalWPA Mode: WPA+WPA2 Cipher Type: TKIP and AESA Passphrase is used not a hex key like in WEP security(Router: Trendnet TEW-GR633)

A wierd thing I notice that during boot kboot prompt reports being able to get an IP address.

Has anyone had any success with a scenario like mine. I will try with the latest wireless tools rpm package: wireless-tools-29-2.fc9.ppc64.rpm

I will post updates if I get anywhere with this, otherwise I will follow other published posts to get the wired ethernet port to work instead of the wireless.

I wonder why hypervisor prevents you from using both at the same time.

step 1 install? i did it once but now i cant im using an sd card to tranfer the files then i dont know wat to do in the terminal to install. i drag n drop the files in there dat didnt work then i tried typing rpm -Uvh wireless-tools-28-1.ppc64.rpm--force while im logged in as root but i still get no such file or directory. can u help me just with this first step pleaseeee

iwconfig eth0 key 831E3A9FBB1E0831AEADA10CB5FFA3B06EE5EB61887C8DDBFFB5389316A4C00Acould this be why it wont work.

or is it the fact that iwlist scan finds 15 networks, but the ESSID of mine is wrong, i just see the last 5 letters out of 8 like this:say my essid war hamburgr iwlist scan showsCell 07 - Address: 00:00:00:68:61:6D ESSID:"burgr "

the hex-savvy can see that the last hex part of the Address is in fact the letters h:a:m

I have the new 2.50 PS3 firmware installed with 80Gig HD and YDL 6xx installed. I try this guide but is it impossible to go with this steps guide instructions... and wifi with WPA2 with AES security doesn't work... I can't put any router cable (100 feet!!!0 bullshittttttttttt!"/$%?&*()_

after a succesfull installation i can't find the tools. please help. iwconfig not found, etc. none of the files can be found. i installed as root, looked in /usr/bin, etc. folders nothing found. no iwconfig, no ifconfig, etc. PLEASE HELP. thanks

Thomas, have you downloaded or transfered "wireless-tools-28-1.ppc64.rpm" - and installed it?Make sure that you are the user "root". you can type: "su -" (without ") and you will be promted for roots password - the first one you entered during YDL-installation.

Thanks to daChaac for the thorough writeup as well as the other folks for adding their invaluable comments, otherwise I wouldn't have gotten this to work, but I did.

Some advice that took me about 4 days of trying to compile....download the wireless tools 29.2.fc9.ppc64.rpm from one of the sites listed in above comments- the older one may have worked too, but this worked for me. And on the reboot setup, I used the network-scripts directory and then created the files from scratch-then it worked for me.

Go to the terminal on your shelf in Linux and double click on it.

type in su

then type in your root password.

Change your directory to the Desktop with- cd Desktop

then type in the rpm -Uvh wireless-tools-29-2.fc9.ppc64.rpm --force

that will start you off. then use ./(then the command of daChaacs), for example-./iwconfig eth0) for each command you do....follow daChaac's directions CAREFULLY (trust me, the slower you go at first the more time and frustration you will save) after that, making sure you are checking if your MAC address was associated and then that you got an IP address after the dhclient command.

if you did get an IP address you are successful at accessing the internet now, but you have to continue if you want it to start up automatically on reboot.

I had to look up some linux commands to be able to create some files, because the ifcfg-eth0 file wasn't there, as well as the keys-eth0 file.

if you got an IP address with the dhclient eth0 command then...

change directory to /etc/sysconfig/network-scriptsthen create the files by typing in cat > ifcfg-eth0 and hit enter. it will then allow you to type in the lines as daChaac has indicated (for example DEVICE=eth0). after each line hit enter. when you are finished with that hold down ctrl D. you are now done with the ifcfg-eth0 file and you should get the root prompt again.

Next type in cat > keys-eth0and type in the lines as daChaac indicated, hitting enter after each line. When you are finished with that, hold down ctrl D again.

when you get the prompt again, finish up the the ./ifdown eth0 and ./ifup eth0 and you should be all set.

Hi, just installed yellow dog 6.0 on the ps3 and went through all the steps and getting i get a ip address and can get on the internet. But when i go in to edit the script to work on boot up /etc/sysconfig/networking/devices/ifcfg-eth0 it says access denied. Im loged in as root and still says access denied. It does the same when i try to access the scripts also. /etc/sysconfig/network-scripts. Im stuck and im doing everthing i can but will not let me access the files???? Please any help would be great..Thanks

Edit: because this was getting a bit long to post as a comment, I've posted this, together with more detail, here: http://stephenventer.blogspot.com/2008/12/getting-wpa-psk-working-on-ps3.html

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.

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

hey thanks for the write-up. hopefully someone will read this problem i'm having and can assist me.

as a reference, i have an 80 gb ps3 with backward compatibility (the mgs4 bundle) with ydl 6.1 installed.

i followed three people's guides: daChaac, 151 (it's in the comments, posted july 8 2008) and Ward (it's in the comments, posted november 21 2008).

so anyways following Ward's comment: in terminal i logged in as root, then typed cd Desktop to go to desktop, then i typed rpm -Uvh wireless-tools-29-2.fc9.ppc64.rpm --force because i had that file waiting on the desktop. it was recognized and had the 100% notifications.

following 151's comment:i typed cd /sbin and was in that directory.

this is where i'm jammed up:when i typed ./iwconfig eth0 this error came up: no wireless extensions. basically what daChaac said in his step about iwconfig eth0, i'm not getting that. but when i typed in ./iwconfig wlan0 some stats came up about that, similiar to what daChaac wrote about eth0. so then i just typed ./iwconfig and a list of things came up: lo no wireless connection, eth0 no wireless connection, wlan0 and the data for wlan0. my question is, why is it saying no wireless connection? and what can i do to fix it? i'm pretty sure if i fix that i can complete this whole process.

what i tried doing all ready:-jumping ahead to step 3 in daChaac's guide and modifying those two files. didn't do anything.-reinstalling the OS. the first time i installed it, at the screen with the network connections, i had the wlan0 box checked and eth0 box unchecked. the second time i installed the OS, i had wlan0 unchecked and eth0 checked.-typing slowly. still got the same error.

i would really like to try the guide that stephen venter (above) wrote but since this is only my second day of using linux (my first day being yesterday when i first installed ydl in my ps3) i don't think i'm as advanced to do that. but basically yeah if someone can help me with this "no wireless connection" problem i'm getting with the eth0 then that would help. thank you. i'll be checking this blog daily.

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.

ok i've gotten my internet working. my problem is getting it to stay after i reboot. u say "To get it working automatically you must modify two files: /etc/sysconfig/networking/devices/ifcfg-eth0 /etc/sysconfig/networking/devices/keys-eth0" but how do i edit them? reading through the comments on your step by step, i noticed people saying to create the files and then to edit them. someone else said to do it in nano. i'm so confused. when i type in the ''/etc/sysconfig/networking/devices/ifcfg-eth0'' it says permission denied. do i need to run it as a command? plz explain to me how to go about doing this. thnx in advance!