Wednesday, 5 October 2016

Ciseco Slice of Radio, SRF and AT commands.

If you've used a Slice of Radio or any of the Ciseco RF modules like the SRF or RFu328, then you might be sad to hear that Ciseco/WirelessThings are no more. Unfortunately, that also means that the documentation doesn't exist any longer either, as their web presence disappeared.  While I don't have much documentation, I did create a list of AT commands that the SRF and XRF radio modules accept.




Command
Description
Notes
AT
Null command
Does nothing. Can be used to keep the SRF from leaving Command Mode.
ATAC
Apply Changes
Returns OK and then applies changes to baud rate, flow control, radio data rate and radio freq. where supported.
NOTE: If you have changed the baud rate then after the OK message you will need to change the baud rate at the other end.
ATBD
Baud rate
Requests / sets the Baud rate on the Serial data input. N
Not changed until applied (ATAC).
This command takes a hexadecimal parameter, as follows:
Baud rate     Parameter
 1200            4B0
2400             960
4800             12C0
9600             2580      (Factory default)
31250          7A12       (MIDI)
38400          9600
57600          E100
115200        1C200
ATCC
Guard character
Change command mode guard character. Default is ‘+’
ATCH
Frequency band
Set/Get frequency band

1 – 915MHz (Factory default US & Canada)
2 – 903MHz
3 – 868MHz
4 – 433.5MHz
5 – 868.3MHz (Factory default Europe)
6 – 315MHz

The effective frequency is calculated by taking the channel number (ATCN) and multiplying by the channel spacing (ATCS) then adding the base frequency (ATCH).

Not changed until explicitly applied (ATAC)
ATCN
Channel number
Set/Get channel number  in the range 0-FF hexadecimal (0-255 decimal); the Factory Default is 0.

The effective frequency is calculated by taking the channel number (ATCN) and multiplying by the channel spacing (ATCS) then adding the base frequency (ATCH).

Not changed until explicitly applied (ATAC)
ATCS
Channel Spacing
Set/Get channel spacing in kHz in the range 1-FF hexadecimal (1-255 decimal); the Factory Default is C8 (200 decimal).

The effective frequency is calculated by taking the channel number (ATCN) and multiplying by the channel spacing (ATCS) then adding the base frequency (ATCH).

Not changed until explicitly applied (ATAC)
ATDN
Done
Exit AT command mode
ATDR
Data Rate
Set/Get Data rate
1 - 250Kbps (default)
2 - 38.4Kbps
3 - 1.2Kbps
4 - 100Kbps
5 - 50Kbps

Not changed until explicitly applied (ATAC)
ATEA
Encryption key - ASCII
Requests / sets the encryption key using a word or phrase of up to 16 ASCII characters, e.g. ATEA MyHouseName.
The text you enter will be encrypted using an internal key into a 128 bit encryption key. Entering the command without data will return the current encryption key decrypted with the internal key.
The encryption key should be the same for all connected SRFs
ATEE
Enable encryption
Requests / sets encryption on or off:
0 – no encryption (Factory Default)
1 – enable encryption
Not changed until explicitly applied (ATAC)
ATEK
Encryption key - Hexadecimal
Requests / sets the encryption key using a hexadecimal string of 32 characters, e.g.
ATEK 8BAD3E4F5C2B9A34325F2F1ABDF5A236
Note that the key has to have exactly 32 hex characters or an error will be returned.
The encryption key should be the same for all connected SRFs
ATFC
Flow control
    Requests / sets the serial output flow control:
    0 – no flow control (Factory Default)
    1 – enable CTS (XRF Pin 4) to regulate flow of data from the XRF to the serial port
    2 - enable RTS (XRF Pin 12) to regulate flow of data from the serial port to the XRF
    3 - enable both CTS + RTS
    No data will be output from the serial port whilst CTS is held high.  Holding CTS low or leaving it floating will enable serial output as the pin is pulled low internally.
    Not changed until explicitly applied (ATAC)
    Note: There are conflicting standards here. To avoid confusion this is what we mean here by RTS and CTS:
    • CTS is an input to the XRF when high the XRF will not send characters to the serial port, when low the serial port output is enabled as normal.
    • RTS is an output from the XRF to allow an attached processor to control the flow of characters into the XRF serial port. When high the serial input buffer is getting full and the attached processor should stop sending data, when low the serial buffer has enough space and sending data can be resumed.
