AcSiP S76G Installation manual

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
0 of 73
Product Name
Version
Doc No
Date
Page
Document Name
Version
Doc No
Date
S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
1 of 73
Product Name
Version
Doc No
Date
Page
Document History
Date
Revised Contents
Revised by
Version
Nov 11 ,2016
Nov 25, 2016
Dec 22, 2016
Dec 23, 2016
Jan, 17, 2017
Jan, 23, 2017
Mar, 1, 2017
Initial version supports EU868, US915 and
US915 bands.
CN470-510 band added and Typo errors fixed.
6 new commands
mac set_tx_mode, mac get_tx_mode,
mac set_batt, mac get_batt,
mac set_tx_confirm, mac get_tx_confirm,
2 new commands
sip sleep, sip set_baudrate
5 CLAA commands
mac set_claa, mac get_claa
mac set_getchinfo, mac set_gettimeinfo
mac set_jumboframe
8 new commands (v1.2.0)
sip get_hw_model_ver
sip set_gpio_mode
sip set_gpio
sip get_gpio
rf fsk
rf lora_tx_start
rf lora_tx_stop
rf lora_rx_start
rf lora_rx_stop
1 new commands (v1.2.1)
sip get_uuid
7 new commands (v1.3.1)
rf set_fdev
rf get_fdev
rf set_cad
rf get_cad
rf cad
mac set_lbt
mac get_lbt
Change CN470 frequency table
Leo Tseng
Leo Tseng
Leo Tseng
Leo Tseng
Leo Tseng
Leo Tseng
Leo Tseng
A
B
C
D
E
F
G

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
2 of 73
Product Name
Version
Doc No
Date
Page
Apr 24, 2017
June, 9, 2017
Sep, 11, 2017
Oct, 11, 2017
6 new commands (v1.4.2)
mac set_uplink_dwell
mac get_uplink_dwell
mac set_downlink_dwell
mac get_downlink_dwell
mac set_max_erip
mac get_max_erip
Support AS923 Band & LoRaWANTM v1.0.2
5 new commands (v1.4.5)
mac set_ch_count
mac get_ch_count
sip set_storage
sip get_storage
mac set_keys
6 new commands (v1.5.5)
sip set_iap
sip set_iap_mode
mac set_tx_interval
mac get_tx_interval
mac set_rx1_freq
mac get_rx1_freq
17 new commands (v1.6.0)
mac set_auto_join
mac get_auto_join
rm set_gpio
rm set_port_uplink
rm set_port_downlink
rm set_gpio_switch
rm set_adc
rm set_adc_switch
rm set_mode
rm set_trigger
rm get_gpio
rm get_port
rm get_gpio_switch
rm get_adc
rm get_adc_switch
rm get_mode
Leo Tseng
Leo Tseng
Leo Tseng
Leo Tseng
H
I
J
K

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
3 of 73
Product Name
Version
Doc No
Date
Page
Dec, 18, 2017
Jan, 18, 2017
Mar, 28, 2018
May, 15, 2018
July, 2, 2018
rm get_trigger
11 new commands (v1.6.2-g6)
gps set_level_shift
gps set_nmea
gps set_port_uplink
gps set_format_uplink
gps set_positioning_cycle
gps set_mode
gps get_mode
gps get_data
gps sleep
gps get_ttff
gps reset
1. Adds more details of GPS format.
2. GPS examples modification
3. gps set_satellite_system command adds
1. Correct typo errors & do some max/min
values modification.
2. A new command:
gps set_start
3. “IAP”related commands are removed
1. 7 new commands added (v1.6.5)
mac set_claa_join_ch
mac get_claa_join_ch
mac set_realtime_store
mac get_realtime_store
mac set_csma
mac get_csma
mac set_endswitchclassacmode
2. Change “sip set_baudrate”<password> as
correct one, to “24399520”from
“12345678”.
1. 3 new commands added (v1.6.6)
sip set_batt_resistor
sip get_batt_resisitor
sip get_batt_volt
2. GPS raw data format changed
Leo Tseng
Leo Tseng
Leo Tseng
Leo Tseng
Leo Tseng
V1.6.2-g6
V1.6.2-g7
V1.6.3-g7
V1.6.5-g7
V1.6.5-g9

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
4 of 73
Product Name
Version
Doc No
Date
Page

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
5 of 73
Product Name
Version
Doc No
Date
Page
Index
1. Introduction
2. Configuration
2.1 Hardware Configuration
2.2 Software Configuration
3. Commands Set Reference
3.1 SIP commands
3.1.1 sip factory_reset
3.1.2 sip get_ver
3.1.3 sip reset
3.1.4 sip get_hw_model
3.1.5 sip set_echo
3.1.6 sip set_log
3.1.7 sip sleep
3.1.8 sip_baudrate
3.1.9 sip_get_hw_model_ver
3.1.10 sip_set_gpio_mode
3.1.11 sip_set_gpio
3.1.12 sip_get_gpio
3.1.13 sip_get_uuid
3.1.14 sip set_storage
3.1.15 sip get_storage
3.1.16 sip set_batt_resistor
3.1.17 sip get_batt_resistor
3.1.18 sip get_batt_volt
3.2 MAC commands
3.2.1 mac tx
3.2.2 mac join
3.2.3 mac save
3.2.4 mac get_join_status
3.2.5 mac set_linkchk
3.2.6 mac set_deveui

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
6 of 73
Product Name
Version
Doc No
Date
Page
3.2.7 mac set_appeui
3.2.8 mac set_appkey
3.2.9 mac set_devaddr
3.2.10 mac set_nwkskey
3.2.11 mac set_appskey
3.2.12 mac set_power
3.2.13 mac set_dr
3.2.14 mac set_adr
3.2.15 mac set_txretry
3.2.16 mac set_rxdelay1
3.2.17 mac set_rx2
3.2.18 mac set_sync
3.2.19 mac set_ch_freq
3.2.20 mac set_ch_dr_range
3.2.21 mac set_ch_status
3.2.22 mac set_dc_ctl
3.2.23 mac set_dc_band
3.2.24 mac set_join_ch
3.2.25 mac set_upcnt
3.2.26 mac set_downcnt
3.2.27 mac set_class
3.2.28 mac get_devaddr
3.2.29 mac get_deveui
3.2.30 mac get_appeui
3.2.31 mac get_nwkskey
3.2.32 mac get_appskey
3.2.33 mac get_appkey
3.2.34 mac get_dr
3.2.35 mac get_band
3.2.36 mac get_power
3.2.37 mac get_adr
3.2.38 mac get_txretry
3.2.39 mac get_rxdelay
3.2.40 mac get_rx2
3.2.41 mac get_sync
3.2.42 mac get_ch_para
3.2.43 mac get_ch_status

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
7 of 73
Product Name
Version
Doc No
Date
Page
3.2.44 mac get_dc_ctl
3.2.45 mac get_dc_band
3.2.46 mac get_join_ch
3.2.47 mac get_upcnt
3.2.48 mac get_downcnt
3.2.49 mac get_class
3.2.50 mac set_tx_mode
3.2.51 mac get_tx_mode
3.2.52 mac set_batt
3.2.53 mac get_batt
3.2.54 mac set_tx_confirm
3.2.55 mac get_tx_confirm
3.2.56 mac set_lbt
3.2.57 mac get_lbt
3.2.58 mac set_uplink_dwell
3.2.59 mac get_uplink_dwell
3.2.60 mac set_downlink_dwell
3.2.61 mac get_downlink_dwell
3.2.62 mac set_max_erip
3.2.63 mac get_max_erip
3.2.64 mac set_ch_count
3.2.65 mac get_ch_count
3.2.66 mac set_keys
3.2.67 mac set_tx_interval
3.2.68 mac get_tx_interval
3.2.69 mac set_rx1_freq
3.2.70 mac get_rx1_freq
3.2.71 mac set_auto_join
3.2.72 mac get_auto_join
3.2.73 mac set_power_index
3.2.74 mac get_power_index
3.3 GPS commands
3.5.1 gps set_level_shift
3.5.2 gps set_nmea
3.5.3 gps set_port_uplink
3.5.4 gps set_format_uplink

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
8 of 73
Product Name
Version
Doc No
Date
Page
3.5.5 gps set_positioning_cycle
3.5.6 gps set_mode
3.5.7 gps get_mode
3.5.8 gps get_data
3.5.9 gps sleep
3.5.10 gps get_ttff
3.5.11 gps reset
3.5.12 gps set_satellite_system
3.5.13 gps_set_start
4. Example
4.1 LoRaWANTM
4.1.1 ABP
4.1.2 OTAA
4.1.3 Confirmed Uplink and Downlink
4.2 GPS Mode
4.4.1 GPS Manual Mode
4.4.2 GPS Auto Mode
4.4.3 Enter & Leave GPS Sleep
4.4.4 Get GPS TTFF Value
4.4.5 GPS Reset

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
9 of 73
Product Name
Version
Doc No
Date
Page
1. Introduction
The S76G/S78G is designed & manufactured in a smallest form factor - SiP (System in
Package). It integrates with Semtech SX1276 and a 32-bit ultra-low power Cortex M0+ MCU
(STM32L073x), S76G supports global 868 MHz or 915 MHz ISM-Bands. (S78G supports 433MHz
or 470 MHz by using SX1278 and the identical MCU with S76G) Capable of 2-way
communication and reach over 16 km (10 miles) distance in our field test. Besides, S76G/S78G
contains a GPS chip –SONY CXD5603GF which is used to receive GPS/GPS+GLONASS signals for
positioning.
This product is designed with multiple easy to use interfaces (I2C/SPI/UART/GPIO),
fine-tuned RF performance and will be offered with complete SDK library & ready to go HDK, it
can significantly help the users to shrink the size of end device and simplify the development
efforts for any LoRa○
Rapplications.
For faster development, AcSiP provides an EKB named EK-S76GXB. The EKB equips with a
UART-To-USB bridge IC and can be powered by USB. Besides, a SMA antenna connector is also
provided for easy antenna installation. Figure1.1 describes the related components above.
S76G module provides a commands set interface that can use LoRa○
Rand LoRaWANTM
communication through UART interface. And S76G LoRaWANTM protocol has been certificated
by LoRaWANTM alliance.
Figure 1.1 (Take S76G as example)

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
10 of 73
Product Name
Version
Doc No
Date
Page
2. Configuration
2.1 Hardware Configuration
S76G/S78G EKB can be controlled by connecting TX (PA9) and RX (PA10) UART1 interface to
other MCU, as shown in Figure 2.1, or by connecting micro USB port directly to PC/NB as shown
in Figure 2.2, The control commands can be sent from PC or other MCU to S76G/S78G.
Figure 2.1
Figure2.2
2.2 Software Configuration
The default baud rate of S76G/S78G UART1 is set at 115200. And the rest of UART1 setting,
please follow these below settings:
Baud rate: 115200
Data bits: 8
Stop bits: 1
Parity: none
Flow Control: none
Forward: none

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
11 of 73
Product Name
Version
Doc No
Date
Page
To quickly start using S76G/S78G EVB, the 1st step is using USB cable to connect EVB to
PC/NB via micro USB port. The next step is checking whether the UART-To-USB bridge IC driver
can be properly installed on PC/NB. By using win7/win10, the UART-To-USB bridge IC driver
could be installed automatically and shows a USB serial com port after connecting well between
EVB and PC/NB via USB cable.
After successful installation of USB driver, you can use any terminal program (suggesting free
terminal software: termite) to connect to EVB. The commands set can be used through the
terminal program.
By using termite or other terminal software, be aware of not being appended nothing in the
end of a UART string (Figure 2.3).
Figure 2.3

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
12 of 73
Product Name
Version
Doc No
Date
Page
3. Commands Set Reference
S76G/S78G commands set can be categorized into 4 types: SIP command, MAC (LoRaWANTM)
command. SIP commands are controlling commands that are relevant or direct MCU control and
not related to radio transmission. MAC commands are used to utilize LoRaWANTM protocol to
communicate with Servers or modify LoRaWANTM related parameters. GPS (gps mode)
commands can control SONY CXD5603GF GPS chip by GPS commands or receive GPS responses.
The command set interface is readable ASCII string. S76G/S78G starts to accept command if
the string starts from these “sip”, “mac”and “gps”prefixes, and the response string from
S76G/S78G starts with two ‘>’characters and one ‘space’. For example, the first line of the
below demo is a module command, and the second line is the response from S76G/S78G.
sip get_ver
>> v1.0.8
3.1 SIP commands
3.1.1 sip factory_reset
Response: A string representing firmware version.
Purpose: All LoRaWANTM and radio configuration parameters will be set to default value.
Example:
sip factory_reset
>> v1.0.8
3.1.2 sip get_ver
Response: A string representing firmware version.
Purpose: Get current firmware version.
Example:
sip get_ver
>> v1.0.8
3.1.3 sip reset
Response: The beginning information since FW starts.
Purpose: This command resets the module and start FW over again.
Example:
sip reset
>> S76G - v1.0.8 - Nov 10 2016 - 17:05:43

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
13 of 73
Product Name
Version
Doc No
Date
Page
3.1.4 sip get_hw_model
Response: A string representing hardware model.
Purpose: Get hardware model name.
Example:
sip get_hw_model
>> S76G
3.1.5 sip set_echo <Status>
<Status>: A string representing echo status, it can be on or off.
Response: Ok, if <Status> string is valid.
Invalid, if <Status> string is not valid.
Purpose: Enable or disable UART echo mode.
Example:
sip set_echo on
>> Ok
3.1.6 sip set_log <Log_Level>
<Log_Level> debug: show all logs, info: only shows commands set when input/output.
Response: Ok, if <Status> string is valid.
Invalid, if <Status> string is not valid
Purpose: Select which level when logs show
Example:
sip set_log info
>> Ok
3.1.7 sip sleep <Time> <Interruptible>
<Time> A decimal string representing S76G/S78G sleep time in seconds, it can be assigned from 10
to 604800, and the input value must be the multiple of 10.
<Interruptible> During the period of sleep mode, it can be decided to be interrupted by UART or not.
uart_on means it can be interrupted (waked up) by UART; uart_off means it can’t be interrupted by
UART.
Response: Ok, if <Status> string is valid.
Invalid, if <Status> string is not valid
Purpose: Let S76/78S enter sleep mode by an assigned sleep time
Example:
(It can be triggered by any UART input.)
sip sleep 100 uart_on

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
14 of 73
Product Name
Version
Doc No
Date
Page
>> sleep 100 sec uart_on (
See this message, it means it starts to sleep.)
adsfajkl (
Any UART input can wake it up.)
>> Ok
(Wake up after 20 seconds)
sip sleep 20 uart_off
>> sleep 20 sec uart_off
>> Ok
(Not allow to use the value which is not the multiple of 10.)
sip sleep 22 uart_off
>> Invalid
3.1.8 sip set_baudrate <baudrate> <password>
<baudrate> A decimal string representing UART1 baudrate, it can be assigned as 4 kinds of rate, 9600,
19200, 57600 and 115200.
<password> A decimal string representing password that provides baudrate protection. This
baudrate setting command can only be delivered when password is correct. And the assigned
baudrate setting would be stored in EEPROM and would not be changed by sip factory_reset
command.
Response: Ok, if <Status> string is valid.
Invalid, if <Status> string is not valid
Purpose: Change UART1 baudrate immediately.
Example:
sip set_baudrate 9600 24399520
>> Ok
3.1.9 (production verification) sip get_hw_model_ver
Response: A string representing hardware model & firmware version.
Purpose: Get hardware model name and firmware version by only using this command.
Example:
sip get_hw_model_ver

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
15 of 73
Product Name
Version
Doc No
Date
Page
>> module=S76G ver=v1.0.8
3.1.10 (production verification) sip set_gpio_mode <Gpio_Group>
<Gpio_Pin_Number> <Gpio_Mode>
<Gpio_Group> A string representing STM32 GPIO pin groups, it can be these characters A, B, C, D, E,
F and H (note: no G).
<Gpio_Pin_Number> A decimal string representing STM32 GPIO pin number, it can be set from 1to
15.
<Gpio_Mode > A decimal string representing STM32 GPIO pin mode, it can be assigned as output or
input, set 1would let pin state be output mode and 0let it as input mode.
Response: Ok, if input arguments are valid.
Invalid, if input argument are not valid or out of range.
Purpose: Assign STM32 GPIO pin mode as input or output.
Example (Set PA_0 as output mode):
sip set_gpio_mode A 0 1
>> Ok
3.1.11 (production verification) sip set_gpio <Gpio_Group>
<Gpio_Pin_Number> <Gpio_Value>
<Gpio_Group> A string representing STM32 GPIO pin groups, it can be these characters A, B, C, D, E,
F and H (note: no G).
<Gpio_Pin_Number> A decimal string representing STM32 GPIO pin number, it can be set from 0to
15.
<Gpio_Value > A decimal string representing STM32 GPIO pin value, it can be assigned as high or low,
set 1would let pin be high state and 0let it as low state.
Response: Ok, if input arguments are valid.
Invalid, if input argument are not valid or out of range.
Purpose: Assign STM32 GPIO pin state as high or low.
Example (Set PA_0 as output high state):
sip set_gpio_mode A 0 1
>> Ok

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
16 of 73
Product Name
Version
Doc No
Date
Page
sip set_gpio A 0 1
>> Ok
3.1.12 (production verification) sip get_gpio <Gpio_Group>
<Gpio_Pin_Number>
<Gpio_Group> A string representing STM32 GPIO pin groups, it can be these characters A, B, C, D, E,
F and H (note: no G).
<Gpio_Pin_Number> A decimal string representing STM32 GPIO pin number, it can be set from 0to
15.
Response: 1, if this GPIO pin state is high.
0, if this GPIO pint state is low.
Ok, if input arguments are valid.
Invalid, if input argument are not valid or out of range.
Purpose: Get the pin state from the assigned GPIO pin.
Example (get PA_2 pin state):
sip get_gpio A 2
>> 1
3.1.13 (production verification) sip get_uuid
Response: A string representing hardware STM32L0 MCU UUID 96-bit value.
Purpose: Each STM32 MCU device has its own unique UUID, use this command to read it out
Example:
sip get_uuid
>> uuid=002400413630373619473630
3.1.14 sip set_storage <EEPROM_Encrypted>
<EEPROM_Encrypted>: a series of ASCII string representing the stored EEPROM encrypted data.
Purpose: To overwrite whole EEPROM data in just one-time, it allows to set its own EERPOM from
another S76G/S78G EEPROM data (they must use the same HW model and FW version).
Response: Ok, if <EEPROM_Encrypted> string is valid

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
17 of 73
Product Name
Version
Doc No
Date
Page
Data format error, if <EEPROM_Encrypted> format or length not matched
Checksum format error, wrong checksum format or length of <EEPROM_Encrypted> not
match.
Not enough memory space, no enough internal RAM to execute this command, please
execute “sip reset”and try again.
Decrypted length not same as encrypted one, <EEPROM_Encrypted> length not match
with what it comes from “sip get_storage”, it could be using a different FW version
between set & get commands.
AES decrption error, AES execution error occurs.
Invalid, if anything is wrong in executing this command.
Example:
3.1.15 sip get_storage
Purpose: To overwrite whole EEPROM data in just one-time, after caller gets EEPROM encrypted data
by using this commands, it allows to overwrite other device’s EERPOM (they must use the same HW
model and FW version).
Response: a series of ASCII string representing the stored EEPROM encrypted data. Copy these ASCII
characters and paste into “sip set_storage”as parameters.

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
18 of 73
Product Name
Version
Doc No
Date
Page
Example:
3.1.16 sip set_batt_resistor <R1> <R2>
<R1> A decimal string representing the resistance value (ohm) of resistor R1 (see the below figure), it
must be greater than 0and less or equal than 2^24 (16777216, 16M).
<R2> A decimal string representing the resistance value (ohm) of resistor R1 (see the below figure), it
must be greater than 0and less or equal than 2^24 (16777216, 16M)

