Innocomm SN10-2 series User manual

SN10-2x
User’s Guide
Product Line
Document Name
Version v 0.2.5
Date
DocID
Status
Approved by Reviewed by Issued by
Joe Hou

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
2
/
28
Revision History
Revision Released Date Comments/Remark Author
Draft 2016/11/24 Initial release
V 0.1 2016/12/06
Added section 3 “ Use of the pins…”, references
to TI documents and web sites and some minor
changes
V0.1.1 2016/12/07 Corrected some inconsistencies between the
document and the SDK
V 0.1.2 2016/12/08 Corrected AT command codes for changing RCZ.
Removed AT command for getting device
version
V 0.1.3 2017/01/20 Added high level functions sendData() and
sendBitStatus()
V 0.1.4 2017/03/02 Changed default interval for location reporting
to 1 minute. Customers may change it in the
source code.
V 0.1.5 2017/03/03 Removed command code 12, 14 and 15.
V 0.2.0 2017/04/26 Updated for 2640 R2
V 0.2.1 2017/06/13 Added a step to check the zone and the key
type to the build process.
V 0.2.2 2017/07/19 Updated the description of Appendix B
Added Appendix C for hardware setup.
V 0.2.3 2017/08/08 Added screen shots for the SDK setup
procedure
V 0.2.4 2017/08/18 Updated PIN assignment and PIN name
V 0.2.5 2017/09/28 Separated AT command interpreter as a stand
alone application from the low power tracker
application to free up one additional GPIO
(IO_EXP_P5) for the application.
® 2017 InnoComm Mobile Technology Corp.
GENERAL NOTICE
THE USE OF THE PRODUCT INCLUDING THE SOFTWARE AND DOCUMENTATION (THE "PRODUCT") IS SUBJECT TO THE
RELEASE NOTE PROVIDED TOGETHER WITH THE PRODUCT. IN ANY EVENT THE PROVISIONS OF THE RELEASE NOTE
SHALL PREVAIL. THIS DOCUMENT CONTAINS INFORMATION ABOUT INNOCOMM PRODUCTS. THE SPECIFICATIONS IN
THIS DOCUMENT ARE SUBJECT TO CHANGE AT INNOCOMM'S DISCRETION. INNOCOMM MOBILE TECHNOLOGY
GRANTS A NON-EXCLUSIVE RIGHT TO USE THE PRODUCT. THE RECIPIENT SHALL NOT TRANSFER, COPY, MODIFY,

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
3
/
28
TRANSLATE, REVERSE ENGINEER, CREATE DERIVATIVE WORKS; DISASSEMBLE OR DECOMPILE THE PRODUCT OR
OTHERWISE USE THE PRODUCT EXCEPT AS SPECIFICALLY AUTHORIZED. THE RECIPIENT UNDERTAKES FOR AN
UNLIMITED PERIOD OF TIME TO OBSERVE CONFIDENTIALLITY REGARDING ANY INFORMATION AND DATA PROVIDED
TO THEM IN THE CONTEXT OF THE DELIVERY OF THE PRODUCT. THIS GENERAL NOTE
SHALL BE GOVERNED AND CONSTRUED ACCORDING TO TAIWAN LAW.
Copyright
Transmittal, reproduction, dissemination and/or editing of this document as well as utilization of its contents and
communication thereof to others without express authorization are prohibited. Offenders will be held liable for
payment of damages. All rights created by patent grant or registration of a utility model or design patent are reserved.
Copyright © 2017, InnoComm Mobile Technology Corp.
Trademark Notice
InnoComm® is the trademarks of InnoComm Mobile Technology Corp.
Other trademarks and registered trademarks mentioned herein are the property of their respective owners.

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
4
/
28
TABLE OF CONTENT
1. INTRODUCTION ................................................................................................... 5
2. LIBRARY AND SAMPLE APPLICATION OVERVIEW ............................................... 5
3. PIN ASSIGNMENTS .............................................................................................. 7
4. SETTING UP THE SDK........................................................................................... 8
5. ENUMERATIONS, STRUCTURES AND UNIONS .................................................. 14
6. FUNCTIONS ....................................................................................................... 16
6.1 MODULE................................................................................................................ 16
6.2 SIGFOX ............................................................................................................... 16
6.3 WIFI & GPS ......................................................................................................... 20
6.4 BLUETOOTH .......................................................................................................... 21
6.5 G-SENSOR ............................................................................................................ 22
6.6 UTILITIES............................................................................................................... 22
6.7 IO EXPANDER ........................................................................................................ 23
APPENDIX A ............................................................................................................. 24
APPENDIX B ............................................................................................................. 26
FEDERAL COMMUNICATION COMMISSION INTERFERENCE STATEMENT ............... 27
RADIATION EXPOSURE STATEMENT:....................................................................... 28

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
5
/
28
1. Introduction
SN10 is a low power combo-module with wifi module, GPS module, BLE module and SIGFOX
module and a acceleration sensor built in. The SDK consists of the following components:
TI’s Code Composer Studio
TI’s real-time operating system
TI’s driver library and BLE stack
Innocomm’s library for SIGOFX module interface
Low power tracker application with full source codes
Section 2 gives an overview of the library and the sample application. Section 3 describes the SDK
installation procedure, and section 4 describes the APIs in detail. Please visit the following
websites for documents of the Code Composer Studio IDE and TIRTOS.
http://www.ti.com/tool/ccstudio
http://www.ti.com/tool/ti-rtos
2. Library and sample application overview
The library consists of the following components. Each exposes a set of APIs for the applications’
access. Source codes are available for all but the SIGFOX handler.
Wifi handler interfaces to the wifi module via UART to scan the surrounding for Wifi APs.
GPS handler interfaces to the GPS module via UART to get the fix of the GPS location.
SIGFOX handler interfaces to the SIGFOX module via SPI to configure the module, sends and
receives payload from the network, and to perform test mode procedures.
G sensor handler interfaces to the G sensor via I2C to configure the sensor and register call
back for G sensor interrupt events.
Bluetooth broadcaster configures the content and the interval of the beacon and broadcasts

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
6
/
28
beacons periodically.
The low power tracker sample application will scan surrounding wifi APs and fix GPS location every
60 minute or upon G sensor interrupt,. It will also broadcast BLE beacons every 100 ms. The
application consists of the following components:
A collection of the call back functions that convert timer and sensor interrupts and BT
protocol events to application events,
An application message queue, and
The application logic that initiates the module , and processes the application events and calls
the module APIs to broadcast the beacon and to collect the location data and send it to the
SIGFOX network.
The users may extend the functionality of the application by adding new peripherals or sensors to
the device and adding new events, new call backs and new handling functions for them.
The following high level application flow demonstrates how the application and the library interact
to serve an interrupt event .
1. At start up, the application calls the library initiation function to initiate the module and pass
the call back functions for hourly timer interrupt, G sensor interrupt, AT interpreter 5 ms
timer interrupt and BT protocol event to the library.
2. The library initializes the wifi, GPS, SIGFOX, G sensor, BT broadcast and the drivers, and
registers the call back functions to the interrupt service of the OS. The application is now
ready to receive and process events.
3. When an interrupt(e.g. G sensor interrupt) happens, the interrupt service calls the
corresponding call back function(e.g. G sensor call back).
4. The call back function converts the interrupt event to the application event and en-queue it
to the application message queue for processing.
5. The interrupt handling function(e.g. G sensor interrupt handling function) de-queues the
event and calls the library to process the event (e.g. scan the wifi AP, fix the GPS location and
send the result to the SIGFOX network).
6. Repeat 3 ~ 5 when new interrupts (e.g. hourly timer interrupts, G sensor interrupts) happen.

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
7
/
28
3. Pin assignments
In addition to the existing IO pins of the MCU, an I2C based IO expander is added to the module to
add additional 8 pins (IO_EXP_P0 ~ IO_EX_P7) to the module. The pins used by the library are
listed in the following table.
function SW Pin name Pin define
IO-expander (I2C)
DIO_9 SDA
DIO_10 SCL
DIO_8 INT
G-sensor (I2C)
DIO_9 SDA
DIO_10 SCL
IO_EXP_P6 EINT1
SIGFOX (SPI)
DIO_7 AK
IO_EXP_P3 RESET
IO_EXP_P4 CS
DIO_12 SDI
DIO_11 SDO
DIO_13 SCK
GPS (Board_UART0) IO_EXP_P2 RESET
DIO_2 UART RX
WIFI (Board_UART1)
IO_EXP_P1 LDO_EN
DIO_1 UART TX
DIO_0 UART RX
Trace (SW UART) DIO_3 LOG_TX
DIO_4 LOG_RX
DC enable IO_EXP_P0 DC_EN
Pins free for the application are listed in the following table.
If your application requires more IO’s, GPIO5(DIO_4) and (GPIO6(DIO_3) can be made available by
disabling the trace function. However, since the AT command interpreter application also uses
these two pins, it might not work properly depending on how these pins are used in your
application. If it doesn’t work, you’ll have to write a simple application to send the command
sequences to the Sigfox module required for certification test of your device. Please contact
[email protected] for support.
Pin name
SW pin name
Pin define
G_SDA2
DIO_9
I2C SDA
G_SCL2
DIO_10
I2C SCL
JTAG_TDI
DIO_6
JTAG TDI or UART TX (Board_UART2) or digital GPIO
JTAG_TDO
DIO_5
JTAG TDO or UART RX (Board_UART2) or digital GPIO
GPIO2
DIO_14
Analog
GPIO3
IO_EXP_P5
Digital
GPIO4
IO_EXP_P7
Digital

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
8
/
28
4. Setting up the SDK
You’ll see the following files and folder after unzipping the SDK package, for compatibility please
do not replace these files with newer or older versions available on the web:
The CCS installation file < ccs_setup_7.1.0.00016.exe >
The BLE stack and TI RTOS installation file < simplelink_cc2640r2_sdk_1_30_00_25.exe >
SN10_CONFIG2_SDK folder that contains the SN10 library , the sample project and the source
code for the sample application.
Please follow the following steps to complete the installation. For details of the installation
procedures please refer to section 2.6.3 of the CC2640 Developer’s Guide
(http://www.ti.com/lit/ug/swru393d/swru393d.pdf)
Install the CCS IDE
Execute ccs_setup_7.1.0.00016.exe and follow the flow to install the CCS IDE.
1. Do not change the default installation location (c:\ti)
2. In Processor Support, select “SimpleLink CC13xx and CC26xx Wireless MCUs”.
3. In Select Debug Probes, select “TI XDS Debug Probe Support”.
Install the BLE stack and TI RTOS
Execute simplelink_cc2640r2_sdk_1_30_00_25.exe and follow the flow to install the BLE stack and
the TI RTOS.
Do not change the default installation location of the stack (c:\ti\
simplelink_cc2640r2_sdk_1_30_00_25) and the RTOS (c:\ti).
Install innocomm’s library and sample application
1. Open the SN10_CONFIG2_SDK folder
2. Copy the examples folder and the source folder to C:\ti\
simplelink_cc2640r2_sdk_1_30_00_25\.
Note: There are examples and source folders under the
simplelink_cc2640r2_sdk_1_30_00_25 folder. This step will copy contents in the examples
folder and the source folder of the SDK in to the examples folder and the source folder of the
simplelink_cc2640r2_sdk_1_30_00_25 folder respectively. Please overwrite the existing files
when prompted.

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
9
/
28
3. In CCS, select Project->Import CCS Projects
4. Click Browse… button and navigate to
C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\examples\rtos\SN10\low_power_tracker

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
10
/
28
5. Click the OK button and select the two discovered projects: low_power_tracker_app and
low_power_tracker_stack_library and click Finish button to import.
(select “copy to workspace”)
Build and run the application
You may now build the two projects, the low_power_tracker_app and the
low_power_tracker_stack_library, you just imported.
1. Go to the Project Explorer of the CCS and select the low_power_tracker_stack_library project
2. Check the compiler version of the CCS at Project->Properties->General->Advanced setting-

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
11
/
28
>Compiler version. If the version is not v16.9.1 follow “Update the TI ARM Compiler”
procedure to update the compile
3. Select Project-> Build Project to build the project
4. Go to the Project Explorer again and select the low_power_tracker_app project
5. Open low_power_tracker.c under Application folder and check the currentZone and the
keyType parameters. The default is zone 1 and private key. Change the currentZone
parameter to the zone your device will be working in, and change the keyType parameter to
public if it is going to be connected to the network emulator SNEK.

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
12
/
28
6. Select Project->Build Project to build the project
7. Select Run-> Debug to flash the binary to the module
Note: if you experienced problem flashing the binary to the target, select Help-> Installation
Details to update the TI Emulators to newer version.
8. Select Run->Terminate to terminate the debug session.

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
13
/
28
9. Reset the EVB to start the low power tracker application
Update the TI ARM Compiler
1. In CCS select Help->Install New Software
2. In “Work with”, select Code Generation Tools Updates ( windows or Linux of your choice) and
uncheck “Show only the latest versions of available software”
3. Select TI Compiler Updates -> ARM compiler Tools 16.9.1 and follow the flow to install

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
14
/
28
5. Enumerations, Structures and Unions
This section gives the details of the data structures and the APIs of the library.
typedef enum
{
SIGFOX_OK = 0,
SIGFOX_NOK
} e_sfx_ret;
Used in all sigfox related APIs.
typedef enum
{
RC_Zone1 = 0,
RC_Zone2,
RC_Zone3,
RC_Zone4
} e_zone_code;
Used in changeRCZ() function to indicate the RC zone to change to.
typedef enum
{
Private_Key = 0,
Public_Key
} e_key_type;
Used in switchKey() function to select the private key or the public key to be used.
typedef enum
{
Uplink_Frequency = 0,
Downlink_Frequency
} e_frequency_type;
Used in setFrequency() and getFrequency() function to select the frequency type.
typedef enum
{
Switch_Off_Continuous_Wave = 0,
Switch_On_Continuous_Wave
} e_continuousWave_state;
Used in continuousWave() function to switch on or switch off the continuous wave.
typedef enum
{
SFX_TEST_MODE_TX_BPSK = 0,
SFX_TEST_MODE_TX_PROTOCOL = 1,

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
15
/
28
FX_TEST_MODE_RX_PROTOCOL = 2,
FX_TEST_MODE_RX_GFSK = 3,
SFX_TEST_MODE_RX_SENSI = 4,
SFX_TEST_MODE_TX_SYNTH = 5,
} sfx_test_mode_t;
Used in sendTestMode() function to select the test mode.
typedef struct
{
uint8 devId[BSSID_LEN];
int16 rssi;
} wifiAPRec_t;
Used in scanWifiAPs() function to hold the information of the returned Wifi APs.
typedef struct
{
float latitude;
float longitude;
} gpsRec_t;
Used in fixGPSLocation() function to hold the latitude and longitude of the fix.
typedef union
{
int8 s;
uint8 us;
int16 i;
uint16 ui;
int32 l;
uint32 ul;
float f;
char *p;
} data_t;
Used in trace() function to indicate the type of data to be print out.

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
16
/
28
6. Functions
6.1 Module
void initiateModule(void (*IOexpanderCB)(), void (*GAPEvtCB)())
Function to initiate the module.
Parameters:
[in] void (*IOexpanderCB)()
Pointer to the call back function for the IOexpander interrupts
[in] void(*GAPEvtCB)()
Pointer to the call back function for the GAP events
Return:
None
6.2 SIGFOX
e_sfx_ret sendData(uint8 *payload, uint8 payloadLen, uint8 *rcvBuf, uint8 *pLen)
Function to send data to the SIGFOX network. This function will wake up the SIGFOX module,
switch to the designated RCZ, send the payload and at the end, send the SIGFOX module to
sleep.
Parameters:
[in] payload
The payload to be sent to the network.
[in] payloadLen, up to 12.
Size of the payload in bytes.
[out] rcvBuf
The feedback from the network. Should pass NULL if not expecting feedback.
[out] pLen
Size of the feedback in bytes.
Return:
SIGFOX_OK or SIGFOX_NOK
e_sfx_ret sendBitStatus(uint8 bitValue, uint8 *rcvBuf, uint8 *pLen)
Function to send bit status to the SIGFOX network. This function will wake up the SIGFOX
module, switch to the designated RCZ, send the bit status and at the end, send the SIGFOX
module to sleep.
Parameters:
[in] bitValue
The status, should be 0 or 1.
[out] rcvBuf
The feedback from the network. Should pass NULL if not expecting feedback.
[out] pLen
Size of the feedback in bytes
Return:

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
17
/
28
SIGFOX_OK or SIGFOX_NOK
(The aforementioned two APIs should be sufficient for most of the applications. The
following APIs are only needed only if finer control of the SIGFOX module is required)
e_sfx_ret sendWakeup()
Function to wakeup the SIGFOX module.
Parameters:
None
Return:
SIGFOX_OK or SIGFOX_NOK
e_sfx_ret sendToSleep()
Function to send the SIGFOX module to sleep.
Parameters:
None
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret sendPayload(uint8 *payload, uint8 payloadLen, uint8 *rcvBuf, uint8 *pLen)
Function to send payload to the network and optionally receive feedback from it.
Parameters:
[in] payload
The payload to be sent to the network.
[in] payloadLen, up to 12.
Size of the payload in bytes.
[out] rcvBuf
The feedback from the network. Should pass NULL if not expecting feedback.
[out] pLen
Size of the feedback in bytes.
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret sendBit(uint8 bitValue, uint8 *rcvBuf, uint8 *pLen)
Function to send a bit status to the network and optionally receive feedback from it.
Parameters:
[in] bitValue
The status, should be 0 or 1.
[out] rcvBuf
The feedback from the network. Should pass NULL if not expecting feedback.
[out] pLen
Size of the feedback in bytes
Return:
SIGFOX_OK or SIGFOX_NOK.

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
18
/
28
e_sfx_ret sendOutOfBand()
Function to have SIGFOX module send out of band message.
Parameters:
None.
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret getInfo(uint8 *deviceId, uint8 *pac, char *libVersion)
Function to get the information of the SIGFOX module.
Parameters:
[out] deviceId
The 4 bytes SIGFOX ID of the SIGFOX module
[out] pac
The 8 bytes PAC of the SIGFOX module
[out] libVersion
The library version, 11 bytes.
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret setFrequency (e_frequecny_type fType, uint32 freq)
Function to set the frequency of the SIGFOX module
Parameters:
[in] fType
Uplink_Frequency or Downlink_Frequency.
[in] freq
The frequency to set to.
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret getFrequency (e_frequecny_type fType, uint32* freq)
Function to get the frequency of the SIGFOX module
Parameters:
[in] fType
Uplink_Frequency or DownLInk_Frequency
[in] freq
The returned frequency.
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret continuousWave (e_continuousWave_state state)
Function to have the SIGFOX module send continuous wave
Parameters:
[in] state
Switch_On_Continuous_Wave or Switch_Off_Continuous_Wave
[in] freq

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
19
/
28
The returned frequency.
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret getDeviceVersion (char *hwVersion, char *devVersion)
Function to get the hardware version and the device version of the SIGFOX module
Parameters:
[out] hwVersion
8 bytes hardware version
[out] devVersion
7 bytes device version.
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret triggerWatchdog ()
Function to reset the SIGFOX module
Parameters:
None
Return:
SIGFOX_OK or SIGFOX_NOK
e_sfx_ret sendTestMode(sfx_test_mode_t txTestMode, uint8 txTestConfig)
Function to have the SIGFOX module send signals for RF testing.
Parameters:
[in] txTestMode
[in] txTestConfig
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret changeRCZ (e_zone_code zone)
Function to switch to the selected zone.
Parameters:
[in] zone
RC_Zone1, ETSI Europe (863~870MHz)
RC_Zone2, FCC US (902~928MHz)
RC_Zone3, ARIB Japan, Korea (915~930MHz)
RC_Zone4, FCC Latin America, Australia, New Zealand (902~915MHz)
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret switchKey (e_key_type keyType)
Function to switch to selected key type.
Parameters:
[in] keyType
Public_Key, use public key

SN10
DOCID
1/31/2018
REV 0.2.5
InnoComm Mobile Technology Confidential
20
/
28
Private_Key, use private key
Return:
SIGFOX_OK or SIGFOX_NOK.
e_sfx_ret setFCCMacroChannel(char *configString, uint8 defaultChannel)
Function to configure the enabled channels for FCC
Parameters:
[in] configString
Configuration (disabled or enabled) of the Macro channels.
[in] defaultChannel
The default SIGFOX macro channel.
Return:
SIGFOX_OK or SIGFOX_NOK.
void toZone(e_zone_code zone)
Function to set the zone code of the module.
Parameters:
[in] zone
Zone to set to
Return:
None
void useKeyType (e_key_type type)
Function to set the module to use private key or public key when sending data to the network.
Parameters:
[in] type
Private key or public key
Return:
None
uint8 getErrCode()
Function to the error code of a sigfox API.
Parameters:
None
Return:
uint8 errCode
6.3 WIFI & GPS
uint8 scanWifiAPs(wifiAPRec_t *APList)
Function to scan the surrounding for the top two Wifi APs of strongest signal.
Parameters:
[out] APList
Records of the Wifi APs found.
Table of contents
Popular Control Unit manuals by other brands

Diankong Electronics
Diankong Electronics DK-BT-MUSIC-21A quick guide

Emerson
Emerson KTM Series Operating and safety instructions

Satel
Satel STAM-1 TRNK quick start guide

Harman
Harman DBX 500 Series owner's manual

Elesa
Elesa UC-RF operating instructions

Select Engineered Systems
Select Engineered Systems CATDR4 Installation setup manual