Community
cancel
Showing results for 
Search instead for 
Did you mean: 
BWill15
New Contributor II
1,770 Views

Make ad hoc network on boot up

Jump to solution

I wan't to start a startup script. I followed http://http//stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup this tutorial:

  1. # !/bin/sh
  2. ifconfig wlp1s0 down
  3. rfkill unblock wlan
  4. iwconfig wlp1s0 mode ad-hoc
  5. iwconfig wlp1s0 essid GalileoNetwork
  6. iwconfig wlp1s0 channel 10
  7. ifconfig wlp1s0 192.168.1.2 netmask 255.255.255.0 up

When I execute it manually it doesn't work the first try.

root@galileo:/media/card# /media/card/startup.sh

[ 68.426461] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

[ 68.451440] iwlwifi 0000:01:00.0: Radio type=0x1-0x0-0x1

[ 68.912137] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

[ 68.927567] iwlwifi 0000:01:00.0: Radio type=0x1-0x0-0x1

[ 69.199921] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready

root@galileo:/media/card#

A second try:

root@galileo:/media/card# /media/card/startup.sh

[ 297.939952] iwlwifi 0000:01:00.0: L1 Disabled; Enabling L0S

[ 297.955403] iwlwifi 0000:01:00.0: Radio type=0x1-0x0-0x1

[ 298.244089] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready

root@galileo:/media/card# [ 301.365059] wlp1s0: Selected IBSS BSSID 66:62:25:65:ea:2d based on configured SSID

[ 301.407708] iwlwifi 0000:01:00.0: Unable to find TIM Element in beacon

[ 301.425525] iwlwifi 0000:01:00.0: Unable to find TIM Element in beacon

[ 301.451519] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready

How do I make sure I have a working connection on startup?

Tags (1)
1 Solution
FTinetti
Honored Contributor I
115 Views

I think that using some bash programming at startup, i.e. execute startup.sh until you have the connection "up and running"

HTH,

Fernando.

View solution in original post

3 Replies
FTinetti
Honored Contributor I
116 Views

I think that using some bash programming at startup, i.e. execute startup.sh until you have the connection "up and running"

HTH,

Fernando.

View solution in original post

BWill15
New Contributor II
115 Views

How do I check if "wlp1s0" is "ready" in a shell script?

Sergio_A_Intel
Employee
115 Views

You mean to check that wlp1s0 is enabled after running the startup script? Take a look at cat /sys/class/net/wlp1s0/operstate.

Sergio

Reply