View Single Post
Old 11-11-2012, 05:57 AM   #2
sven
Enthusiast
sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.sven has a complete set of Star Wars action figures.
 
Posts: 39
Karma: 454
Join Date: Jul 2012
Location: Brussels
Device: Kobo Touch
Hi there,

If you already have a setup and configured network it should be sufficient to run wpa_supplicant by

Code:
wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -B
wpa_supplicant is responsible for managing the wireless connection.

Since I haven't setup my Kobo Touch yet, I am going to briefly describe how I did setup the wireless manually.

1. Load the module for the wifi
Code:
# insmod /drivers/freescale/wifi/ar6000.ko
2. Verify that the module is loaded
Code:
# lsmod
3. Start wpa_supplicant (as mentioned above)
Code:
# wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -B
4. Configure the network via wpa_cli in interactive mode ( A help at the wpa_cli prompt '>' will show you all available commands)
Code:
# wpa_cli
4a. Retrieve and show all available networks
Code:
> scan 
> scan_results
4b. add a new network. The resulting digit (0 in my case) indicates the new network number for the following commands
Code:
> add network
0
4c. set SSID for network
Code:
> set_network 0 ssid "Your-Network"
4d. set password phrase
Code:
> set_network 0 psk "YourPassphrase"
4e. save the new configuration
Code:
> save_config
4f. quit wpa_cli
Code:
> quit
5. Set an IP address to wlan0 adapter either static or by dhcp
5a. static IP (example)
Code:
# ifconfig wlan0 192.168.1.1
5b. dynamic
Code:
# udhcpc -i wlan0
6. For hostname to ip resolving the file /etc/resolv.conf is needed. If the file does not exist create the file with a line pointing to your nameserver in it, e.g.
Code:
nameserver 192.168.1.1
7. Add a route to kernel routing table to reach external networks
Code:
# route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.1 dev wlan0
After these steps I was able to download from internet with wget command.

To have the wireless available after booting the Kobo Touch I created a script that is called during start up:
Code:
/bin/busybox insmod /drivers/freescale/wifi/ar6000.ko > /mnt/onboard/test.log
sleep 4
/bin/busybox lsmod > /mnt/onboard/test.log 
/bin/wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -B > /mnt/onboard/test.log
sleep 2
/sbin/ifconfig wlan0 192.168.1.12 > /mnt/onboard/test.log 
sleep 2
/sbin/route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.1 dev wlan0
/sbin/route > /mnt/onboard/test.log
The redirection in the test.log file is just for information purpose. You can omit if everything is working properly.

One issue I discovered is that nickel interferes with my batch script. The output in the log file was as expected, but
when I listed loaded modules and running threads neither the wireless module was loaded nor wpa_supplicant was running.
In dmesg log file an error during wireless module loading was indicated.
Therefore, I decided to comment out nickel in rcS file, since I do not need it anyway.

I hope my description helps you to get your wireless running after boot,

Sven
sven is offline   Reply With Quote