Skip to content

Script to create a *floating* ad-hoc network using Raspberry Pi - 2 / 3 with specific wireless chipsets

License

Notifications You must be signed in to change notification settings

shantanoo-desai/pi_adhoc_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Pi Ad Hoc Creator

This bash script performs the following:

  • Checks for the type of Pi:

    • Raspberry Pi 2 Model B
    • Raspberry Pi 3
  • Checks for either:

    • internal wireless chipset for Pi - 3
    • external wireless chipsets for Pi - 2
  • Adds appropriate kernel modules in the /etc/modules folder for boot

  • changes the /etc/rc.local file for setting up an ad-hoc network on boot with following parameters:

    • Mode Ad-Hoc
    • Channel 1
    • ESSID test-adhoc
    • Tx power to 0dBm (if possible)
  • Changes the /network/interfaces file and other networking files to provide:

    • IPv6 SLAAC addresses on wlan0
    • no IPv6 addresses on eth0

External Wireless Chipsets

  • ONLY dongles with following drivers are capable to work in ad-hoc operation:

    • r8188eu
    • rt2x00lib
  • Edimax 7811UN with 8192cu drivers are INCOMPATIBLE.

Accessibility

Pis can be accessible once running the script and rebooted using:

ping6 -I wlan0 ff02::1

from a native Linux PC with the Same ad-hoc network configuration or from a Pi with the same configuration. Pis are addressed with fe80:: link-local addresses.

to perform ssh in to the pi:

ssh -l pi fe80::abcd:1ff:fe22:dead%wlan0

the %wlan0 is important

to perform scp use [] as follows:

scp someFile.txt pi@[fe80::abcd:1ff:fe22:dead%wlan0]:/home/pi/

Requirements

Just your Pi with an external chipset based USB dongle and root privileges to trigger the script.

sudo ./adhoc_setup.sh

ISSUES with External Dongles

  • r8188eu chipsets are miserable with not letting the user set txpower and also channel parameters. txpower will return an Error, whileas channel set to another value will not.

  • even upon setting sudo iwconfig wlan0 channel 06 or another value, only the default value of channel 1 i.e. 2.412 GHz is set.

License

Issued under MIT License