WiFi_connecting to BB-xm


Step for setting up wifi
(i) Install the driver
    It requires the rtl8712u kernel module.
    This kernel module is created during the Build process of Angstrom/Arago The .ipk package can be directly
    copied to the rootfs and installed using the command.
  
      $opkg install kernel-module-rtl8712u

    If internet is up then this driver can be directly downloaded and installed on the Beagleboard.

(ii) Copy the Firmware (rtl8712u.bin) to lib/firmware/rtlwifi/.
    Firmware is required for working of the module.

(iii) Configure the wifi connection using the following commands
   
     • Start wifi
        $ifconfig wlan0 up
    
    • Scan for available connections and list them
        $iwlist wlan0 scan
    
    • Connect to the network "WLAN"
        $iwconfig wlan0 essid "WLAN"
    
    • Set an ip address.
        $ifconfig wlan0 192.168.1.12 up
    
    The wifi connection can be tested using ping command.




Auto-start WiFi on startup
1. Create a script in the /etc/init.d/ directory

2. Make the script executable

    $ chmod +x /etc/init.d/myscript.sh

3. Make the script start at bootup

    $ update-rc.d myscript.sh defaults

Note: the option “defaults” puts a link to start your script in runlevels 2, 3, 4 and 5, and puts a link to stop in runlevels 0, 1 and 6.

myscript.sh
#!/bin/bash         


echo "Wi-Fi starting"
modprobe r8712u
sleep 2                          //required if r8712.bin used from different kernel 
ifconfig wlan0 up
iwconfig wlan0 essid "adhoc"
ifconfig wlan0 192.168.0.XX 


No comments:

Post a Comment