# Accessories

Syrus is capable of interacting with various accessories at the same time via the 1-wire and serial interfaces:

  • Temperature (1-wire)
  • Ibutton (1-wire)
  • Satcom (serial)
  • Sigfox Communicator (serial)

For 1-wire accessories such as temperature and ibutton sensors, up to 64 total sensors can be supported simultaneously. This means if you want to read an ibutton you can have a maximum 63 other temperature sensors connected. Note that this does not affect the authorized/whitelisted list of ibuttons, up to 500 ibuttons can be authorized for use with the apx-onewire tool.

# Temperature Sensor (1-wire)

Syrus can communicate with compatible 1-wire digital thermometers such as the DS18B20. We recommend this one from Diymore. The DS18B20 is capable of communicating in two modes, a normal power mode and a parasite mode which derives power from the data line, eliminating the need for an external power supply.

General Overview

  • The way it works is that you connect one or several temperature sensors in normal or parasite mode to Syrus
  • You read the temperatures with the apx-onewire temperature getall command
  • Give your temperature sensors aliases and install them

# Installation

Syrus 4 Datasheet with Pinout

1-wire Wiring Pinout (found in 14-pin molex)

# Parasite mode

Parasite Mode

Temperature Wires Signal Description Syrus Signal Syrus Wires
Yellow DQ Data signal, connect to the Syrus white/red 1-wire cable. 1WIRE
Red PWR Connect to the Syrus electrical ground cable in parasite mode GND
Black GND Connect to the Syrus electrical ground cable in parasite mode.

# Configuration

Once you have the temperature sensors connected, you can use the apx-onewire to read temperature

$ sudo apx-onewire temperature get_all
{
    "temperatures": [
        {
            "alias": "tempsen1",
            "id": "8D01144D07DBAA28",
            "value": 22.625,
            "connected": true,
            "epoch": 1608047806
        },
        {
            "alias": null,
            "id": "3C12345D07DBAB29",
            "value": 22.437,
            "connected": true,
            "epoch": 1608047807
        }
    ]
}

Afterwards you can set an alias and proceed to install on a real life scenario.

# Redis Interaction

To notify changes on a temperature sensor, the onewire application publishes:

onewire/notification/temperature/state onewire_temp_json_object

"PUBLISH" "onewire/notification/temperature/state" "{\"alias\":null,\"id\":\"8D01144D07DBAA28\",\"value\":27.437,\"connected\":true,\"epoch\":1610658389}"

# Tips

The ID of the 1-wire sensors is not printed on the temperature sensor, so you'll have to connect one at a time and use the get_all command to read the values, then assign an alias to each sensor.

# iButton® (1-wire)

Syrus can communicate with compatible DS19xx family of iButtons® via a reader like DS9092 iButton® probe.

General Overview

  • Start by connecting an iButton probe to the Syrus
  • Connect an iButton to the probe and read the unique ID with the apx-onewire tool
  • Use the apx-onewire tool to add the iButton to an authorized list
  • Give the iButton to a driver and allow them to perform actions like enable the engine using syruslang

# Installation

Syrus 4 Datasheet with Pinout

1-wire Wiring Pinout (found in 14-pin molex) for Connection to iButton probe

iButton Probe Wires Signal Description Syrus Signal Syrus Wires
Gray DATA Data signal, connect to the Syrus white/red 1-wire cable. 1WIRE
Black GND Connect to the Syrus electrical ground cable. GND

# Configuration

After installing the iButton probe, you can connect an iButton and read data with apx-onewire tool.

$ sudo apx-onewire ibutton get_all
{
    "ibuttons": [
        {
            "alias": null,
            "id": "123456789012345",
            "whitelisted": false,
            "connected": false,
            "conn_epoch": 1608048266,
            "disc_epoch": 1608048273
        }
    ]
}

Add or authorize the iButton so it appears 'whitelisted' with the add command.

$ sudo apx-onewire ibutton add driver1 123456789012345

the get_all would return the following the next time you connect it.

{
    "ibuttons": [
        {
            "alias": "driver1",
            "id": "123456789012345",
            "whitelisted": true,
            "connected": true,
            "conn_epoch": 1608048266,
            "disc_epoch": 1608048273
        }
    ]
}

