Skip to content

Wi-Fi Interface

The CANlink® wireless 4000 offers a Wi-Fi interface, typically used in one of two modes:

  • CAN-Wi-Fi Interface
    CAN data is transmitted wirelessly to other Wi-Fi-capable devices such as PCs, smartphones, or tablets.
    Sometimes referred to as 'Gateway' mode in this document.

  • CAN-CAN-Wi-Fi Bridge
    CAN data is transmitted wirelessly between two CANlink® wireless 4000 devices via a Wi-Fi connection.
    The CAN-CAN-Wi-Fi Bridge acts as a substitute for CAN cables, e.g. in drag chains or remote control units.
    Sometimes referred to as 'Bridge' mode in this document

Tip

Only one Wi-Fi band should be enabled at one time on the Client:

  • CANopen object 0x3000:0x10 enables 2.4GHz
  • Object 0x3000:0x11 enables 5GHz

The band not used should be disabled.

CAN-Wi-Fi Interface

In operation as a CAN-Wi-Fi Interface, CAN data is transmitted wirelessly to other Wi-Fi-capable devices such as PCs, smartphones or tablets.
The CAN-Wi-Fi Interface features two operating modes: infrastructure mode and access point mode:

  • In infrastructure mode, data transmission takes place via one or more access points.
  • In access point mode, the CANlink® wireless 4000 additionally provides a Wi-Fi access point function.

Client and Server configurations

The CANlink® wireless 4000 can be configured to act in one of two roles over a Wi-Fi interface:

  • Server - which waits for incoming connection requests from one or more..
  • Client(s) - which attempts connection to a Server.

The Client is configured with the IP Address and appropriate port of the Server to connect to.

Tip

A device may either be configured as a Server, or a Client - not both.

  • A Server may accept up to seven connections from different Clients, and is discussed further in the MultiPoint.
  • A Client may only connect to one Server.

Encryption

The CANlink® wireless 4000 supports different Wi-Fi encryption schemes.

Name Authentication Data Protection Client Supported Server Supported
None (OSA) No No 🚫
WPA/WPA2 Mixed Yes (shared password) Data is encrypted

To configure the encryption level, set the value of the CANopen object 0x3000:0x04 [WiFi Authentication Type] according to the requirements:

  • 0: None (default)
  • 7: WPA/WPA2 Mixed

Warning

Firmware version ≥ 3.0

Using Open Authentication when device is configured as an Access Point is not supported in version ≥ 3.0.
Access Point authentication must be configured as 'WPA/WPA2 Mixed'.
The Access Point will not operate if 'WPA/WPA2 Mixed' is not configured, and a password specified in 0x3000:0x05 [WiFi Authentication Key].
(See Access Point Wi-Fi Password for more information).

Open Authentication is only available when configured in Infrastructure Mode (as a Client).

CAN-CAN-Wi-Fi Bridge

A Wi-Fi Bridge is how we refer to two CANlink® wireless 4000 devices connected directly to each other over a Wi-Fi connection.

One is configured as a Server, and the other, the Client.

The Server device can be configured in one of two ways:

  • as a Wi-Fi Access Point (AP), or
  • as a Wi-Fi Client connecting to an existing Wi-Fi Access Point.

In the first mode acting as an AP, 0x3000:0x09 [WiFi DHCP Mode] must be enabled.
In the second mode, an external Router must be used as the Access Point to which both devices connect.

CONFIGURING A BRIDGE

To start with a known 'clean' configuration, a factory reset can be initiated by writing 0x64616F6C to CANopen SDO object 0x1011:0x01.
See Factory Reset for details.

WiFi Server

Tip