ATFH
High threshold value
RTS (XRF pin 12) is set HIGH when there is less than this number of free bytes in the input buffer. Default ATFH 18 (24 decimal)
ATFL
Low threshold value
RTS (XRF pin 12) is set LOW when there is at least this number of free bytes in the input buffer. Default ATFL 30 (48 decimal)
ATID
PAN ID
Requests / sets the PAN ID using four hexadecimal characters in the range 0000 – EFFF. Values between F000 – FFFF are reserved.
The factory Default is 5AA5.
ATI2
PAN ID for repeater
Requests / sets the PAN ID when the SRF is in repeater mode. Allowable values are in the range from 0000 - EFFF
ATIS
Set serial inversion
0 - Normal serial output. (Idle high)
1 - Inverted serial output. (idle low)
ATLH
LLAP host mode
Enables/Disables LLAP host mode
0 - disabled (Default)
1 - Enabled.
Requires applying ATAC
Forces 12 character packet length. Serial received messages beginning with a?? are encrypted and sent on a special CONFIGME PANID Radio received messages on the special CONFIGME PANID are decrypted

ATLI
LED indicator mode
Requests / sets the heartbeat:
H – flash once a second
R - RSSI mode (PWM between 10-100% indicating RSSI level, clears to 0 after 5 seconds if no RX)
O - OFF mode (pin is taken to ground)
ATMY
Set node ID
Requests / sets the node ID for remote programming, using 2 characters. The Factory default is --
ATNT
Node Type
Requests / sets the node type:
0 – Serial pass through mode (Factory Default)
Any data received from the Serial line will be broadcast on PANID.
Any data received on PANID or PANID2 will be sent to the Serial line.
1 – reserved
2 – Repeater mode
Any data received on PANID will be rebroadcast on PANID2.
Any data received on PANID2 will be rebroadcast on PANID.
Any data received from the serial line apart from AT commands and reprogramming will be ignored.
3 – RSSI - Test mode master:  will transmit “aMMRSSI-----“ once a second, anytime a packet is received will copy packet to serial and then send to serial “aMMRSSIM-nnn” indicatiing received RSSI
4 – RSSI - Test mode slave: any time a packet is received will transmit a packet “aSSRSSIS-nnn” indicating received RSSI, Will not output to serial unless in AT mode. For more details see:http://openmicros.org/index.php/articles/84-xrf-basics/146-rssimode
ATPC
Program commit
Reprograms the chip with a downloaded program which has to reside memory, and restarts execution. If no such program exists, an error is returned.
Note – only pre-certified firmware can be committed.
ATPG
Program mode
Enters program download mode.
Note – only pre-certified firmware can be downloaded.
ATPK
Packet length
Requests / sets the maximum radio packet data length using an hexadecimal number between 1 – F0 (1 – 250 decimal) byties.
Factory Default is 0C (12 bytes)
Note:  The SRF will not receive packets that are longer than this setting, so it needs to be set on all connected SRFs.
Note: If you have a much larger packet size than you expect to send to the node then you will find that spurious packets are more frequent and therefore more packets will be dropped.
For more details regarding the choice of packet length and time out, please refer to http://openmicros.org/index.php/articles/84-xrf-basics/151-packet-length-and-timeout
Not changed until explicitly applied (ATAC)
ATPL
Radio power level
Requests / sets the power level of the radio transmitter:
0 = -30 dBm
1 = -20 dBm
2 = -15 dBm
3 = -10 dBm
4 =   -5 dBm
5 =    0 dBm
6 =    5 dBm
7 =    7 dBm
8 =  10 dBm  (Factory Default)
ATRC
Channel offset
Set/Get channel offset
When remotely programming this command alters the radio channel used by the number specified. This is so that the remote programming traffic can be moved to an unused channel and other radio traffic will not interfere. E.g. if the radio is set to use channel 3 (ATCN 3) and an offset of 5 has been set (ATRC 5) then during remote programming channel 8 will be used.
Factory Default - 0

