Hi Zoppatorslk,Don't know if this is already posted, but here it goes.
For this to work you need to have a rooted device and you need write access to the file:
This is how it should look, note that i in this example don't use any WEP encryption
ssid="Ad-hoc ssid here"
ssid="Your Accesspoint ssid here"
psk="your wpa key here"
I use this to tether to my iphone 4.
If i turn off the tethering on the phone i need to turn the wifi off and on again for the tab to find my accesspoint again.
If you want to use WEP try to add this wep_key0="insert your key here" in the network section of the ad-hoc network.
Hopefully this will help someone out.