MEITH

Mayday Emergency Information Technology Host


BACK

Release 1

 

Release 1. 1

Release requirements. 1

Content. 1

Download. 2

How to reproduce this build. 2

Download: 2018-04-18-raspbian-stretch. 2

Configure WIFI – right click mouse on WIFI symbol – Wireless & Wired Network Settings. 2

PREFERENCES-RASPBERRY PI CONFIGURATION-. 2

Now wait till your WIFI sees network and configure your network settings. 2

Experiencing screen blackouts?. 2

NTFS support. 3

Adaptations to get EDIMAX EW-7811UTC supported. 3

Install DHCP and DNS. 3

Adaptations to get support for both Wifi Access Point and Wifi Client. 3

Known issues. 12

Hidden gems in this build. 12

 

Release requirements

1)      Raspberry Pi 3B+

2)      Edimax EW-7811UTC

3)      16 GB SD card

Content

This release supports this RPI3B+ to act as both WIFI Client and WIFI Access Point simultaneously.

Download

You can download the zipped image file from DOWNLOADS in the menu bar.

How to reproduce this build

Download: 2018-04-18-raspbian-stretch

Boot system

Configure WIFI – right click mouse on WIFI symbol – Wireless & Wired Network Settings

Select interface wlan0. Pick default settings (automatically configure empty options) and press “apply” and “close”.

PREFERENCES-RASPBERRY PI CONFIGURATION-

Fillout under tab System:

Fill out hostname

Underscan: Disabled

Under tab Interfaces:

VNC

Under tab Performance:

Change GPU memory from 64 to 256

Set localization to your needs

Reboot

Now wait till your WIFI sees network and configure your network settings

sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

sudo apt-get autoremove

reboot

Experiencing screen blackouts?

In this case you can adapt the file /boot/config.txt.

Set config_hdmi_boost to values 4 and try it. If the screen still has blackouts increase the value. Go up each time by 1. Reboot after each change. For the maximum value consult the official RPI3 website, as it might have impact on the HW.

If even after setting it to the highest value, buy a good quality short cable.

NTFS support

For being able to write NTFS mounted USB devices install the following:

sudo apt-get install ntfs-3g

I need this to support my USB memory stick.

Adaptations to get EDIMAX EW-7811UTC supported

Follow instructions from the Edimax website, it is a very good description:

https://edimax.freshdesk.com/support/solutions/articles/14000032146-how-to-install-ew-7811-ac600-series-and-ew-7822uac-adapters-on-raspberry-pi

At this point you will have 2 different WIFI Clients, each being able to connect to different WIFI routers.

Install DHCP and DNS

·         hostapd is a user space daemon for wireless access point and authentication servers.

·         Dnsmasq provides Domain Name System (DNS) forwarder, Dynamic Host Configuration Protocol (DHCP) server, router advertisement and network boot features for small computer networks, created as free software

sudo apt-get install hostapd dnsmasq

Reboot the system.

Adaptations to get support for both Wifi Access Point and Wifi Client

After above steps explained in the link adapt the following files

/etc/dhcpcd.conf

/etc/dnsmasq.conf

/etc/rc.local

/etc/default/hostapd

/etc/hostapd/hostapd.conf

/etc/init.d/hostapd

/etc/network/interfaces

/etc/network/interfaces.d/native_wifi.cfg

/etc/wpa_supplicant/wpa_supplicant-wlan0.conf

/etc/wpa_supplicant/wpa_supplicant-wlan1.conf

 

/etc/dhcpcd.conf:

hostname

clientid

persistent

option rapid_commit

option domain_name_servers, domain_name, domain_search, host_name

option classless_static_routes

option ntp_servers

require dhcp_server_identifier

slaac private

nohook lookup-hostname

denyinterfaces wlan0

 

/etc/dnsmasq.conf:

interface=wlan0

dhcp-range=10.0.0.100,10.0.0.200,255.255.255.0,12h

 

/etc/rc.local:

_IP=$(hostname -I) || true

if [ "$_IP" ]; then

  printf "My IP address is %s\n" "$_IP"

fi

 

sleep 10

sudo iw wlan1 set power_save off

exit 0

 

/etc/default/hostapd:

DAEMON_CONF="/etc/hostapd/hostapd.conf"

 

/etc/hostapd/hostapd.conf:

driver=nl80211

ctrl_interface=/var/run/hostapd

ctrl_interface_group=0

beacon_int=100

auth_algs=1

wpa_key_mgmt=WPA-PSK

ssid=MEITH

channel=1

hw_mode=b

wpa_passphrase=ChangeMe

interface=wlan0

wpa=1

wpa_pairwise=TKIP

country_code=UK

 

