Skip to content

Wifi configuration

Damien Gaignon edited this page Apr 24, 2019 · 2 revisions

The main configuration file is common for connection methods (wifi and/or ethernet).

Sections

The file is divided into two main sections :

  • Wifi
  • Ethernet

The wifi configuration is sub-divided into 3 parts :

  • Common
  • Station mode a.k.a. STA MODE
  • Access point a.k.a. AP MODE

The file

You have to create a file called wifi.conf on your SDCard (case sensitive so wifi.conf not Wifi.conf).

Do not put it in a sub-folder, it is on the root of the SDCard.

Empty lines and lines starting with # are ignored, thus to desactivate a parameter, put a # in front of the line.

Wifi configuration

All wifi parameters (station mode and AP mode) could be used in the same wifi.conf file. The choice is done in the wifi menu, station mode (to connect to an AP) or AP mode (to create an AP).

But the choice could be forced in the configuration file by adding this parameter :

# ap: SoftAP mode
# sta: Station mode
# Remove the # to activate it
#WIFI_MODE=ap

The choice in the wifi menu is by passed by this value.

Station mode

To connect to an Access Point (station mode), add these parameters (minimal and default one) :

##### STA mode configuration ##########################################
# ESSID
ESSID=your_AP_SSID
# Passphrase. Leave empty at no security mode
PASSWORD=your_AP_password
# Device Name for AMBA Discovery Protocol (optional and different for each cam)
STA_DEVICE_NAME=the_name_you_want_to_use_for_your_cam 
# Static IP address if your access point does not have a DHCP server (remove # to activate)
#STA_IP=your_static_ip_address 

Access point mode

To create an Access Point (AP mode), add these parameters (default one):

##### SoftAP configuration ##########################################
# SSID (1 ~ 32 characters) default name is YDXJ_AP which is followed by random number, different each time,
# so change it to the name you want AP_SSID=the_name_you_want IP address (default one)
LOCAL_IP=192.168.42.1
# IP subnet mask
LOCAL_NETMASK=255.255.255.0
# IP pool starting address of DHCP server
DHCP_IP_START=192.168.42.2
# IP pool end address of DHCP server (should be DHCP_IP_START + AP_MAXSTA - 1)
DHCP_IP_END=192.168.42.6
# Wifi channel number, set 0 to use Auto Channel Selection
AP_CHANNEL=0
# Wifi channel 5G/2.4G, set 0 to use 2.4G Channel/set 1 to use 5G
AP_CHANNEL_5G=0
# Maximum number of stations allowed in station table
AP_MAXSTA=5
# If you say yes here, all WPA/WEP settings will be ignored
AP_PUBLIC=no
# WPA Passphrase (8 ~ 63 characters)
AP_PASSWD=the_password_you_want

Ethernet configuration

These parameters could be added with wifi parameters as both connection could be used in the same time.

To connect a USB host to the Yi (computer or smartphone), add these parameters :

##### Ethernet over USB configuration ##########################################
# Enable or not ethernet over USB (yes|no)
ETHER_MODE=no
# Keep wifi with ethernet connection (yes|no)
KEEP_WIFI=yes
# IP of the Yi
ETHER_IP=192.168.40.1