[RESOLVED] Selecting a known wifi network at boot up through shell script



  • Does anyone have a method of selecting a wifi network automatically at startup? My thoughts are that it would be via a startup script that does a number of things including prompting for the correct date and time should that not be correct.
    Any ideas would be appreciated.



  • OK on further searching through the posts here I found where the wifi configuration is stored /etc/config/wireless. On a reboot the entires in that configuration file remains as it was previously so the details are saved.

    The Omega2+ is not automatically reconnecting to my wireless network at cold startup despite the existence of a "config wifi-config" entry.

    In order to get it to connect I have to run wifisetup and go through the selection process which then restarts the wifimanager and connection is established. That is confirmed by a successful ping to an outside address.

    It seems that I will have to restart the wifimanager manually.



  • @Chris-Parker normally the console-level interface to persistent configuration on this type of system is uci rather than directly changing the config files. It may be that by doing the later you've changed the details that would be used but not the setting that controls the need to use them.



  • I've haven't changed the config file manually at this stage as you suggest. In all cases the content is as configured by the wifisetup process.

    What appears to be happening at startup is that the wifimanager is not making the connection to the ADSL router as listed in the config file. This is either because the wifi antenna hardware has not locked on at the moment the wifimanager runs or the connection failure is caused by some other startup issue. I know that I can get that connection to be made by re-running the wifimanager after login to the Omega via my Mac Terminal.

    As an aside......I've given up trying to get the Terminal App working in Console.

    When you refer to the term uci, do you mean Unique Client Identifier or User Command Interface?



  • Unified Configuration Interface

    Onion Wiki
    Introduction to UCI
    https://wiki.onion.io/Tutorials/OpenWRT Tutorials/UCI_Tutorial/uci_introduction

    BusyBox v1.25.1 () built-in shell (ash)
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ? /___/
     -----------------------------------------------------
       Ω-ware: 0.1.9 b150
     -----------------------------------------------------
    root@Omega-5BE1:~# uci
    Usage: uci [<options>] <command> [<arguments>]
    
    Commands:
    	batch
    	export     [<config>]
    	import     [<config>]
    	changes    [<config>]
    	commit     [<config>]
    	add        <config> <section-type>
    	add_list   <config>.<section>.<option>=<string>
    	del_list   <config>.<section>.<option>=<string>
    	show       [<config>[.<section>[.<option>]]]
    	get        <config>.<section>[.<option>]
    	set        <config>.<section>[.<option>]=<value>
    	delete     <config>[.<section>[[.<option>][=<id>]]]
    	rename     <config>.<section>[.<option>]=<name>
    	revert     <config>[.<section>[.<option>]]
    	reorder    <config>.<section>=<position>
    
    Options:
    	-c <path>  set the search path for config files (default: /etc/config)
    	-d <str>   set the delimiter for list values in uci show
    	-f <file>  use <file> as input instead of stdin
    	-m         when importing, merge data into an existing package
    	-n         name unnamed sections on export (default)
    	-N         don't name unnamed sections
    	-p <path>  add a search path for config change files
    	-P <path>  add a search path for config change files and use as default
    	-q         quiet mode (don't print error messages)
    	-s         force strict mode (stop on parser errors, default)
    	-S         disable strict mode
    	-X         do not use extended syntax on 'show'
    
    



Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.