0% found this document useful (0 votes)
12 views8 pages

Smib Json Api

The SMIB Protocol facilitates communication between devices and a gateway using TCP and UDP over wired Ethernet. Each device is equipped with a unique 96-bit ID and can store settings that can be adjusted via network or USB. The protocol supports device discovery, configuration, and various commands for interaction with gaming machines, including reading meters and transferring credits.

Uploaded by

Mina Halim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views8 pages

Smib Json Api

The SMIB Protocol facilitates communication between devices and a gateway using TCP and UDP over wired Ethernet. Each device is equipped with a unique 96-bit ID and can store settings that can be adjusted via network or USB. The protocol supports device discovery, configuration, and various commands for interaction with gaming machines, including reading meters and transferring credits.

Uploaded by

Mina Halim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SMIB Protocol r0.

9 – CONFIDENTIAL – DO NOT DISTRIBUTE

SMIB Protocol description

SMIB device (device) communicates with gateway over wired Ethernet media using TCP and UDP
protocols.

Device short description

Device implemented using ARM Cortex-M3/M4 CPU type. It has the following important parts:

- wired Ethernet interface 10/100 mbit.


- GPIO interface to machine’s push buttons (optional)
- serial port for SAS connection to machine
- LEDs for displaying various events and states
- micro USB connector for PC connection (optional)
- NVRAM storage to keep device settings
- unique 96-bit device ID inside CPU set at factory

Device settings

Every device has a persistent storage to keep its setting. Settings can be adjusted over network or USB
interface. Settings include:

- arbitrary device name (might be gaming machine name)


- arbitrary asset number (according to the owner’s database)
- network settings (IP address, mask, default GW, DNS server)
- option to use automatic network settings (DHCP server required)
- settings specific to gaming machine connection

Device discovery

To detect and enumerate all SAS box devices present in a local network UDP protocol is used. UDP
protocol allows to send broadcast packets which can be received by all listeners. For this purpose, every
SAS box device on startup will establish a listening UDP socket on specific port. It is supposed that
gateway will periodically send such broadcast discovery packets (e.g. every 30 seconds). This will allow
detecting in real time gaming machines power state changes. In the reply packet device will send all
general settings (name, asset number, network settings, and device id)

Device identification

Misconfigured devices (having wrong network settings like different sub net) will respond to discovery
too (because they can receive broadcast datagrams). Assuming other arbitrary settings like device name
and asset number the only reliable device identification is by unique 96-bit (three 32-bit words)
identifier. It can be used as a key in database processing.

Copyright (C) 2018 AGA Slots


SMIB Protocol r0.9 – CONFIDENTIAL – DO NOT DISTRIBUTE

UDP communications

While device is not properly configured, it cannot receive unicast messages (or cannot be connected via
TCP protocol). Therefore, the only way to change configuration of the already connected device (except
direct connection over USB) is to use UDP broadcast to change network settings. Considering that all
devices on the local network will receive this settings packet it should contain unique reference to the
target device. This will be 96-bit device ID found at enumeration stage.

Other UDP related functions is for example a visual identification feature. When you have many devices
connected but need to find a specific device you can use UDP broadcast to command the device to
visually manifest it. It might be for example LEDs blinking.

Further communication

Once gateway discovered all connected devices, it maintains a device list with all devices parameters.
Now it can poll them for current status and send commands to them. There are two ways – use the
same UDP protocol but now in unicast mode or establish TCP connection with every device. Max UDP
datagram is about 1500 bytes which is pretty enough for machine data and commands. Either way
information will be exchanged in packets, in UDP case packets will be separate UDP datagrams, in TCP
case packets will form continuous data stream. To separate packets in TCP mode we will need to define
the packet format.

UDP commands

UDP port number for SMIBs to listen on: 0x7A00 (we can use any but need to specify it)

When UDP command sent us broadcast datagram and targeted for specific device, it should include
device’s unique chip_id value collected from browse command reply.

Browse (broadcast or unicast)

This command is used for connected devices discovery when sent as broadcast or used for ping when
sent as unicast. Device will respond with its identification data and current settings.

Data sent by GW Data reply from device


string cmd uint8_t result
uint32_t chip_id[3]
uint8_t firmware_type
char firmware_id[32]
uint8_t version_major
uint8_t version_minor
char name[32]
uint32_t asset_no

Copyright (C) 2018 AGA Slots


SMIB Protocol r0.9 – CONFIDENTIAL – DO NOT DISTRIBUTE

uint32_t net_ip
uint32_t net_mask
uint32_t net_gw

{ “cmd”: “browse” }
{
“result”: 0,
“cid0”: 23625,
“cid1”: 735454,
“cid2”: 76722,
“fw_type”: 3,
“fw_id”: “ETH2SAS”,
“fw_ver_maj”: 1,
“fw_ver_min”: 0,
“name”: “IGT S3000”,
“asset”: 257,
“net_ip”: “192.168.0.55”,
“net_mask”: “255.255.255.0”,
“net_gw”: “192.168.0.1”
}

Setup (broadcast or unicast)

This command is used to change some identification data and settings. Device will reboot after new
settings are accepted. No reply expected. Updated data will be returned upon next Browse command.

Data sent by GW Data reply from device


uint32_t chip_id[3]
char name[32]
uint32_t asset_no
uint32_t net_ip
uint32_t net_mask
uint32_t net_gw