This process can be simplified by using the configuration file clw400x_SetupWiFiServer.DOD to be found in the demo folder of the Proemion Configurator.

  1. Set Access Point Mode
    Set 0x3000:0x01 [Operating Mode] to 0x02 [Mini Access Point].

  2. Set SSID
    Set name of network as appropriate 0x3000:0x02 [SSID] to "CLW4000Server".

  3. Set Authentication
    0x3000:0x04 [Authentication Type] to 0x07 [WPA/WPA2 Mixed].

  4. Set appropriate password 0x3000:0x05 [WiFi Authentication Key] as appropriate.
    (Wi-Fi Password for more information).
    ChocolateCake4Breakfast!, for example.

  5. Set DHCP
    0x3000:0x09 [DHCP Mode] to 0x02 [Server].

  6. Set WiFi region as appropriate
    0x3000:0x25 [Wifi Region].

  7. Select RF channel
    Select an appropriate channel from the options in 0x3000:0x0F [WLAN - Access Point Channel].
    We recommend 5GHz band (channels from 36 to 165) unless necessary.

  8. Set IP Address as appropriate
    0x3000:0x0A [IP Address] to 192.168.0.34.

  9. Disable other interfaces
    Disable Bluetooth by setting 0x3008:0x03 [Bluetooth Enable] to 0x00.
    Disable BLE by setting 0x3008:0x09 [BLE Enable] to 0x00.

  10. Enable WiFi
    Set 0x3008:0x02 to 0x01

  11. Enable WiFi server
    Set 0x3010:0x15 [EEP Connection Direction Configuration/Server or Client 1] to 0x02 [Server enabled]

  12. Set connection type
    Set 0x3010:0x16 [EEP Connect Type 1] to 0x01 [Socket]

  13. Set CAN Node IDs as appropriate
    0x4050:0x03 [Node Id CAN1] to decimal 34.
    0x4050:0x04 [Node Id CAN2] to decimal 35.

  14. Reboot device

WiFi Client

Tip

This process can be simplified by using the file clw400x_SetupWiFiClient.DOD configuration to be found in the demo folder of the Proemion Configurator.

  1. Set Infrastructure Mode
    Set 0x3000:0x01 [Operating Mode] to 0x01 [Infrastructure].
  2. Set SSID
    Set Server name of network as appropriate 0x3000:0x02 [SSID] to "CANlink® wireless 4000Server".
  3. Set Authentication
    0x3000:0x04 [Authentication Type] to 0x07 [WPA/WPA2 Mixed].
  4. Set appropriate password
    0x3000:0x05 [WiFi Authentication Key] to the appropriate Server password.
  5. Set DHCP
    0x3000:0x09 [DHCP Mode] to 0x01 [DHCP Client (WLAN infrastructure only)].
  6. Set WiFi region as appropriate
    0x3000:0x25 [Wifi Region].

  7. Select RF band as appropriate

    If the Server is on channels 1 through 11 (2.4GHz).

    a. Set 0x3000:0x10 [Enable 2.4GHz WiFi Band / Infrastructure only] to 0x01.
    b. Set 0x3000:0x11 [Enable 5GHz WiFi Band / Infrastructure only] to 0x00.

    If the Server is on channels 36 through 165 (5GHz)

    c. Set 0x3000:0x10 [Enable 2.4GHz WiFi Band / Infrastructure only] to 0x00.
    d. Set 0x3000:0x11 [Enable 5GHz WiFi Band / Infrastructure only] to 0x01.

  8. Disable other interfaces
    Disable Bluetooth by setting 0x3008:0x03 [Bluetooth Enable] to 0x00.
    Disable BLE by setting 0x3008:0x09 [BLE Enable] to 0x00.

  9. Enable WiFi
    Set 0x3008:0x02 [Wlan Enable] to 0x01 [Enabled]
  10. Configure Connection Direction
    Set 0x3010:0x15 [EEP Connection Direction Configuration/Server or Client 1] to 0x03 [Client enabled].
  11. Set connection type Set 0x3010:0x16 [EEP Connect Type 1] to 0x01 [Socket].
  12. Set Server Address Set 0x3010:0x17 [EEP URL Address/Wlan Client only 1] to content of object 0x3000:0x0A [IP Address] in Server device.
  13. Set CAN Node IDs as appropriate
    0x4050:0x03 [Node Id CAN1] to decimal 44.
    0x4050:0x04 [Node Id CAN2] to decimal 45.

  14. Reboot device

