GroundStation Wifi Access Point Configuration


Wifi Access Point hostapd implementation on ground station :

  • Check your mirrors :
    example xenial raspian :
deb-src http://fr.archive.ubuntu.com/ubuntu/ xenial main 
deb http://fr.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://fr.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://fr.archive.ubuntu.com/ubuntu/ xenial universe
deb http://fr.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://fr.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
/etc/apt/sources.list
  • Install dependencies :
    apt-get install libncurses5-dev
    apt-get install bc
    # pour hostapd :
    apt-get install vlc
    apt-get install python-m2crypto cdbs
    apt-get install dh-make
    apt-get install dnsmasq
    apt-get install hostapd
    # ou prendre la version compilée et le patch atheros_hambands.tgz
    prerequis
  • Create start_ap.sh script to start  hostapd and dnsmasq
  • Update /etc/rc.local (shortly  we propose systemd service configuration to do that) 
    #!/bin/sh
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other # value on error.
    #
    # In order to enable or disable this script just change the execution # bits.
    #
    # By default this script does nothing.
    #
    nohup /usr/local/bin/start_ap.sh >/var/log/start_ap.log 2>&1 &
    sleep 5
    # pour envoyer sur Android Tower Beta la video via AP
    nohup /usr/local/bin/start_rx_to_ap.sh >/var/log/start_rx_to_ap.log 2>&1 &
    exit 0
    /etc/rc.local
  • Create /etc/hostapd.conf configuration :
    #interface=wlan0
    #interface=wlan1
    # dongle 2 atheros
    #interface=wlx60e3270f04fd
    interface=wlx60e3270f04fd
    ssid=TarotGroundStation1
    hw_mode=g
    channel=2
    #channel=-13
    auth_algs=1
    # to enable N-Mode
    # UPDATE: N-Mode is still problematic
    #ieee80211n=1
    #wmm_enabled=1
    # config for WPA security
    macaddr_acl=0
    ignore_broadcast_ssid=0
    wpa=2
    wpa_passphrase=xxxxxxxxx
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=TKIP
    rsn_pairwise=CCMP
    /etc/hostapd.conf
  • Update /etc/dnsmasq.conf configuration :
    no-resolv
    dhcp-range=10.0.0.3,10.0.0.20,12h
    server=212.27.40.241
    server=212.27.40.240
    /etc/dnsmasq.conf
  • Check hostapd and dnsmasq process :

ps -ef|egrep « hostapd|dnsmasq »
root 1640 1404 0 07:34 ? 00:00:02 /usr/local/bin/hostapd
-d -K /etc/hostapd/hostapd.conf
dnsmasq 2955 1 0 08:10 ? 00:00:00 /usr/sbin/dnsmasq –x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf

Pages

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

fr_FR
en_US