Download Print this page
AcSiP S76G Command Reference Manual

AcSiP S76G Command Reference Manual

Commands set reference

Advertisement

Quick Links

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

Advertisement

loading

Summary of Contents for AcSiP S76G

  • Page 1 Document Name S76G/S78G Commands Set Reference Version v1.6.5 Doc No July 2, 2018 Date S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 0 of 73...
  • Page 2 7 new commands (v1.3.1) Leo Tseng rf set_fdev rf get_fdev rf set_cad rf get_cad rf cad mac set_lbt mac get_lbt Change CN470 frequency table S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 1 of 73...
  • Page 3 S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 2 of 73...
  • Page 4 July, 2, 2018 1. 3 new commands added (v1.6.6) Leo Tseng V1.6.5-g9 sip set_batt_resistor sip get_batt_resisitor sip get_batt_volt 2. GPS raw data format changed S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 3 of 73...
  • Page 5 S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 4 of 73...
  • Page 6 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 Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 5 of 73...
  • Page 7 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 Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 6 of 73...
  • Page 8 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 Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 7 of 73...
  • Page 9 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 Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 8 of 73...
  • Page 10 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.
  • Page 11 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...
  • Page 12 To quickly start using S76G/S78G EVB, the 1 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.
  • Page 13 “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.
  • Page 14 >> 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.
  • Page 15 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 Product Name Version v1.6.5 Doc No...
  • Page 16 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 Product Name Version v1.6.5 Doc No...
  • Page 17 <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...
  • Page 18 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 Product Name Version v1.6.5...
  • Page 19 0 and 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 0 and less or equal than 2^24 (16777216, 16M) S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 20 >> 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. S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date...
  • Page 21 Purpose: The external voltage can be attached with S7XS GPIO PB_1 pin directly when the maximum external voltage is not more than 3.3 volt. Example: sip get_batt_volt >> battery volt(2806 mv) S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No...
  • Page 22 Example: mac tx ucnf 15 98ba34fd >> Ok >> tx_ok mac tx ucnf 15 6805 >> Ok >> mac rx 4 1234abcd S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 21 of 73...
  • Page 23 (Got Downlink Data 0x12, 0x34, 0xab and 0xcd from Port 4) If the device class is set to class C, a downlink data would be received at any time. The downlink data of class C is outputted by S76G/S78G in rx <Portnum> <Data> format. Example: >>...
  • Page 24 >> tx_ok 3.2.6 mac set_deveui <DevEUI> <DevEUI>: an 8-byte hexadecimal string representing Device EUI used for LoRaWAN Response: Ok, if <DevEUI> string is valid Invalid, if <DevEUI> string is not valid. S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No...
  • Page 25 “mac save” command to store it, and it would NOT be changed to default value by “sip factory_reset” command. 3.2.9 mac set_devaddr <DevAddr> <DevAddr>: a 4-byte hexadecimal string representing Device Address used for LoRaWAN S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 26 Note: This assigned AppSKey would be stored into EEPROM immediately after it is changed. No need to use “mac save” command to store it, and it would NOT be changed to default value by “sip factory_reset” command. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 27 3.2.15 mac set_txretry <RetryCount> <RetryCount>: a decimal string representing retry number of transmission, it can be from 0 to 255. Response: Ok, if <RetryCount> string is valid Invalid, if <RetryCount> string is not valid. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 28 Response: Ok, if <SyncWord> string is valid Invalid, if <SyncWord> string is not valid. Purpose: Set the sync word used for communication. Example: > mac set_sync 34 >> Ok S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date...
  • Page 29 (e.g. EU868 range falls in 0 to 15; US915 range falls in 0 to 71). <Status>: a string representing whether the specified channel is on or off. Response: Ok, if <ChannelId> and <Status> strings are valid. Invalid, if <ChannelId> and <Status> strings are not valid. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 30 Response: Ok, if <ChannelID> and <Status> string is valid. Invalid, if <ChannelID> and <Status> string is not valid. Purpose: Set frequency channel for join request. Example: mac set_join_ch 1 on >> Ok S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date...
  • Page 31 C >> Ok 3.2.28 mac get_devaddr Response: a hexadecimal string representing Device Address used for LoRaWAN Purpose: Return Device Address used for LoRaWAN Example: S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018...
  • Page 32 Response: a hexadecimal string representing Application Key used for LoRaWAN Purpose: Return Application Key used for LoRaWAN Note: The middle part of 10 bytes is masked as star characters for safety reason. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 33 3.2.38 mac get_txretry Response: a decimal string representing retry number of transmission, it can be from 0 to 255. Purpose: Get retry number of transmission. Example: mac get_txretry >> 8 S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date...
  • Page 34 “mac set_ch_frequency” command range. <minimum DR> - minimum DR can be used, it can be from 0 to 6. <maximum DR> - maximum DR can be used, it can be from 0 to 6. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 35 <duty cycle> - duty cycle of specified band, it can be from 0 to 65535. 0: means 0%. 1-65535: duty cycle is equal to 1/<duty cycle>. Invalid, if <BandID> string is not valid. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 36 Purpose: Get frequency range and duty cycle of specified band. If a specific frequency is overlapped with more than one band ID, the smallest band ID will be selected. The default band setting of S76G is as following (Only 868 Band, other bands only have one Band ID 0):...
  • Page 37 Response: A string representing TX signal would be sent continuously or not, it can be cycle or no_cycle. Purpose: See “mac set_tx_mode” command. Example: mac get_tx_mode >> cycle 3.2.52 mac set_batt <Battery> S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018...
  • Page 38 >> 254 3.2.54 mac set_tx_confirm <Confirm> <Confirm>: A string representing whether S76G TX uplink needs server’s ACK in downlink, it can be on or off. Response: Ok, if <Confirm> string is valid. Invalid, if <Confirm> string is not valid.
  • Page 39 Purpose: By TELEC request, it needs to detect a channel is using or not before using this channel, so if LBT is on, S76G/S78G can listen before talk (LBT) the channel symbol signal strength before any TX uplink like joining or normal uplinks. If the channel is occupying, S76G/S78G would skip to another channel and LBT again until it finds an available channel.
  • Page 40 Example: mac set_downlink_dwell on >> Ok 3.2.61 mac get_downlink_dwell Response: A string representing the current DownlinkDwell setting for AS923 band, it would be on or off. S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018...
  • Page 41 <ChannelsCount>: a decimal string representing channel count, it can only be 0~8, 16, 32, 48, 64, 80 and 96. <BW>: a decimal string representing which channels group different from bandwidth, it can only be 125 or 500. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 42 Purpose: After this command is executed, the 6 keys would be updated and stored into EEPROM immediately without calling “mac save”. Response: Ok, if input ASCII strings are all valid. Invalid, if one of input strings is not valid. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 43 (e.g. the below shows DevEUI, AppKey and AppsKey won’t be modified, others are updated and also stored into EEPROM) (Incorrect examples) Any incorrect input parameters occur, the value of keys would NOT be updated into EEPROM. S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 44 Purpose: User can assign the interval between two TXs (LoRaWAN Uplinks) when it’s under tx cycle mode and the duty cycle control is turned off. Example: mac set_tx_mode cycle >> Ok S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No...
  • Page 45 RX1 would be set at <Rx1_Freq_Begin> + <Rx1_Step> * 1, the 3 RX1 is <Rx1_Freq_Begin> + <Rx1_Step> * 2; So the Nth Rx1 channel frequency would be <Rx1_Freq_Begin> + <Rx1_Step> * (<Rx1_Count> - 1); S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 46 6 >> 471500000 0 5 0 501500000 mac get_ch_para 7 >> 471700000 0 5 0 501700000 (e.g. TX & RX1 using identical frequency setting) mac set_rx1_freq 0 S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date...
  • Page 47 OTAA when it’s failed to join; If joining by ABP, the <Join_Count> is un-necessary and leave it empty. Purpose: When using remote mode, user might want to let S76G start to join automatically after rebooted by “sip reset” or power off/on. By setting this commands and then execute “mac save”, the next boot-up would execute the joining behavior by the previous auto join setting.
  • Page 48 3 >> Ok mac get_auto_join >> otaa 3 mac set_auto_join on abp >> Ok mac get_auto_join >> abp mac set_auto_join off S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 47 of 73...
  • Page 49 >> Ok 3.2.74 mac get_power_index Response: a decimal string representing transmitting power index value. Purpose: Return transmitting power index value. Example: mac get_power_index >> 3 S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page...
  • Page 50 Response: Ok, if <Switch> string is valid. Invalid, if <Switch> string is not valid. Purpose: When <Switch> is on, it will enable the level shift inside S76G/S78G and initialize UART4 for MCU (STM32L073) sending/receiving commands/responses to/from SONY CXD5603 GPS Chip; When <Switch>...
  • Page 51 1 to 223. Purpose: To set the LoRaWAN uplink port number when uploading GPS UTC, Latitude, Longitude coordinates and other data up to server while S76G is running on TX cycle mode. Response: Ok, if input argument is valid.
  • Page 52 The battery voltage is 80 * 20 = 1600 mV. ii. If “sip set_batt_resistor” is getting called ever: The battery voltage is 3000 + 80 * 10 = 3800 mV. Note: 1) Raw to DD S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No...
  • Page 53 Reference link: https://mydevices.com/cayenne/docs/lora/ <Format> is “kiwi”: The uploaded data length is 17 bytes and its format is not allowed to be disclosure here. But S76G v1.6.2-g6 is already verified and compatible with Kiwi LoRaWAN Server. Example: gps set_format_uplink raw >> Ok <Format>...
  • Page 54 Calculate Latitude: (e.g. c69ba8ce, 0xc6 is 4 bytes of the payload, 0xce is 7 Change endian as below:  ce a8 9b c6  0xcea89bc6 (hex)  “1100 1110 1010 1000 1001 1011 1100 0110” S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No...
  • Page 55 Response: Ok, if <Interval> string is valid. Invalid, if <Interval> string is not valid. Purpose: Set a GPS cycle time that is used to tell how soon GPS will update its coordinates. Example: S76G/S78G Commands Set Reference Product Name Version v1.6.5...
  • Page 56 3000 >> Ok 3.3.6 gps set_mode <Mode> <Mode>: A string representing S76G/S78G GPS mode is set to either “Auto”, “Manual” or “Idle” mode, the string can be auto, manual or idle. Response: Ok, if <Mode> string is valid.
  • Page 57 >> Ok gps get_data dd >> gps_in_idle b) When GPS starts to position but not positioned well yet, it would just return the spending time when GPS is positioning Example: S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date...
  • Page 58 <Switch>: A string representing whether the Sony GPS chip inside S76G/S78G will enter sleep/deep sleep mode or not, the string can be on or off. <Sleep_Level>: To decide which sleep mode S76G/S78G will enter, the value of <Sleep_Level> can be 0 (Sleep Mode) or 1 (Deep Sleep Mode).
  • Page 59 Purpose: To show the TTFF (Time To First Fix) value of the last GPS positioning. And this value would be reset as “0.0s” when S76G/S78G boots up, reset by “sip reset” or enter GPS Idle mode by setting “gps set_mode idle”.
  • Page 60 (More demonstration examples, please refer to chapter 4.4) 3.3.12 gps set_satellite_system <satellite_system> <satellite_system>: A string representing S76G/S78G GPS satellite system is set to either “GPS” or “GPS+GLONASS”, so the string can be gps or hybrid. Response: Ok, if <satellite_system> string is valid.
  • Page 61 3.3.13 gps set_start <start_type> <start_type>: A string representing the way of how S76G/S78G starts to get position, so the string can be hot, warm or cold. Response: Ok, if <start_type> string is valid. Invalid, if <start_type> string is not valid.
  • Page 62 >> Ok // Set following according to LoRaWAN configuration mac set_deveui 9c65f9fffeabcd12 >> Ok mac set_appeui 70B3D57ED000059E >> Ok mac set_appkey C1FE94B0F5F6A50E83015B3C45C933A9 >> Ok S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 61 of 73...
  • Page 63 // Send 0x12, 0x34 to server >> Ok >> tx_ok mac tx cnf 15 1234 >> Ok >> err // Fail to get confirm from server S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018...
  • Page 64 15 1234 >> Ok >> rx 15 6432 // Receive downlink (0x64, 0x32) from server on port 15 S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page 63 of 73...
  • Page 65 / /| |/ ___/\__ \/ / /_/ / Tech Co., LTD / ___ / /__ ___/ / / ____/ LoRaWAN v1.0.2 Ready /_/ |_\___//____/_/_/ (Class A & C) >> S76G - v1.6.1-g6 - AS923 - Nov 20 2017 - 10:47:10 gps set_level_shift on >> Ok gps set_start hot >>...
  • Page 66 Note: GPS UTC & DMS Format “ >> DMS UTC( 2017/12/27 02:29:25 ) LAT( 24*59'20.50" N ) LONG( 121*18'30.48" E ) ” POSITIONING( 1.9s ) UTC: 2Hour 29 Min 25 Sec (UTC+8: 10:29:25@Taiwan) S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date...
  • Page 67 / /| |/ ___/\__ \/ / /_/ / Tech Co., LTD / ___ / /__ ___/ / / ____/ LoRaWAN v1.0.2 Ready /_/ |_\___//____/_/_/ (Class A & C) >> S76G - v1.6.1-g6 - AS923 - Nov 20 2017 - 10:47:10 gps set_level_shift on >> Ok gps set_start hot >>...
  • Page 68 ==> GPS enters Deep Sleep mode. gps sleep on 1 >> Ok gps sleep off >> Ok 4.2.4 Get GPS TTFF Value gps set_level_shift on >> Ok S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page...
  • Page 69 >> Ok ==> GPS enters IDLE mode and stop positioning. gps set_mode manual >> Ok ==> GPS starts to position gps get_ttff >> 0.0s gps get_ttff S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018 Page...
  • Page 70 >> Ok ==> Let GPS position again. 4.2.6 GPS Auto Mode & GPS Auto Join (Take Kiwi Server as demonstration example) sip factory_reset >> v1.6.2-g7.rc1 mac save S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No Date July 2, 2018...
  • Page 71 / /| |/ ___/\__ \/ / /_/ / Tech Co., LTD / ___ / /__ ___/ / / ____/ LoRaWAN v1.0.2 Ready /_/ |_\___//____/_/_/ (Class A & C) >> S76G - v1.6.2-g7.rc2 - AS923 - Jan 3 2018 - 13:11:55 gps set_level_shift on >> Ok gps set_format_uplink kiwi >>...
  • Page 72 ==> The setting value would be stored into EEPROM automatically. >> Ok mac save ==> This “mac save” is used for “mac set_auto_join” and other “mac” commands. S76G/S78G Commands Set Reference Product Name Version v1.6.5 Doc No...
  • Page 73 / /| |/ ___/\__ \/ / /_/ / Tech Co., LTD / ___ / /__ ___/ / / ____/ LoRaWAN v1.0.2 Ready /_/ |_\___//____/_/_/ (Class A & C) >> S76G - v1.6.2-g7.rc2 - AS923 - Jan 3 2018 - 13:11:55 >> gps_in_auto >> join by otaa (3) >> accepted gps get_ttff >>...
  • Page 74 / /| |/ ___/\__ \/ / /_/ / Tech Co., LTD / ___ / /__ ___/ / / ____/ LoRaWAN v1.0.2 Ready /_/ |_\___//____/_/_/ (Class A & C) >> S76G - v1.6.2-g7.rc2 - AS923 - Jan 3 2018 - 13:11:55 S76G/S78G Commands Set Reference Product Name Version v1.6.5...

This manual is also suitable for:

S78g