A CAN-CAN bridge can be configured between a CANlink® mobile 3600 and CANlink® wireless 4000 over either a Wi-Fi or Bluetooth connection.

The Wi-Fi connection is recommended, and is documented here.

In this example, we configure the CANlink® mobile 3600 as:

  • Wi-Fi Access Point (AP)

  • Server

  • Channel 36, 5GHz band
  • WPA2 enabled
  • Password: ChocolateOnly4Breakfast!
  • CAN Node ID: 39
  • IP Address and Port 192.168.0.39:30000

And the CANlink® wireless 4000 as:

  • Wi-Fi Client

  • CAN Node ID: 44

All objects in the following table are mandatory to set for the wireless module to function as a Wi-Fi Access Point.

Object Object Name Value Notes
0x3008:0x03 Bluetooth Enable 0 Disabled
0x3008:0x09 BLE Enable 0 Disabled
0x3008:0x02 WiFi Enable 1 Enabled
0x3000:0x0F WLAN - Access Point Channel 36 Channel 36 in 5GHz band
0x3000:0x01 WLAN - Operating Mode 2 Mini Access Point
0x3000:0x09 WLAN - DHCP Mode 2 DHCP Server
0x3000:0x02 WLAN - SSID CLM3600 Name of Network SSID
0x3000:0x04 WLAN - Authentication Type 7 WPA2
0x3000:0x05 WLAN - Authentication Key ChocolateOnly4Breakfast! Network Key
0x3003:0x01 WLAN - Socket Server Enable 1 Enabled
0x3000:0x0A WLAN - Static IP Address 192.168.0.39 Address of Server
0x3000:0x0B WLAN - Static Network Mask 255.255.255.0 Network Mask
0x3000:0x0C WLAN - Static Gateway Address 192.168.0.1 Gateway Address
0x3000:0x0D WLAN - Static Primary DNS Server 192.168.0.1 Address of Server
0x3000:0x0D WLAN - Static Secondary DNS Server 192.168.0.1 Address of Server
0x3003:0x02 WLAN - Socket Listen Port Number 30000 Port Number
0x3003:0x03 WLAN - Socket Listen Protocol 0 TCP
  1. Add other settings such as 0x4050:0x03 [CAN 1: Device CANopen Node ID] according to requirements. (In this example, 39).
  2. Reboot device
Object Object Name Value Notes
0x3008:0x03 Bluetooth Enable 0 Disabled
0x3008:0x09 BLE Enable 0 Disabled
0x3008:0x02 WiFi Enable 1 Enabled
0x3000:0x01 WiFi Operating Mode 1 Infrastructure
0x3000:0x09 WiFi DHCP Mode 1 DHCP Client
0x3000:0x04 WLAN Authentication Type 7 WPA/WPA2 Mixed
0x3000:0x02 WLAN SSID CLM3600 Name of Network SSID
0x3000:0x05 WLAN - Authentication Key ChocolateOnly4Breakfast! Network Key
0x3010:0x17 URL Address/WiFi Client only 1 192.168.0.39 Server IP Address
0x3003:0x02 Socket Listen Port/WiFi only 1 30000 Server Port Number
0x3000:0x10 Enable 2.4GHz WiFi Band / Infrastructure only 0 Disabled
0x3000:0x11 Enable 5GHz WiFi Band / Infrastructure only 1 Enabled
0x3010:0x15 EEP Connection Direction Configuration/Server or Client 1 3 Client Enabled
0x3010:0x16 EEP Connect Type 1 1 TCP Socket
  1. Add other settings such as 0x4050:0x03 [CAN 1: Device CANopen Node ID] according to requirements. (In this example, 44).
  2. Reboot device

Wi-Fi Password

Access Point

When configured as a Wi-Fi Access Point (AP), the CANlink® wireless 4000 allows connections from one or more Wi-Fi Clients.
(More than one connection to a Client requires Multipoint/MultiTalk).