ATRE
Load Factory settings
This command loads the Factory Configuration into Config Settings.
Note that baud rate, radio data rate and radio frequency changes (the latter two for non-certified models) will only take effect when changes are applied (ATAC). To make this a permanent change the user should save the configuration (ATWR).
ATRI
Set ID of node to remote program
Requests / sets the ID of the node to be remotely programmed, using 2 characters.
The Factory Default is "--"
ATRO
Serial packet timeout
Requests / sets the serial packet time-out in milliseconds via a hexadecimal number in the range 1 – FFFF (1 – 65535 decimal).
Factory Default is 10 (16ms)
For more details regarding the choice of packet length and time out, please refer to http://openmicros.org/index.php/articles/84-xrf-basics/151-packet-length-and-timeout
ATRP
Enable remote programming
Used at the host SRF to enable remote programming:
0 – disable remote programming
1 – enable remote programming
Factory Default – 0
ATRT
Set Rx to Tx transition delay
Requests / sets the delay (in mS) used when switching the radio from receive to transmit. This should not normally be changed.
Default – 3
ATRW
Set remote programming timeout
Requests / sets the wait (in seconds) used in remote programming. If no communication is received for this time then remote programming mode is exited and any channel offset (ATRC) is removed.
Range: 1 to 10(hex). Only alter this if you are using ATRC and have problems with it timing out.
Default – 5 seconds
ATSD
Set sleep timeout delay
Sets the timeout for ATSM3. The duration is specified in mS and the range is 32bit (max approx. 49 days)
e.g. ATSD5265C00 is one day (hex 5265C00 is decimal 86400000)
ATSD36EE80 is one hour
ATSD493E0 is five minutes
ATSM
Sleep mode
Sleep mode – controlled by the SLEEP pin. The SRF module will not sleep in AT command mode.
0 – no sleep, the SLEEP pin has no effect
1 – normal sleep: when the SLEEP pin is set high or un-connected the SRF will run; when the sleep pin is set low the SRF will sleep (power consumption when sleeping of around 150uA)
2 – deep sleep: when the SLEEP pin is set low the SRF will run, when the sleep pin is un-connected or set high the SRF will sleep. This is the sleep mode with the lowest sleeping power consumption (<0.5uA)
3 - Sleep with auto wake. The device will wake when the sleep pin is low, or after a timed duration has elapsed. When in SM3 the device will assert P1_6 (RFu-328 pin 7, D11) when awake and set it low when sleeping. On waking if the sleep pin is held high or unconnected (internally pulled up) then the device will resume sleep after 2mS. Once P1_6 is asserted then the device is ready to receive data, there is no need to wait further for it to start up.

ATSN
Get serial number
Shows serial number
ATSP
Set Parity
Sets the parity on serial communications. Values are:
0 - No parity (default)
1 - Odd Parity
2 - Even Parity
ATSS
Sets stop bits
Sets the number of stop bits on serial communications
0 - 1 stop bit (default)
1 - 2 stop bits
ATTR
Set Tx to Rx transition delay
Requests / sets the delay (in mS) used when switching the radio from transmit to receive. This should not normally be changed.
Default – 0
ATVR
Firmware version number
Returns firmware revision number
ATWR
Write changes to flash memory
Save config changes to flash memory. The config changes will be preserved for the next startup.
Note that Config Flash Memory has a limited number of write cycles (around 16000), this is based upon 16 configuration slots and the CC1110 data sheet which gives a flash write cycle limit of 1000.
ATZT
Set receive timeout
Set the receive timeout value. If nothing has been received for a while (default 10.5 minutes) then reset radio receive. In a busy network some devices are seen to have stopped receiving, this resets it. (this is in hex so 10.5 mins is 630000mS decimal and 99CF0 hex.
ATZZ
Support function - dump configuration
Dump out configuration data in hexadecimal format to aid diagnosis for support.
ATZD
Hex dump of data.

Switches device into diagnostic mode where RSSI and data are output
1 - Dump anything on my PANID/PANID2
2 - Dump anything on any PANID.



10 comments:

  1. Thank you SO much - have a couple of SRF devices and been trying to find the now-disappeared command set. Cheers Ciseco for your continuing product support :(

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. That's a great help, thank you. Do you have any idea where I a could find an old copy of the XRF config manager software for use on windows?

    ReplyDelete
    Replies
    1. I went looking on my machines but didn't find it alas. https://xrfconfig.software.informer.com/ claim to have it, but it is downloading a software executable. How much that is trustworthy I don't know. If I get a chance, I can spin up a VM to take a look.

      Delete
    2. I think i may have this on my PC i'm looking at this again and need to freshen up my knowledge.

      Delete
    3. I had a look and cannot find it on my PC I also used a bare PC to test that Executable and it was a front to an old ciseco link so dont bother. I did find this tho https://github.com/user2684/ciseco/tree/master/software

      from the Google Group Open Pi https://groups.google.com/g/openpi

      Delete
    4. Thank you for sharing this!

      Delete