I was just trying to get my wireless card to go into ad-hoc mode while experimenting with
wireless to wired bridging on my Ubuntu 9.10 system here and I kept getting the message “Set Failed on device wlan0; Device or resource busy.” I played with this for an hour without figuring it out. Even doing some googling didn’t give me much except other people who were also getting the error. I eventually figured out that I needed to do a “sudo ifconfig wlan0 down” to bring the interface down. I guess that’s why I kept getting the busy message. After bringing wlan0 down it accepted the command “sudo iwconfig wlan0 mode ad-hoc” and then I brought it backup again with “sudo ifconfig wlan0 up” and I was able to continue with my experimenting. So, if you get this error message, try bringing the interface down first and see if that works.