{
“cmd”: “setup”,
“cid0”: 23625,
“cid1”: 735454,
“cid2”: 76722,
“name”: “IGT S3000”,
“asset”: 257,
“net_ip”: “192.168.0.55”,
“net_mask”: “255.255.255.0”,
“net_gw”: “192.168.0.1”
}
{ “result”: 0 }

Visual identify (broadcast or unicast)

Copyright (C) 2018 AGA Slots


SMIB Protocol r0.9 – CONFIDENTIAL – DO NOT DISTRIBUTE

This command is used to tell this device from other connected devices. Upon receiving this command,
addressed device should blink with any LED it has onboard. No reply expected.

Data sent by GW Data reply from device


string cmd
uint32_t chip_id[3]

{
“cmd”: “blink”,
“cid0”: 23625,
“cid1”: 735454,
“cid2”: 76722
}

TCP commands (might have also UDP alias commands)

Connect (optional)

This is the first command expected to be sent by GW. Device replies with randomly generated challenge
data.

Data sent by GW Data reply from device


string cmd uint8_t result
uint32_t chip_id[3] uint8_t challenge[64]

Auth (optional)

This is the second command expected to be sent by GW. Response data is calculated from challenge and
secret (password). Device verifies calculations and responds with positive result or disconnects in case of
wrong response.

Data sent by GW Data reply from device


uint32_t chip_id[3] uint8_t result
uint8_t response[64]

Identify

This command returns SAS related information read by device from the connected gaming machine.

Data sent by GW Data reply from device


string cmd uint8_t result
uint32_t chip_id[3] uint8_t sas_address
char game_id[8]
uint8_t denomination
char paytable_id[8]
char sas_version[8]
char serial_number[32]

Copyright (C) 2018 AGA Slots


SMIB Protocol r0.9 – CONFIDENTIAL – DO NOT DISTRIBUTE

uint8_t features[3]

{
“cmd”: “identify”,
“cid0”: 23625,
“cid1”: 735454,
“cid2”: 76722
}
{
“result”: 0,
“sas_address”: 3,
“game_id”: “GK008”,
“denom”: 1,
“paytable_id”: “PT098”,
“sas_version”: “6.01”,
“serial_number”: “000323”,
“features”: 312123
}

Read meters

This command s returns current meter values read from the connected gaming machine.

Data sent by GW Data reply from device


string cmd uint8_t result
uint32_t chip_id[3] uint32_t in
uint32_t out
uint32_t bet
uint32_t win
uint32_t jackpot
uint32_t games
uint32_t credits

{
“cmd”: “meters”,
“cid0”: 23625,
“cid1”: 735454,
“cid2”: 76722
}
{
“result”: 0,
“in”: 3,
“out”: 4,
“bet”: 1,
“win”: 7,
“games”: 11,
“jackpot”: 0,
“credits”: 31
}

Copyright (C) 2018 AGA Slots


SMIB Protocol r0.9 – CONFIDENTIAL – DO NOT DISTRIBUTE

Button

This command is used for button press / depress simulation.

Data sent by GW Data reply from device


uint32_t chip_id[3] uint8_t result
uint8_t button_index uint32_t button_state_matrix
uint8_t button_state

Cash-in

This command transfers credits to the gaming machine.

Data sent by GW Data reply from device


uint32_t chip_id[3] uint8_t result
uint32_t amount_in_cents uint32_t amount_sent
uint32_t current_credits

{
“cmd”: “cashin”,
“cid0”: 23625,
“cid1”: 735454,
“cid2”: 76722,
“amount”: 1000
}
{
“result”: 0,
“poll_result”: 0,
“transferred”: 1000,
“credits”: 2500
}

Cash-out

This command transfers all credits from the gaming machine.

Data sent by GW Data reply from device


uint32_t chip_id[3] uint8_t result
uint32_t amount_sent
uint32_t current_credits

Bonus

This command can be used to reward a player. It is processed differently by gaming machine than cash-
in transfer.

Data sent by GW Data reply from device


uint32_t chip_id[3] uint8_t result

Copyright (C) 2018 AGA Slots


SMIB Protocol r0.9 – CONFIDENTIAL – DO NOT DISTRIBUTE

uint32_t amount_in_cents uint32_t current_credits

Events

Event messages are sent by device without prior request from GW.

Event type Code


SAS link up 1
SAS link down 2
Game started 3
Game ended 4

{
“cmd”: “event”,
“code”: 3
}

Result codes

Result codes are not contiguous due to attempt to group them. Perhaps need to be reordered.

Result code Description


0 OK
1 Malformed JSON request
2 Missing or unknown command
3 Required parameter missing
10 Machine’s meters not known (read) yet
20 Machine’s SAS address unknown, cannot communicate
21 SAS related error, check poll_result for details

poll_result codes

These error codes are reported by SAS library.

Result code Description


0 OK
1 ACK received

Copyright (C) 2018 AGA Slots


SMIB Protocol r0.9 – CONFIDENTIAL – DO NOT DISTRIBUTE

2 NAK received
3 No answer from EGM
4 CRC error in response
5 Unspecified error
6 SAS address unknown
7 Bad parameter passed
8 EFT transfer error
9 AFT transfer error
10 Transfer timeout
11 Feature not supported
12 Denomination unknown
13 BUSY received
14 EGM chirping, bad connection
15 ROM signature received instead of expected poll response
16 RTE received instead of expected poll response

Copyright (C) 2018 AGA Slots

You might also like