The following documentation is for the LAN Bridge device CFLink protocol messages.
The LAN Bridge also has an on-board RS232 port, for which documentation is available in the On-Board RS232 docs.
The following communication slots exist on a LAN Bridge:
1
= CFLink slot2
= On-board RS232 slot3
= UDP Broadcasting slot (not available for subscriptions, can only be enabled/disabled via UDB command)4
- 10
= Reserved for future use11
- 20
= Configurable as TCP or UDP communicationBy default, authentication on LAN Bridge is disabled. To enable it, use the Configure Password command.
When authentication is enabled, the LAN Bridge will send a RLANATH
command when first connecting. When this command has been sent, no other commands will be accepted until the correct username and password has been received.
If an incorrect login message is received, the LAN Bridge will respond with ''RLANERR'' message, with error code 134.
Once successfully logged in, the LAN Bridge will reply with RLANWHO
response to acknowledge that login is correct and the device will now respond to other commands.
The WHO
query is used to discover what device is at a specific address.
The WHO
reply will be automatically broadcast as a notification to the CFLink network when a device is powered up or reset.
The WHO
query does not have any associated data.
> [F2]<ID>[F3]QCFXWHO[F4][F5][F5]
< [F2]<ID>[F3]RLANWHO[F4]LANBridge:<SERIAL#>:<APP_VER>:<CFLINK_VER>:<IP4>:<MAC>[F5][F5]
// Request the details for the device at CFLink ID [02] > [F2][02][F3]TCFXWHO[F4][F5][F5] // The Reply if a LAN Bridge is found < [F2][02][F3]RLANWHO[F4]LANBridge:00000012:1.0.1:1.0.4:192.168.0.100:00.04.A3.19.D5.70[F5][F5]
The CFG
query is used to obtain details about the configuration of a specific LAN Bridge unit.
The CFG
query does not have any associated data.
> [F2]<ID>[F3]QLANCFG[F4][F5][F5]
< [F2]<ID>[F3]RLANCFG[F4]<IPADDRESS>:<SUBNETMASK>:<GATEWAY>:<DNS>:<DHCPMODE>:<RS232MODE>:<BAUD>:<DATABITS>:<PARITY>:<STOPBITS>:<FLOWCONTROL>:<UDPBROADCAST>:<SLOTS>[F5][F5]
0
or 1
).PGM
or 232
).N
NoneO
OddE
Even1
or 2
).0
= None, 1
= RTS/CTS).0
or 1
).
// Query configuration of LAN Bridge on ID [02] > [F2][02][F3]QLANCFG[F4][F5][F5] // Configuration query reply < [F2][02][F3]RLANCFG[F4]192.168.0.100:255.255.255.0:192.168.0.1:PGM:115200:8:N:1:1:1:3[F5][F5]
The SLT query returns the configuration of a specific communication slot.
> [F2]<ID>[F3]QLANSLT[F4]<SLOT#>[F5][F5]
// If the slot is configured for TCP communications: < [F2]<ID>[F3]RLANSLT[F4]<SLOT#>:TCP:<TCPMODE>:<IPADDRESS>:<PORT>:<TIMEOUT>:<MAXCONNECTIONS>:<ECHO>[F5][F5] // If the slot is configured for UDP communications: < [F2]<ID>[F3]RLANSLT[F4]<SLOT#>:UDP:<UDPMODE>:<IPADDRESS>:<PORT>[F5][F5]
S
or client C
.U
, Multicast M
, Broadcast B
.0.0.0.0
to allow connections from any IP Address)255.255.255.255
to send to all IP Addresses)0
= Disable timeout.0
= Unlimited connections. Ignored for TCP Client slots.0
or 1
)
// Query the configuration for slot 12 of LAN Bridge on ID [02] > [F2][02][F3]QLANSLT[F4]12[F5][F5] // Reply when slot configured as a TCP Server < [F2][02][F3]RLANSLT[F4]12:TCP:11:S:0.0.0.0:9602:0:10:1[F5][F5] // Query the configuration for slot 13 of LAN Bridge on ID [02] > [F2][02][F3]QLANSLT[F4]13[F5][F5] // Reply when slot configured for UDP Unicast < [F2][02][F3]RLANSLT[F4]13:UDP:U:192.168.0.100:9601[F5][F5]
The SLS
query returns the configuration of a specific communication slot's startup command.
> [F2]<ID>[F3]QLANSLS[F4]<SLOT#>[F5][F5]
// If the slot has a startup command assigned: < [F2]<ID>[F3]RLANSLS[F4]<SLOT#>:<DELAY>:<COMMAND>[F5][F5] // If the slot has no startup command < [F2]<ID>[F3]RLANSLT[F4]<SLOT#>:0:[F5][F5]
10
= 1 second.
// Query the startup configuration for slot 12 of LAN Bridge on ID [02] > [F2][02][F3]QLANSLS[F4]12[F5][F5] // Reply when the data 'Startup Command Data <Carriage Return>' is to be sent after a 1 second delay. < [F2][02][F3]RLANSLS[F4]12:10:Startup Command Data\x0D[F5][F5] // Query the configuration for slot 13 of LAN Bridge on ID [02] > [F2][02][F3]QLANSLS[F4]13[F5][F5] // Reply when no startup command is defined < [F2][02][F3]RLANSLS[F4]13:0:[F5][F5]
The SUB query returns the configuration of a specific slot subscription.
Each communication slot (Slot A) can be subscribed to another slot (Slot B). Only one subscription per slot is allowed.
So to retrieve the subscription details, you need to provide the slot number for the Slot A parameter.
> [F2]<ID>[F3]QLANSUB[F4]<SLOT#>[F5][F5]
< [F2]<ID>[F3]RLANSUB[F4]<SLOTA>:<SLOTB>:<CFLINKID>:<MODULE>:<TXCOMMANDNAME>:<RXCOMMANDNAME>[F5][F5]
2
or 11
-20
). See SUB Configuration Command for more details1
, 2
or 11
-20
)1
).0
means not subscribed to a module. (optional)1
. If <RXCOMMANDNAME> is left empty, then all data received on <SLOTB> will be sent out <SLOTA> in it's full CFLink protocol format.
// Query subscription config for slot 12 of a LAN Bridge on CFLink ID [02] > [F2][02][F3]QLANSUB[F4]12[F5][F5] // Slot 12 is subscribed to CFLink Slot 0, to CFLink ID [03], Module 1. // All incoming data from slot 12 will be wrapped into a CFLink protocol message for setting relay states. // All outgoing data to slot 12 will be stripped from a relay state reply < [F2][02][F3]RLANSUB[F4]12:0:03:M1:TRLYSET:RRLYSTA[F5][F5] // Query subscription config for slot 13 of a LAN Bridge on CFLink ID [02] > [F2][02][F3]QLANSUB[F4]13[F5][F5] // Slot 13 is subscribed to Slot 14 (possibly a TCP Client slot subscribed to a TCP Server) < [F2][02][F3]RLANSUB[F4]13:14[F5][F5]
The TME
query will return the current configuration of the real time clock on-board the LAN Bridge.
The TME
query does not have any associated data.
> [F2]<ID>[F3]QLANTME[F4][F5][F5]
< [F2]<ID>[F3]RLANTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<UTCTIMEZONESTR>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5]
01
-12
).01
-31
).1
, Saturday = 7
(1
-7
)00
-23
)00
-59
)00
-59
)Available time server IDs:
1
= pool.ntp.org2
= europe.pool.ntp.org3
= asia.pool.ntp.org4
= oceania.pool.ntp.org5
= north-america.pool.ntp.org6
= south-america.pool.ntp.org7
= africa.pool.ntp.org
// Query time from LAN Bridge on CFLink ID [02] > [F2][02][F3]QLANTME[F4][F5][F5] // Reply < [F2][02][F3]RLANTME[F4]2011:10:27:3:18:12:12:29:UTC+8.00:1:4[F5][F5]
The PWD
command configures a password that must be sent before any additional commands will be accepted. By default the password is disabled.
To clear the login, you must first have issued the correct login/password, then send this command without any username or password data.
> [F2]<ID>[F3]CLANPWD[F4]<USER>:<PASSWORD>[F5][F5]
// The reply is just an echo of the command in reply format, without the password . < [F2]<ID>[F3]RLANPWD[F4]<USER>[F5][F5]
// Configure username as 'admin' and password as 'mysecretpass' of LAN Bridge on CFLink ID [02] > [F2][02][F3]CLANPWD[F4]admin:mysecretpass[F5][F5] // Reply < [F2][02][F3]RLANPWD[F4]admin[F5][F5] // Remove the login completely from LAN Bridge on CFLink ID [02] > [F2][02][F3]CLANPWD[F4][F5][F5] // Reply < [F2][02][F3]RLANPWD[F4][F5][F5]
The IP4
command will configure the IPv4 address used by the LAN Bridge if DHCP is disabled. It will be ignored if DHCP is enabled.
The change will not take effect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANIP4[F4]<IPADDRESS>[F5][F5]
// The reply is just an echo of the command in reply format. // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANIP4[F4][F5][F5]
// Configure IP Address of LAN Bridge on CFLink ID [02] > [F2][02][F3]CLANIP4[F4]192.168.0.100[F5][F5] // Reply < [F2][02][F3]RLANIP4[F4][F5][F5]
The SNM
(Subnet Mask) command will configure the subnet mask used by the LAN Bridge if DHCP is disabled. It will be ignored if DHCP is enabled.
The change will not take effect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANSNM[F4]<SUBNETMASK>[F5][F5]
// The reply is just an echo of the command in reply format. // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANSNM[F4][F5][F5]
// Configure Subnet Mask of LAN Bridge on CFLink ID [02] > [F2][02][F3]CLANSNM[F4]255.255.255.0[F5][F5] // Reply < [F2][02][F3]RLANSNM[F4][F5][F5]
The GTW
(Gateway) command will configure the default gateway used by the LAN Bridge if DHCP is disabled. It will be ignored if DHCP is enabled.
The change will not take effect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANGTW[F4]<GATEWAY>[F5][F5]
// The reply is just an echo of the command in reply format. // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANGTW[F4][F5][F5]
// Configure Default Gateway of LAN Bridge on CFLink ID [02] > [F2][02][F3]CLANGTW[F4]192.168.0.1[F5][F5] // Reply < [F2][02][F3]RLANGTW[F4][F5][F5]
The DNS
(Domain Name System) command will configure the DNS Server used by the LAN Bridge if DHCP is disabled. It will be ignored if DHCP is enabled.
The change will not take effect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANDNS[F4]<DNS>[F5][F5]
// The reply is just an echo of the command in reply format. // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANDNS[F4][F5][F5]
// Configure DNS of LAN Bridge on CFLink ID [02] > [F2][02][F3]CLANDNS[F4]192.168.0.1[F5][F5] // Reply < [F2][02][F3]RLANDNS[F4][F5][F5]
The DHC (DHCP) command will configure the DHCP mode of the LAN Bridge.
The change will not take affect until the LAN Bridge is rebooted.
DHCP Mode is enabled by default.
> [F2]<ID>[F3]CLANDHC[F4]<DHCP>[F5][F5]
1
or 0
).
// The reply is just an echo of the command in reply format. // The change does not take affect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANDHC[F4][F5][F5]
// Disable DHCP mode of LAN Bridge on CFLink ID [02] > [F2][02][F3]CLANDHC[F4]0[F5][F5] // Reply < [F2][02][F3]RLANDHC[F4][F5][F5]
The UDB
(UDP Broadcast) command is used to enable/disable broadcasting of UDP Data from CFLink.
The change will take affect immediately.
UDP Broadcasting is enabled by default.
> [F2]<ID>[F3]CLANUDB[F4]<UDBMODE>[F5][F5]
1
or 0
).
// The reply is an echo of the command in reply format. < [F2]<ID>[F3]RLANUDB[F4]<UDBMODE>[F5][F5]
// Disable UDB mode of LAN Bridge on CFLink ID [02] > [F2][02][F3]CLANUDB[F4]0[F5][F5] // Reply < [F2][02][F3]RLANUDB[F4]0[F5][F5]
The SLT
(Slot TCP) command is used to configure a communication slot for TCP communication.
The change will not take effect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANSLT[F4]<SLOT#>:<TCPMODE>:<IPADDRESS>:<PORT>:<TIMEOUT>:<MAXCONNECTIONS>:<ECHO>[F5][F5]
S
for TCP Server, C
for TCP Client.0.0.0.0
to allow connections from any IP Address)0
= Disable timeout. Valid range 0
-4294967295
seconds.0
= Unlimited connections. Ignored for TCP Client slots. Valid range 0
-25
.0
or 1
)
// The reply is an echo of the command in reply format. // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANSLT[F4][F5][F5]
// Configure slot 11 to be a TCP Server, on LAN Bridge ID [02] > [F2][02][F3]CLANSLT[F4]11:S:0.0.0.0:9601:0:10:1[F5][F5] // Reply < [F2][02][F3]RLANSLT[F4][F5][F5]
The SLU
(Slot UDP) command is used to configure a communication slot for UDP communication.
The change will not take effect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANSLU[F4]<SLOT#>:<UDPMODE>:<IPADDRESS>:<PORT>[F5][F5]
U
for Unicast, M
for Multicast, B
for Broadcast.(255.255.255.255
to send to all IP Addresses)
// The reply is an echo of the command in reply format. // The change does not take affect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANSLU[F4][F5][F5]
// Configure slot 12 to be UDP Unicast, on LAN Bridge ID [02] > [F2][02][F3]CLANSLT[F4]12:U:192.168.0.101:9602[F5][F5] // Reply < [F2][02][F3]RLANSLU[F4][F5][F5]
The SLO
(Slot Off) command is used to disable a specific communication slot.
The change will not take affect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANSLO[F4]<SLOT#>[F5][F5]
// The reply is an echo of the command in reply format. // The change does not take affect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANSLO[F4][F5][F5]
// Disable slot 13 on LAN Bridge ID [02] > [F2][02][F3]CLANSLO[F4]13[F5][F5] // Reply < [F2][02][F3]RLANSLO[F4][F5][F5]
The SLS
(Slot Startup) command is used to configure a communication slot startup command for TCP communication slots.
The startup command is sent whenever a client connects (if TCP Server mode) or whenever the slot connects to a server (if TCP Client mode), with an adjustable delay.
The startup command has no effect on UDP slots.
The change will not take effect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANSLS[F4]<SLOT#>:<DELAY>:<COMMAND>[F5][F5]
11
to 20
only.10
= 1 second. Max allowed delay value is 9999999
(999999.9 seconds)
// The reply is an echo of the command in reply format. // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANSLS[F4][F5][F5]
// Configure slot 11 on LAN Bridge ID [02] to send a startup command 'Hello World <Carriage Return>' after a 1.5 second delay. > [F2][02][F3]CLANSLS[F4]11:15:Hello World\x0D[F5][F5] // Reply < [F2][02][F3]RLANSLS[F4][F5][F5]
The SLD
(Slot Startup Delete) command is used to remove the startup command for a specific communication slot.
The change will not take effect until the LAN Bridge is rebooted.
> [F2]<ID>[F3]CLANSLD[F4]<SLOT#>[F5][F5]
// The reply is an echo of the command in reply format. // The change does not take effect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANSLD[F4][F5][F5]
// Remove the startup command from slot 11 on LAN Bridge ID [02]. > [F2][02][F3]CLANSLD[F4]11[F5][F5] // Reply < [F2][02][F3]RLANSLD[F4][F5][F5]
The SUB
(Subscription) command is used to configure a slot subscription. A subscription is a way to send/receive data between two communication slots on the LAN Bridge automatically.
When subscribing to the CFLink slot, a subscription can be refined to communicate only with a device at a specific CFLink ID and optionally which module.
When subscribing to the CFLink slot, a subscription can also handle automatically manipulating the incoming data to wrap it in CFLink protocol formatting, and stripping the CFLink formatting before sending the outgoing data.
This allows TCP/UDP communication slots to send basic commands like P01:0|P02:0
and have it automatically wrapped into a CFLink command targeted at a specific device and module to open relays in this example.
And the same in reverse, taking CFLink protocol message and only sending the data segment.
See the Common Definitions for a list of available communication slots.
> [F2]<ID>[F3]CLANSUB[F4]<SLOTA>:<SLOTB>:<CFLINKID>:<MODULE>:<TXCOMMANDNAME>:<RXCOMMANDNAME>[F5][F5]
2
or 11
-20
).0
,1
, 2
or 11
-20
). 0
= Turn off subscription for <SLOTA>.1
(CFLink), the CFLink ID is the device on the CFLink network to forward data to/from. This allows you to subscribe a communication slot to a single device on the network. (used only when <SLOTB> is configured to CFLink Slot 1
).0
means not subscribed to a module. (optional)1
. If <TXCOMMANDNAME> is left empty, then all data received on <SLOTA> will be sent out <SLOTB> without any manipulation, and must be valid CFLink protocol.1
. If <RXCOMMANDNAME> is left empty, then all data received on <SLOTB> will be sent out <SLOTA> in it's full CFLink protocol format.
// The reply is an echo of the command in reply format. // The change does not take affect until the LAN Bridge is rebooted, so the reply will not contain any data. < [F2]<ID>[F3]RLANSUB[F4][F5][F5]
// Subscribe slot 12 to CFLink Slot 1, CFLink ID [02], Module 1, with relay commands for manipulating incoming/outgoing data > [F2][02][F3]CLANSUB[F4]12:1:02:M1:TRLYSET:RRLYSTA[F5][F5] // Reply < [F2][02][F3]RLANSUB[F4][F5][F5]
The TME command is used to set the time and date settings for the real time clock on-board the LAN Bridge.
> [F2]<ID>[F3]CLANTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5]
01
-12
).01
-31
).1
, Saturday = 7
(1
-7
)00
-23
)00
-59
)00
-59
)Available time server IDs:
1
= pool.ntp.org2
= europe.pool.ntp.org3
= asia.pool.ntp.org4
= oceania.pool.ntp.org5
= north-america.pool.ntp.org6
= south-america.pool.ntp.org7
= africa.pool.ntp.org
// Reply with the data used to configure the time/date. < [F2]<ID>[F3]RLANTME[F4]<YEAR>:<MONTH>:<DATE>:<DAYOFWEEK>:<HOUR>:<MINUTE>:<SECOND>:<UTCTIMEZONE>:<UTCTIMEZONESTR>:<NTP_SYNC>:<NTP_SERVER_ID>[F5][F5]
// Configure the real time clock on a LAN Bridge ID [02] > [F2][02][F3]CLANTME[F4]2011:12:27:3:18:12:12:29:1:4[F5][F5] // Reply < [F2][02][F3]RLANTME[F4]2011:12:27:3:18:12:12:29:UTC+8.00:1:4[F5][F5]
The PWD
(Password) command allows you to login to a LAN Bridge that has a login configured.
No other commands will be accepted until the correct login details are entered if a login has been configured.
> [F2]<ID>[F3]TLANPWD[F4]<USER>:<PASSWORD>[F5][F5]
< [F2]<ID>[F3]RLANPWD[F4]<USER>[F5][F5]
// Login to LAN Bridge on CFLink ID [02] with username 'admin' and password 'mysecretpass' > [F2][02][F3]TLANPWD[F4]admin:mysecretpass[F5][F5] // Reply < [F2][02][F3]RLANPWD[F4]admin[F5][F5]
The SND
(Send) command allows you to send data to a specific communication slot defined on the LAN Bridge.
Any other communication slots subscribed to the slot targeted by the SND
command will also receive the data.
This command is not to be used to send data to the RS232 slot (Slot 1), instead use the ''SPW'' Command common to all devices with an on-board RS232 port.
> [F2]<ID>[F3]TLANSND[F4]<SLOT#>:<DATA>[F5][F5]
// In an effort to reduce network traffic on the CFLink bus, the reply will not contain the <DATA> sent, only the slot it was sent to. < [F2]<ID>[F3]RLANSND[F4]<SLOT#>[F5][F5]
// Send a command to an ethernet device connected to slot 11, for LAN Bridge on CFLink ID [02] > [F2][02][F3]TLANSND[F4]11:Hello World!\x0D[F5][F5] // Reply < [F2][02][F3]RLANSND[F4]11[F5][F5]
01
- UTC-120002
- UTC-110003
- UTC-100004
- UTC-93005
- UTC-90006
- UTC-80007
- UTC-70008
- UTC-60009
- UTC-50010
- UTC-43011
- UTC-40012
- UTC-33013
- UTC-30014
- UTC-20015
- UTC-10016
- UTC-017
- UTC+10018
- UTC+20019
- UTC+30020
- UTC+33021
- UTC+40022
- UTC+43023
- UTC+50024
- UTC+53025
- UTC+54526
- UTC+60027
- UTC+63028
- UTC+70029
- UTC+80030
- UTC+84531
- UTC+90032
- UTC+93033
- UTC+100034
- UTC+103035
- UTC+110036
- UTC+113037
- UTC+120038
- UTC+124539
- UTC+130040
- UTC+1400