It's ready to be handed to the driver so they can use it.

# Redis Interaction

To notify the changes on the status, the onewire application publishes:

onewire/notification/ibutton/state onewire_ibutton_json_object

"PUBLISH" "onewire/notification/ibutton/state" "{\"alias\":\"driver1\",\"id\":\"123456789012345\",\"whitelisted\":true,\"connected\":true,\"conn_epoch\":1610658389,\"disc_epoch\":1610658390}"

# Serial Modem (Satcom/Sigfox)

Syrus can communicate with serial modem accessories such as Sigfox Communicator or Satcom which can transmit messages to the Sigfox network or to Iridium's™ global satellite network.

General Overview

  • The way it works is that you instruct the Syrus to use it's RS232 RX & TX cables to work in modem mode
  • Connect the Sigfox or Satcom accessory to the Syrus
  • Use the apx-serial tool or Syruslang to send messages to the serial interface via the respective Sigfox or Satcom destinations

# Installation

Syrus 4 Datasheet with Pinout

Serial Wiring Pinout (found in 14-pin molex)

Satcom Wires Signal Description Syrus Signal Syrus Wires
Orange RX Satcom RX, connect to the Syrus white/orange data transmitter cable. RS232_TX
Blue TX Satcom TX, connect to the Syrus blue/red data receiver cable. RS232_RX
Green PWR Power for the Satcom accessory, use the same power source as the Syrus +12-24V DC.
Black GND Satcom's ground, connect to the Syrus 4 electrical ground cable. GND

# Configuration

Once you have the Sigfox or Satcom accessory connected to the Syrus you can configure the serial port to modem mode with the apx-serial tool.

$ sudo apx-serial mode modem

To test the communication with the accesory, you can use the state command.

$ sudo apx-serial modem state
{
    "state": "connected",
    "type": "satcom",
    "id": "300234063907660",
    "signal": 5,
    "version": 15,
    "buff_size": 50,
    "buff_count": 1
}

# Redis Interaction

To notify the connection status, the serial application publishes

serial/notification/modem/state connected

when connected, or

serial/notification/modem/state disconnected

when disconnected.

To notify an incoming message, the serial application publishes

serial/notification/modem/message "Incoming message"

# Tips

Consider the amount of messages sent via satellite on your application, start with the smallest buffer size: 10, so you don't store a buffer of 100 messages before you connect the serial modem accessory.

$ sudo apx-serial modem buffer_size 10

The signal of the satcom indicates the strength of the signal where:

  • 0: No service available.
  • 1-5: Each number represents about 2 db improvement in link margin over the previous value. 1 indicates about 2 db of link margin.

Consider that the satcom requires direct visibility to the sky with no obstruction to obtain the best results.

# Error codes

The apx-serial modem state command might return a msg_st field, which indicates a Satcom Message Error, the possible values are:

msg_st Description
1 Initial delimiter error.
2 Final delimiter error.
3 Checksum error.
4 Length error.
5 Busy.
6 No network coverage.
7 Error sending message.
8 Indicates MO session failure
10 GSS reported that the call did not complete in the allowed time.
11 MO message queue at the GSS is full.
12 MO message has too many segments.
13 GSS reported that the session did not complete.
14 Invalid segment size.
15 Access is denied.
16 ISU has been locked and may not make SBD calls (see +CULK command).
17 Gateway not responding (local session timeout).
18 Connection lost (RF drop).
19 Link failure (A protocol error caused termination of the call).
20..31 Reserved, but indicate failure if used.
32 No network service, unable to initiate call.
33 Antenna fault, unable to initiate call.
34 Radio is disabled, unable to initiate call (see *Rn command).
35 ISU is busy, unable to initiate call.
36 Try later, must wait 3 minutes since last registration.
37 SBD service is temporarily disabled.
38 Try later, traffic management period (see +SBDLOE command)
39..63 Reserved, but indicate failure if used.
64 Band violation (attempt to transmit outside permitted frequency band).
65 PLL lock failure; hardware error during attempted transmit.
Last Updated: 1/15/2021, 1:52:09 PM