S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
19 of 73
Product Name
Version
Doc No
Date
Page
Response: Ok, if input arguments are valid.
Invalid, if input argument are not valid or out of range.
Purpose: User needs to measure the external voltage (e.g. battery voltage) which is higher than 3.3v.
The full-charged voltage of some lithium-ion battery might exceed 3.3 volt, this voltage level already
exceeds the maximum allowable voltage of S7XX ADC. So user needs to provide an external circuit,
voltage divider, to reduce the magnitude of the external voltage (e.g. Vbat). So the reduced voltage
(i.e. Vadc) which is equal or low than 3.3v can be measured correctly by S7XX ADC.
Steps for measure Vbat:
a. To implement a voltage divider circuit. And the recommended resistance values of R1 & R2 are
around 100K & 200K respectively.
b. The end-point of Vadc is needed to be connected with PB_1 of S7XS GPIO.
c. To measure the resistance value of these two R1 & R2 by a resistance meter.
d. To let S7X know the measured R1 & R2 values by calling this command “sip set_batt_resistor”.
(e.g.)
sip set_batt_resistor 98900 199700
>> Ok
3.1.17 sip get_batt_resistor
Response: Two decimal values representing R1 & R2 values respectively.
Purpose: See “sip set_batt_resistor”command.
Example:
sip get_batt_resistor
>> 98900 199700
3.1.18 sip get_batt_volt
a. R1 & R2 set
Response: Return ADC voltage (Vadc) & battery voltage (Vbat) if “sip set_batt_resistor” had ever set
R1 & R2.
This manual suits for next models
1
Other AcSiP GSM/GPRS Module manuals
Popular GSM/GPRS Module manuals by other brands

Sequoia
Sequoia Sensormetrix Argon 100 manual

FALCOM
FALCOM STEPPII-55-LT Hardware description

Neoway
Neoway N58 Hardware user's guide

UTC Fire and Security
UTC Fire and Security Interlogic NetworX NX-7002N installation manual

Videx
Videx 2270/4G Technical manual

WorldTracker
WorldTracker AVL quick start guide