In order to prevent an insecure network, the AP must be configured:

  • with WPA2 enabled, and
  • with a 'complex' password

The password requirements mandate all of the following:

  • length between 24 and 63 characters
  • at least 1 lower case
  • at least 1 upper case
  • at least 1 numerical (0 - 9)
  • 1 special character (! # &, etc)

Tip

If the AP does not accept Client connections, check 0x3001:0x0C [Error Code/ WiFi - Bluetooth].

  • If the password is not valid when creating the AP, the error code 0xDEADC0D1 will be present.
  • If the AP was started with Open Authentication selected, the error code 0xDEADC0DE will be present.

Client Configuration

When configured as a Client, any form of connection may be made:

  • 0: Open authentication (None)
  • 7: WPA/WPA2 Mixed with whatever password is configured on the Server.

Hidden Wi-Fi SSID

The CANlink® wireless 4000, if defined as a Wi-Fi® Access Point (AP), can disable the broadcast of the network SSID.
Clients can still connect to this AP, but they must know the SSID beforehand.

Also, when configured as a Client device, it is possible to connect to an AP with a hidden SSID (if that SSID is known).

Server Configuration

The device must be initially configured as a Wi-Fi® Server.

  1. Set 0x3000:0x1F [WiFi Hide SSID broadcast] to 1 (Enabled).

  2. Hidden SSID is only possible within a secure network, therefore, set 0x3000:0x04 [WiFi Authentication Type] to 7 [WPA/WPA2 Mixed] to enable it.

  3. Since WPA/WPA2 has been selected, a password must be configured in 0x3000:0x05 [WiFi Authentication Key].

The SSID will be hidden upon next boot of the device, and will remain hidden until either being disabled, or a Factory Reset is performed.

Client Configuration

No specific client configuration is needed in order to connect to an Access Point (AP) with a hidden SSID.

As long as the authentication 0x3000:0x04 [WiFi Authentication Type] is set to 7 [WPA/WPA2 Mixed], the correct SSID in 0x3010:0x1A [Bluetooth SPP MAC Address 1] will connect, independently of a hidden Wi-Fi® SSID.

Wi-Fi Frequencies and Channels

When configured as a mini-Access Point, the CANlink® wireless 4000 can operate one of many channels.

The Server selects the channel (which defines the frequency), and the Client selects the band, and connects on that frequency if the SSID is found.
(This is not 100% true, if User-defined channels are utilized).

Note

Not all channels are available in all regions worldwide.
See Regions for details.

Band Channel
2.4 GHz 1 2 3 4 5 6
(default)
7 8 9 10 11 12 13
5GHz 36 40 44 48 149 153 157 161 165

Setting the channel

Server

  1. Simply write the channel value into 0x3000:0x0F [Access Point WiFi Channel / MiniAP only]

Client

According to the Access Point channel selected, enable the appropriate band into the device when configured as a Client.

For any channel in the 2.4GHz band:

  • Set 0x3000:0x10 [Enable 2.4GHz WiFi Band / Infrastructure only] to 0x01.
  • Set 0x3000:0x11 [Enable 5GHz WiFi Band / Infrastructure only] to 0x00.

If the Access Point is in the 5GHz band:

  • Set 0x3000:0x10 [Enable 2.4GHz WiFi Band / Infrastructure only] to 0x00.
  • Set 0x3000:0x11 [Enable 5GHz WiFi Band / Infrastructure only] to 0x01.

User-defined channels

A CANlink® wireless 4000 acting in an Wi-Fi Infrastructure role can be configured to connect to only specified channels.
This differs from typical Wi-Fi behavior in which the Access Point determines the channel; the Infrastructure device selects the band, and connects to any channel in that band with the correct SSID.

Note

This is an Infrastructure-only setting - the Access Point is not affected with this feature.

This behavior supports:

  • different network segments with different Infrastructure devices on different channels with the same SSID
  • faster time to reacquire the connection after a Infrastructure device reboot (because every channel need not be scanned for)

This second point exists because each channel is scanned in turn, and reducing the number to scan improves connection time.

Tip

To reduce the connection time as much as possible, disable the band not used.
These objects are: - 0x3000:0x10 [Enable 2.4GHz WiFi Band / Infrastructure only] - 0x3000:0x11 [Enable 5GHz WiFi Band / Infrastructure only]

Configuration (2.4GHz)

0x3000:0x1A [User Defined Channels 2.4 GHz]
This is a 16bit object.

bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
Channel 13 12 11 10 9 8 7 6 5 4 3 2 1
  • Each bit in this bitmask enables an individual channel when set, and disables that channel when zero.
  • If the channel to be connected to is not enabled, no connection will occur.
  • Enabling all bits is equivalent to the value 0, which means the device can connect to any channels.

Default: 0 (all channels enabled)

Example

For the fastest possible connection speed:

  1. If the Access Point has enabled channel 5 in the 2.4GHz band, set 0x3000:0x1A [User Defined Channels 2.4 GHz] to 0x20 in the device configured as an Infrastructure device.
  2. Enable 0x3000:0x10 [Enable 2.4GHz WiFi Band / Infrastructure only]
  3. Disable 0x3000:0x11 [Enable 5GHz WiFi Band / Infrastructure only]

Configuration (5GHz)

Object to set: 0x3000:0x1B [User Defined WiFi 5GHz Channels]
This is a 32bit object.

bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
Channel 165 161 157 153 149 48 44 40 36
  • Each bit in this bitmask enables an individual channel when set, and disables that channel when zero.
  • If the channel to be connected to is not enabled, no connection will occur.
  • Enabling all bits is equivalent to the value 0, which means the device can connect to any channels.

Default: 0 (all channels enabled)

Example

For the fastest possible connection speed:

  1. If the Access Point has enabled channel 149 in the 5GHz band, set 0x3000:0x1B [User Defined WiFi 5GHz Channels] to 0x0010 in the device configured as an Infrastructure device.
  2. Enable 0x3000:0x11 [Enable 5GHz WiFi Band / Infrastructure only]
  3. Disable 0x3000:0x10 [Enable 2.4GHz WiFi Band / Infrastructure only]

Automatic Channel Selection

A CANlink® wireless 4000 acting in an Wi-Fi Access Point role can be configured to automatically select the least crowded RF channel.
When configured in this mode, before starting the Wi-Fi interface, the device quickly scans all channels and selects the one with the least traffic on it at that time.

Warn

This does not re-evaluate the selected channel while in use:

  • the channel is not changed according to new interference on that channel, or reduced traffic on another
  • the connection remains on the automatically selected channel until the connection is stopped, and restarted

Automatic Channel Selection (ACS) can reduce interference, and therefore may improve bandwidth and mean latency of the connection in congested environments.

Enabling and disabling

Object to configure

0x3000:0x0F [Access Point WiFi Channel / MiniAP]
This is a 32bit object.

In this object, a value of 0 enables Automatic Channel Selection (ACS).
Any other value will select a specific channel. (See Setting the channel).

This ACS mode is available only on an Access Point device.

Default: 6 (channel 6 in the 2.4GHz band).

Note

The CANlink® wireless 4000 does not support Dual-Band mode when configured as an AP.
If both bands are enabled (or neither), the 2.4GHz band is enabled by default.

Configuration (2.4GHz)

To ensure that the channel is in the 2.4GHz band, only that band must be selected:

  • 0x3000:0x10 [Enable 2.4GHz WiFi] must be set to 1.
  • 0x3000:0x11 [Enable 5GHz WiFi] must be reset to 0.

Configuration (5GHz)

To ensure that the channel is in the 5GHz band, only that band must be selected:

  • 0x3000:0x10 [Enable 2.4GHz WiFi] must be reset to 0.
  • 0x3000:0x11 [Enable 5GHz WiFi] must be set to 1.