Network configuration for HydraFerret

Enfield Cat's Blog: Arduino and other projects.


HydraFerret can make use of both WiFi Station (STA mode) and access point (AP) mode. The use of physical (wired) Ethernet is not supported at this stage. Only Wifi connectivity is supported. In STA mode it relies on DHCP to get an IP address. Static IP configuration for STA mode may be supported in a later release.

On initial boot the STA access will not be configured, but the AP will start. This allows the initial configuration to be done either using the USB serial port or telnet. The initial password for WiFi/telnet is "MySecret" (without quotes and case sensitive).

It is possible to route a small volume of traffic through a HydraFerret unit. This allows data from a few other HydraFerret units to channel through another one, allowing the network to extend further. The reach of a WiFi network will be limited largely by obsticles such as walls or trees and will be further if there is clear line of sight between STA and AP. If both STA and AP are enabled, and assuming the STA is on and the AP is on, then a route can be configured through the HydraFerret unit as follows. example, on a host with IP address

route add -net netmask gw

Access Point

After initial configuration either set a secure password on the Access Point (AP) or disable it. Failure to do so potentially allows unauthorised people access to your network. You can change the AP password without changing / re-entering the AP name. Changing the telnet password is also recommended, although you may opt to use the same telnet password for all your Hyraferret devices.

[enable|disable] ap
    Enable/disable the Access Point
ap [<ap_password> [<ap_name>]]
    Set access point password and name. Default name matches device name.
ap [ip <ap-address>]
    Set access point IP address.
ap [channel <1-14>]
    Set access point WiFi channel.
ap [hidden <true|false>]
    Set access point hidden status (broadcast of SSID)
ap [connects [<1-13>]]
    Set access point maximum number of connections. Default is 4.

Station Mode

Up to 4 wifi networks and their passwords may be defined. If wifiscan is enabled, the HydraFerret unit will connect to the one with the strongest signal. However, with wifiscan enabled, the unit will not be able to connect to any networks with hidden SSIDs. If wifisan is disabled, the networks are tried in sequence and the first network found is used. Use a SSID one "none" to disable a network. The wifimode can be always on, which is required if the unit supports telnet connections. By setting wifimode to on demand, the station is only started when required, which can reduce power consumption of the HydraFerret unit.

wifi [<number> <ssid> [<password>]]
    configure wifi 0-3 with ssid and optional password
wifimode [alwayson|ondemand]
    set wifi to be "always on" or on connect "on demand"
wifiscan [enable|disable]
    set wifi to scan for non-hidden ssids and use strongest signal
    NB: the network used must be predefined by "wifi", or it will be ignored

Sundry network related commands

These control what services the HydraFerret unit offers or consumes. While the timezone is not strictly a network command, settting the timezone assumes the HydraFerret unit can access a Network Time Protocol (NTP) server. By enabling mDNS (Multicast Domain Name Service), it should be possible to ping or telnet to the HydraFerret unit as <name>.local from other devices on the same subnet.

[enable|disable] [ap|mdns|otaonboot|telnet]
    Enable or disable services
mdns <service> [tcp|udp]
    Search for a mdns service, defaults to TCP protocol
ntp [<server-name>|none]
    Set network time protocol (NTP) server to source time signal
ota [update|revert|<url>]
    Check and apply Over The Air (OTA) update
    Revert to previous installation.
    Set base URL for OTA metadata and image
timezone [defn]
    Set timezone, may be set using full TZ string or short cut
      use "list tz" for short-cuts, or enter time specification, eg
      UTC-03:00  for East African Time

Thank you for visiting camelthorn.cloudHome