#!/bin/bash export PHYNAME_ATH=phy0 export DEVNAME_ATH=wlan0 ifconfig ${DEVNAME_ATH} down iw dev ${DEVNAME_ATH} del iw reg set US # set US regulatory domain iw phy ${PHYNAME_ATH} interface add ${DEVNAME_ATH} type ibss ifconfig ${DEVNAME_ATH} up iw dev ${DEVNAME_ATH} ibss join ADHOC 2412 key d:1:5chrs # TODO: beacon interval ip -4 addr add 192.168.123.48/24 broadcast 192.168.123.255 dev ${DEVNAME_ATH}