/etc/init.d/hostapd:

#!/bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin

DAEMON_SBIN=/usr/sbin/hostapd

DAEMON_DEFS=/etc/default/hostapd

DAEMON_CONF=/etc/hostapd/hostapd.conf

NAME=hostapd

DESC="advanced IEEE 802.11 management"

PIDFILE=/run/hostapd.pid

 

[ -x "$DAEMON_SBIN" ] || exit 0

[ -s "$DAEMON_DEFS" ] && . /etc/default/hostapd

[ -n "$DAEMON_CONF" ] || exit 0

 

DAEMON_OPTS="-B -P $PIDFILE $DAEMON_OPTS $DAEMON_CONF"

 

. /lib/lsb/init-functions

 

case "$1" in

  start)

                        log_daemon_msg "Starting $DESC" "$NAME"

                        start-stop-daemon --start --oknodo --quiet --exec "$DAEMON_SBIN" \

                                               --pidfile "$PIDFILE" -- $DAEMON_OPTS >/dev/null

                        log_end_msg "$?"

                        ;;

  stop)

                        log_daemon_msg "Stopping $DESC" "$NAME"

                        start-stop-daemon --stop --oknodo --quiet --exec "$DAEMON_SBIN" \

                                               --pidfile "$PIDFILE"

                        log_end_msg "$?"

                        ;;

  reload)

                        log_daemon_msg "Reloading $DESC" "$NAME"

                        start-stop-daemon --stop --signal HUP --exec "$DAEMON_SBIN" \

                                               --pidfile "$PIDFILE"

                        log_end_msg "$?"

                        ;;

  restart|force-reload)

                        $0 stop

                        sleep 8

                        $0 start

                        ;;

  status)

                        status_of_proc "$DAEMON_SBIN" "$NAME"

                        exit $?

                        ;;

  *)

                        N=/etc/init.d/$NAME

                        echo "Usage: $N {start|stop|restart|force-reload|reload|status}" >&2

                        exit 1

                        ;;

esac

 

exit 0

 

/etc/network/interfaces:

source /etc/network/interfaces.d/*.cfg

 

/etc/network/interfaces.d/native_wifi.cfg:

allow-hotplug wlan1

iface wlan1 inet dhcp

 

allow-hotplug wlan0

iface wlan0 inet static

                        address 10.0.0.1

                        netmask 255.255.255.0

                        network 10.0.0.0

                        broadcast 10.0.0.255

wireless-power off

 

/etc/wpa_supplicant/wpa_supplicant-wlan0.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

update_config=1

country=NL

 

network={

                        ssid="YOUR_SSID"

                        psk="YOUR PASSWORD"

                        key_mgmt=WPA-PSK

}

 

/etc/wpa_supplicant/wpa_supplicant-wlan1.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

update_config=1

country=NL

 

network={

                        ssid="YOUR_SSID"

                        psk="YOUR PASSWORD"

                        key_mgmt=WPA-PSK

}

 

Now remove your EDIMAX EW-7811UTC and reboot the system. After it has rebooted insert the EDIMAX EW-7811UTC.

The EDIMAX will be WLAN1.

Your Wifi Client should now come up and you should be able to select a network to connect too, via the icon:

Click on it.

Afbeeldingsresultaat voor raspbian wifi symbol not connected

 

The onboard WIFI chip will act as Wifi Access Point, it will be WLAN0.

Use e.g. an android device with VNC installed on it to connect to your RPI3B+ Wifi Access Point. From Android select as Wifi network MEITH, the password is ChangeMe.

If you want something else you can change the SSID/Password in the file /etc/hostapd/hostapd.conf.

After you have selected the network, fireup your VNC client on your mobile device and follow next steps:

Select MEITH from the list.

 

 

 

Meith has been selected.

 

Select the VNC App.

 

Connect to Access Point address 10.0.0.1.

 

Enter as user name: pi

Enter as password: raspberry

And there is the screen of our RPI3B+

Known issues

If you fireup your RPI3B+ while the EDIMAX EW-7811UTC is present in the USB slot, the EDIMAX will become WLAN0 and the onboard Wifi will become WLAN1. The Wifi Client (on WLAN1) will work, but the Wifi Access Point (on WLAN0) will not work.

We would like to get in touch with someone who wants to search a solution for this issue.

Hidden gems in this build

scrot

This is a tool to take screenshots. To find out how it works Google it. In short open a command window. Type scrot -d [x]  (where x provides the delay in seconds after which the screenshot is taken) from within a terminal window. So you have time to minimize the command window in which scrot is running.

The image will be stored under /home/pi

htop

htop is a great application for viewing the load on your 4 cores, memory, swap space and active processes. It can be started from within a terminal window.