WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tips to connect wlan automatically on boot  (Read 13759 times)

Offline blue horse

  • Newbie
  • *
  • Posts: 31
tips to connect wlan automatically on boot
« on: January 26, 2012, 10:12:40 PM »
this may sound too simple to some, as a newbie, i found it useful ...

CorePlus-4.2 ships with a very nice wifi setup utility, you click the icon on wbar, it finds all wlan networks around you, you select yours, it connects for you.

quite nice, yet, you have to repeat this for every reboot.

this wiki link provides ways to automate the wifi connection:
http://wiki.tinycorelinux.net/wiki:setting_up_wifi?rev=1323363219

i try to boil it down to a few simple steps: (supposing /opt instead of backup is used)

1. after click wifi icon to connect to WLAN, go to /etc to find a file called wpa_supplicant.conf, copy it to /opt so it becomes persistent, this file contains credentials of your WLAN, it's generated every time you click the icon to connect.

2. suppose your WLAN interface is wlan0, if you are not sure, type iwconfig in terminal to find out.  create a file called _wifi.sh that contains two lines: 

        wpa_supplicant -i wlan0 -c /opt/wpa_supplicant.conf -B
        udhcpc -n -i wlan0

3. save _wifi.sh at /opt so it is persistent too.

4. open file /opt/bootsync.sh, add one line at the end:

        /opt/_wifi.sh &

5. reboot

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: tips to connect wlan automatically on boot
« Reply #1 on: January 26, 2012, 11:00:28 PM »
In wifi.tcz.info:

Quote
Creates wifi.db in HOME directory.
Can auto connect to first db entry with use of auto, e.g.,
      
/usr/local/bin/wifi.sh auto 2>&1 > /tmp/wifi.log
      
Add above to bootlocal or bootsync for quick auto connect.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: tips to connect wlan automatically on boot
« Reply #2 on: October 18, 2012, 06:42:27 AM »
Nice pointed out bmarkus i missed that option and i needed it :)
In my case though the wifi.sh creates a flawed wifi.db not containing the SSID field only the password field.
Adding this by hand and the "auto" option works with no interaction.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: tips to connect wlan automatically on boot
« Reply #3 on: October 18, 2012, 07:06:46 AM »
wifi.tcz is an extension. I had documented "auto"  in the .info file from day one.
10+ Years Contributing to Linux Open Source Projects.

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: tips to connect wlan automatically on boot
« Reply #4 on: October 18, 2012, 07:23:47 AM »
If you are reffering to me saying "missed it" i meant it as i had not seen it in the extention info, like missing a target with and arrow, that is why im thanking bmarkus for pointing it out.

I understand how it could be miss understood but it was my first time needing it so no i did not miss it in the other way ;)

  -- Regards Andreas

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: tips to connect wlan automatically on boot
« Reply #5 on: October 18, 2012, 07:45:50 AM »
I am only pointing out to others that will read this thread to always peruse the .info file. As it is the README of the extension.
10+ Years Contributing to Linux Open Source Projects.

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: tips to connect wlan automatically on boot
« Reply #6 on: October 18, 2012, 09:28:46 AM »
he he awsome you say peruse :)
Reminds me of Tandem. Never heard the term outsite true old school computer experts :)
Maybe this is the reason this forum is the only one i ever stuck around!
« Last Edit: October 18, 2012, 09:33:08 AM by ananix »