WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Connect wireless at boot  (Read 5322 times)

Offline picnic

  • Newbie
  • *
  • Posts: 7
Connect wireless at boot
« on: May 15, 2013, 06:13:08 AM »
I'm trying to get my wireless connection to start automatically.

I've...

Put the line "/usr/local/etc/init.d/wpa_gui start" in /opt/bootlocal.sh
Put /etc/wpa_gui.conf in my backup
Done 'dry run' and actual backups just to make sure all is ok in writing out the files

wpa_gui.conf contains the correct info and I can connect manually with no problem but the file wpa_gui doesn't exist in /usr/local/etc/init.d/ (I'm not sure if it should).

I should add, I have to 'load app locally' wpa_gui from the Apps manager, I can't seem to make it install 'on boot'.

Any ideas please?

TIA

picnic


EDIT: Should I just edit /sda1/tce/onboot.lst and add wpa_gui?

« Last Edit: May 15, 2013, 06:27:50 AM by picnic »

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Connect wireless at boot
« Reply #1 on: May 15, 2013, 06:53:42 AM »
Hello Picnic!

Which version of Core are you using?

Let's say you are using the CorePlus. If you had it installed including the wi-fi drivers and apps mentioned in the installer, you should have an app autoloaded called "wifi" - it's a commandline app that searches and connect to your wi-fi. The settings of the connected wi-fi are stored in a file wifi.db in your home directory. Thus, you can call this wifi app on bootlocal.sh using the correct params, maybe solving what you need.

I'm not on my Core machine right now to confirm the params, but I recommend you to try this app and get back here you got (or not) success.




Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Connect wireless at boot
« Reply #2 on: May 15, 2013, 07:05:27 AM »
X apps cannot be started from bootlocal.sh.

wpa_gui is as it's name suggests not more and not less than a GUI for interactive control (and configuration) of wpa_supplicant and thus not of any non-interactive use.

However, wpa_supplicant could be started in bootlocal.sh and thus non-interactively connect to an AP at boot time.

Please read the info file of the wpa_supplicant extension.   ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline picnic

  • Newbie
  • *
  • Posts: 7
Re: Connect wireless at boot
« Reply #3 on: May 15, 2013, 07:18:54 AM »
X apps cannot be started from bootlocal.sh.

wpa_gui is as it's name suggests not more and not less than a GUI for interactive control (and configuration) of wpa_supplicant and thus not of any non-interactive use.

However, wpa_supplicant could be started in bootlocal.sh and thus non-interactively connect to an AP at boot time.

Please read the info file of the wpa_supplicant extension.   ;)

Oh, I was just follwing the wiki page (http://wiki.tinycorelinux.net/wiki:setting_up_wifi) which states (for Tiny core 4.x):

"If you want to automatically restart the WPA wireless connection after reboot, put ”/usr/local/etc/init.d/wpa_gui start” to your /opt/bootlocal.sh"

It says the same thing in the Apps->Info tab for wpa_gui and wpa_supplicant.tcz

Now I'm confused!

Hello Zendrael, thanks for the reply. :D

picnic


Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Connect wireless at boot
« Reply #4 on: May 15, 2013, 07:19:33 AM »
but the file wpa_gui doesn't exist in /usr/local/etc/init.d/ (I'm not sure if it should).

A quick look at the "Files" tab of appbrowser would definitely answer that.

Generally speaking, when such daemon files are required to be started manually by user, such would in most cases be explicitely mentioned in info file of respective extension.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline picnic

  • Newbie
  • *
  • Posts: 7
Re: Connect wireless at boot
« Reply #5 on: May 15, 2013, 07:28:07 AM »
Thanks for that - usr/local/etc/init.d/wpa_gui is listed in the files tab. It's also listed as usr/local/bin/wpa_gui and it does exist at that location. Maybe I should copy it to the ..../init.d/ directory?

picnic

EDIT: wpa_gui isn't in /usr/local/bin/ after a re-boot but a symlink to it appears there if I 'load local' from the apps browser
« Last Edit: May 15, 2013, 07:42:41 AM by picnic »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Connect wireless at boot
« Reply #6 on: May 15, 2013, 07:49:25 AM »
Mea culpa, I stand corrected.

On the one hand side I have a "If it works, don't change it" attitude, and am therefore at times missing latest developments, on the other hand I would often exhaustively consult upstream documentation to try to understand the workings of specific software independently from environment used...

After checking info files and file lists now, all I can say I can understand and share your confusion in most points you referred to...
 :-[
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline picnic

  • Newbie
  • *
  • Posts: 7
Re: Connect wireless at boot
« Reply #7 on: May 15, 2013, 08:08:55 AM »
No problem at least you're trying to help so thanks for that!  :)

I'll investigate further....

picnic

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Connect wireless at boot
« Reply #8 on: May 15, 2013, 08:53:22 AM »
It says the same thing in the Apps->Info tab for wpa_gui and wpa_supplicant.tcz

Now I'm confused!

Looking at both info files, I find that very confusing as well.
Perhaps it could be considered to separate contents of info files, maybe with a hint in wpa_supplicant info that for users who desire an optional control GUI, wpa_gui would be available.
OTOH, mentioning of wpa_cli which is included in wpa_supplicant.tcz as control CLI could merit a place in the info. 
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: Connect wireless at boot
« Reply #9 on: May 15, 2013, 10:06:33 AM »
Hi picnic
Quote
Put /etc/wpa_gui.conf in my backup
That should be:
Code: [Select]
etc/wpa_gui.conf
Quote
wpa_gui isn't in /usr/local/bin/ after a re-boot but a symlink to it appears there if I 'load local' from the apps browser
Start the Apps utility and make  wpa_gui.tcz  OnBoot. I think it's under Maintenance.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Connect wireless at boot
« Reply #10 on: May 15, 2013, 03:35:04 PM »
Last year or so we quickly put together a script (with the help of kind folks here) which checks first for an Ethernet connection, if not then the wifi script is initiated.  Since then this method has functioned seamlessly (well, except for a few password glitches) otherwise I forget of it's existence.   A script to accomplish this task is easy to create and well worthwhile, it has simplified connecting to the network from my notebook at whatever location I'm at.  though I seem to remember making a few changes along the way, now my only concern is entering a password if one is required,  Is something like this what you're thinking of??


the wifi.tcz extension has been invaluable to me while traveling.


edit,  on reflection I had to make a couple of edits here.  hope it reads better now
« Last Edit: May 16, 2013, 01:48:42 AM by coreplayer2 »