Difference between revisions of "WiFi configuration"

From DFN Wiki
Jump to: navigation, search
(added Wifi configuration info (master and client mode))
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page describes the configuration of WiFi networking in DFN camera systems. DFNEXT type has WiFi interface installed, in the other systems it is optional. The default configuration is master mode, the camera system box acts as a WiFi access point (a network where a user in proximity of the deployed site can connect to the system wirelesly). The network name is the camera system hostname (eg DFNEXT007).
+
This page describes the configuration of WiFi networking in DFN camera systems. DFNEXT type has WiFi interface installed, in the other systems it is optional. The default configuration is master mode, the camera system box acts as a WiFi access point (a WiFi network where a user in proximity of the deployed site can connect to the system wirelessly). The network name is the camera system hostname (eg DFNEXT007).
  
 
On some sites, or for testing before deployment, it might be useful to set the WiFi interface in camera system to client mode and connect to an existing WiFi network (WLAN). That allows Internet access to the camera system and remote access via LAN IP range and DFN VPN as well.
 
On some sites, or for testing before deployment, it might be useful to set the WiFi interface in camera system to client mode and connect to an existing WiFi network (WLAN). That allows Internet access to the camera system and remote access via LAN IP range and DFN VPN as well.
  
Both master and client configuration options are pre-set in /etc/network/interfaces, the one that is not currently active is commended out. The default (master mode) state is:
+
Both master and client configuration options are pre-set in /etc/network/interfaces, the one that is not currently active is commended out. When changing the configuration, it is recommended ti bring the network interface down (ifdown wlan0), change the config file and then activate the interface again (ifup wlan0).
 +
 
 +
The default (master mode) state is (here displayed only the USB WiFi sub-section of the /etc/network/interfaces file):
  
 
  ### USB WiFi stick
 
  ### USB WiFi stick
Line 13: Line 15:
 
  #set IP address that is not in the DHCP pool of local wifi router
 
  #set IP address that is not in the DHCP pool of local wifi router
 
  #also subnet must not clash with eth1 subnet above
 
  #also subnet must not clash with eth1 subnet above
  '''iface wlan0 inet static
+
  '''iface wlan0 inet static'''
      address 172.16.0.101
+
'''      address 172.16.0.101'''
      network 172.16.0.0
+
'''      network 172.16.0.0'''
      netmask 255.255.255.0
+
'''      netmask 255.255.255.0'''
      post-up service isc-dhcp-server restart'''
+
'''      post-up service isc-dhcp-server restart'''
 
     ### WPA/WPA2 section for client mode ###
 
     ### WPA/WPA2 section for client mode ###
 
  #      wpa-ssid test1
 
  #      wpa-ssid test1
Line 34: Line 36:
  
 
For the client mode, we need to comment out the bold text from above and uncomment a few commented lines. Your local WiFi network most likely will use WPA2 encryption, but there is WEP option possible as well.
 
For the client mode, we need to comment out the bold text from above and uncomment a few commented lines. Your local WiFi network most likely will use WPA2 encryption, but there is WEP option possible as well.
 
  
 
  ### USB WiFi stick
 
  ### USB WiFi stick
Line 40: Line 41:
 
  allow-hotplug wlan0
 
  allow-hotplug wlan0
 
  ### DHCP
 
  ### DHCP
  #iface wlan0 inet dhcp
+
  '''iface wlan0 inet dhcp'''
 
  ### static
 
  ### static
 
  #set IP address that is not in the DHCP pool of local wifi router
 
  #set IP address that is not in the DHCP pool of local wifi router
Line 50: Line 51:
 
  #      post-up service isc-dhcp-server restart
 
  #      post-up service isc-dhcp-server restart
 
     ### WPA/WPA2 section for client mode ###
 
     ### WPA/WPA2 section for client mode ###
       '''wpa-ssid test1
+
       '''wpa-ssid test1'''
       wpa-psk fireball'''
+
       '''wpa-psk fireball'''
 
       ### following two options are not necessary  
 
       ### following two options are not necessary  
 
       ### - but the WiFi AP must be set to use encoding TKIP, not AES!
 
       ### - but the WiFi AP must be set to use encoding TKIP, not AES!
Line 61: Line 62:
 
     ### hostapd - all client mode settings must be commented out ###
 
     ### hostapd - all client mode settings must be commented out ###
 
  #      hostapd /etc/hostapd/hostapd.conf
 
  #      hostapd /etc/hostapd/hostapd.conf
 +
 +
Obviously one needs to put in the specific local WiFi network name (wpa-ssid) and password (wpa-psk).

Latest revision as of 12:02, 6 April 2020

This page describes the configuration of WiFi networking in DFN camera systems. DFNEXT type has WiFi interface installed, in the other systems it is optional. The default configuration is master mode, the camera system box acts as a WiFi access point (a WiFi network where a user in proximity of the deployed site can connect to the system wirelessly). The network name is the camera system hostname (eg DFNEXT007).

On some sites, or for testing before deployment, it might be useful to set the WiFi interface in camera system to client mode and connect to an existing WiFi network (WLAN). That allows Internet access to the camera system and remote access via LAN IP range and DFN VPN as well.

Both master and client configuration options are pre-set in /etc/network/interfaces, the one that is not currently active is commended out. When changing the configuration, it is recommended ti bring the network interface down (ifdown wlan0), change the config file and then activate the interface again (ifup wlan0).

The default (master mode) state is (here displayed only the USB WiFi sub-section of the /etc/network/interfaces file):

### USB WiFi stick
auto wlan0
allow-hotplug wlan0
### DHCP
#iface wlan0 inet dhcp
### static
#set IP address that is not in the DHCP pool of local wifi router
#also subnet must not clash with eth1 subnet above
iface wlan0 inet static
      address 172.16.0.101
      network 172.16.0.0
      netmask 255.255.255.0
      post-up service isc-dhcp-server restart
   ### WPA/WPA2 section for client mode ###
#      wpa-ssid test1
#      wpa-psk fireball
      ### following two options are not necessary 
      ### - but the WiFi AP must be set to use encoding TKIP, not AES!
      #wpa-key-mgmt WPA-PSK
      #wpa-group TKIP
   ### WEP section for client mode ###
      #wireless-essid test1
      #wireless-key F9674C82E0
   ### hostapd - all client mode settings must be commented out ###
      hostapd /etc/hostapd/hostapd.conf

The details for AP/master configuration including the AP name and password are configured in /etc/hostapd/hostapd.conf.

For the client mode, we need to comment out the bold text from above and uncomment a few commented lines. Your local WiFi network most likely will use WPA2 encryption, but there is WEP option possible as well.

### USB WiFi stick
auto wlan0
allow-hotplug wlan0
### DHCP
iface wlan0 inet dhcp
### static
#set IP address that is not in the DHCP pool of local wifi router
#also subnet must not clash with eth1 subnet above
# iface wlan0 inet static
#       address 172.16.0.101
#       network 172.16.0.0
#       netmask 255.255.255.0
#       post-up service isc-dhcp-server restart
   ### WPA/WPA2 section for client mode ###
      wpa-ssid test1
      wpa-psk fireball
      ### following two options are not necessary 
      ### - but the WiFi AP must be set to use encoding TKIP, not AES!
      #wpa-key-mgmt WPA-PSK
      #wpa-group TKIP
   ### WEP section for client mode ###
      #wireless-essid test1
      #wireless-key F9674C82E0
   ### hostapd - all client mode settings must be commented out ###
#       hostapd /etc/hostapd/hostapd.conf

Obviously one needs to put in the specific local WiFi network name (wpa-ssid) and password (wpa-psk).