STW TC1 User manual

TC1
User Manual
Version of this document: V1.00r0

List of Contents
User Manual 2/374
List of Contents
1Index of Abbreviations.................................................................................. 6
2Introduction ............................................................................................... 13
3General Information................................................................................... 14
3.1 Contact .............................................................................................................................. 14
3.2 Copyright........................................................................................................................... 15
3.3 Warranty ........................................................................................................................... 15
3.4 Documents ........................................................................................................................ 15
3.5 Target Group ..................................................................................................................... 16
3.6 Used Symbols and Formats............................................................................................... 16
3.7 Disposal ............................................................................................................................. 17
3.8 History ............................................................................................................................... 17
4Getting Started ........................................................................................... 18
4.1 Additional Available Supplies............................................................................................ 18
4.2 Insert SIM Card.................................................................................................................. 18
4.3 Connect TC1 ...................................................................................................................... 19
4.4 Connect to Development Box ........................................................................................... 19
4.5 Setting up the Serial Interface........................................................................................... 20
4.6 Power up Device ............................................................................................................... 21
4.7 How to Secure the System ................................................................................................ 22
5Hardware.................................................................................................... 23
5.1 Variants ............................................................................................................................. 23
5.2 Technical Data................................................................................................................... 24
5.2.1 Block Diagram Variant TC1-WiFi ..................................................................................................... 24
5.2.2 Block Diagram Variant TC1-WIFI+ ................................................................................................... 25
5.2.3 Block Diagram Variant TC1-Mobile................................................................................................. 26
5.2.4 Power Supply .................................................................................................................................. 26
5.2.5 Processor and System Memory ...................................................................................................... 27
5.2.6 Communication Interfaces.............................................................................................................. 27
5.2.7 Inputs and Outputs ......................................................................................................................... 28
5.2.8 System Data .................................................................................................................................... 29
5.3 Pin Assignment.................................................................................................................. 30
5.4 Mounting Guidelines......................................................................................................... 31
5.5 Connecting Guidelines ...................................................................................................... 33
5.6 Housing ............................................................................................................................. 34
5.7 Connector.......................................................................................................................... 35
5.8 Antenna............................................................................................................................. 36
6Software..................................................................................................... 37
6.1 System Information........................................................................................................... 37
6.2 Boot up / Shut down sequence......................................................................................... 39
6.3 TC1 - Wakeup .................................................................................................................... 41
6.3.1 Ignition............................................................................................................................................ 42
6.3.2 Real Time Clock ............................................................................................................................... 43

List of Contents
User Manual 3/374
6.4 Network handling.............................................................................................................. 46
6.4.1 GSM ................................................................................................................................................ 47
6.4.2 Ethernet .......................................................................................................................................... 51
6.4.3 WLAN .............................................................................................................................................. 54
6.4.4 IP handling ...................................................................................................................................... 61
6.4.5 CAN ................................................................................................................................................. 62
6.4.6 Bluetooth ........................................................................................................................................ 64
6.5 Memory handling.............................................................................................................. 68
6.5.1 NOR Flash........................................................................................................................................ 71
6.5.2 NAND Flash ..................................................................................................................................... 78
6.5.3 EEPROM .......................................................................................................................................... 80
6.6 Watchdog.......................................................................................................................... 82
6.7 Temperature Sensor ......................................................................................................... 83
6.8 GPS .................................................................................................................................... 83
6.9 Serial.................................................................................................................................. 84
6.10 Digital Input / Output........................................................................................................ 85
7Teleservice Application Framework............................................................ 87
7.1 Overview ........................................................................................................................... 87
7.2 TAF Components............................................................................................................... 88
7.2.1 System daemon .............................................................................................................................. 88
7.2.2 Data daemon .................................................................................................................................. 91
7.2.3 Logger daemon ............................................................................................................................... 93
7.2.4 GPS daemon.................................................................................................................................... 96
7.2.5 SMS daemon ................................................................................................................................... 98
7.2.6 Network daemon .......................................................................................................................... 100
7.2.7 Server daemon.............................................................................................................................. 105
7.2.8 Signal daemon .............................................................................................................................. 109
7.2.9 Mail daemon................................................................................................................................. 115
7.3 TAF Library ...................................................................................................................... 124
7.3.1 Introduction .................................................................................................................................. 124
7.3.2 Notation........................................................................................................................................ 126
7.3.3 D-Bus Utils..................................................................................................................................... 133
7.3.4 System........................................................................................................................................... 151
7.3.5 Datapool ....................................................................................................................................... 158
7.3.6 Datalogger..................................................................................................................................... 189
7.3.7 GPS................................................................................................................................................ 229
7.3.8 SMS ............................................................................................................................................... 232
7.3.9 Network ........................................................................................................................................ 236
7.3.10 Server............................................................................................................................................ 241
7.3.11 Signal............................................................................................................................................. 248
7.3.12 Utils ............................................................................................................................................... 252
8Development Tools................................................................................... 268
8.1 Create Own Root File System.......................................................................................... 268
8.1.1 Download, extract and test setup................................................................................................. 270
8.1.2 Adapt the root file skeleton .......................................................................................................... 271
8.1.3 Enable or Disable Buildroot Packages........................................................................................... 271
8.1.4 Extend BR by adding packages...................................................................................................... 275
8.1.5 STW Build Scripts .......................................................................................................................... 275

List of Contents
User Manual 4/374
8.2 Create Own Application .................................................................................................. 277
8.2.1 Create New Project....................................................................................................................... 277
8.2.2 Code Blocks................................................................................................................................... 280
8.2.3 Command Line .............................................................................................................................. 282
8.3 Toolchain......................................................................................................................... 284
8.3.1 Linux.............................................................................................................................................. 284
8.3.2 Windows ....................................................................................................................................... 296
8.3.3 Examples ....................................................................................................................................... 305
8.3.4 Libraries ........................................................................................................................................ 306
9Update the Device.................................................................................... 307
9.1 BSP Components............................................................................................................. 307
9.2 Windows Updater ........................................................................................................... 308
9.3 Linux Updater.................................................................................................................. 310
10 Application Notes ..................................................................................... 314
10.1 Communication Interfaces.............................................................................................. 314
10.1.1 Setting up the Serial Interface ...................................................................................................... 314
10.1.2 TFTP .............................................................................................................................................. 315
10.1.3 NFS ................................................................................................................................................ 315
10.1.4 Telnet ............................................................................................................................................ 317
10.1.5 I/O Pin's......................................................................................................................................... 318
10.1.6 GSM .............................................................................................................................................. 319
10.1.7 CAN ............................................................................................................................................... 320
10.1.8 Bluetooth M2M ............................................................................................................................ 321
10.1.9 E-Mail............................................................................................................................................ 325

List of Contents
User Manual 5/374
11 Utilities Tools............................................................................................ 326
11.1 stw_dptool ...................................................................................................................... 326
11.2 stw_GetGPS..................................................................................................................... 327
11.3 stw_ReadACC .................................................................................................................. 328
11.4 stw_acc2can.................................................................................................................... 329
11.5 stw_show_gps................................................................................................................. 331
11.6 stw_flash_client .............................................................................................................. 332
11.7 stw_SendSMS.................................................................................................................. 333
11.8 stw_RecvSMS .................................................................................................................. 333
11.9 can_bridge - CAN interface bridging tool........................................................................ 334
11.10 kefex_client - STW KEFEX console client......................................................................... 335
11.11 Lighttpd Webserver......................................................................................................... 338
12 Open Source Licenses............................................................................... 340
12.1 Linux Kernel License........................................................................................................ 340
12.2 U-Boot License ................................................................................................................ 345
12.3 busybox License .............................................................................................................. 350
12.4 uClibc License .................................................................................................................. 355
13 Qualification Tests .................................................................................... 363
13.1 Compliance Information ................................................................................................. 363
13.2 Electrical Safety............................................................................................................... 363
13.3 Electromagnetic Compatibility e1/E1 ............................................................................. 366
13.4 Electromagnetic Compatibility CE................................................................................... 367
13.5 EMC Radio and Telecommunications Terminal Equipment............................................ 367
13.6 Environmental Influences ............................................................................................... 368
14 Index......................................................................................................... 370

1 Index of Abbreviations
User Manual 6/374
1 Index of Abbreviations
Abbreviation
Meaning
acm
admission control mandatory
AES
Advanced Encryption Standard
AP
Access Point
API
application programming interface
APN
Access Point Name
bcc
Blind Carbin Copy (e-mail)
bdaddr
Bluetooth Address
BIOS
Basic Input Output System
BLOB
Binary Large Objects
BSP
Board Support Package
BT
Bluetooth
CAN
Controller Area Network
CANopen
Controller Area Network open (protocol)
CBC-MAC
cipher block chaining message authentication code
cc
Carbin Copy (e-mail)
CCMP
Counter-Mode/CBC-MAC Protocol
CEST
Central European Summer Time
cmd
Command
COF
coefficient of friction
COL2
CANopen Layer 2
COM1
Communication Interface No 1
CPU
Central Processor Unit

1 Index of Abbreviations
User Manual 7/374
Abbreviation
Meaning
D-Bus
Desktop-Bus
DF
Data Flash
DFS
Dynamic Frequency Selection
DHCP
Dynamic Host Configuration Protocol
DLC
Data Logging Configuration
DLF
Data Log File
DNS
Domain Name System
DNSMASQ
DNS forwarder and DHCP server for small computer networks
DPL
Data Pool List
DSL
Digital Subscriber Line
DSUB
D sub-miniature (connector design)
EDR
enhanced data rate
EEPROM
electrically erasable programmable read-only memory
EGNOS
European Geostationary Navigation Overlay Service (SBAS)
EIRP
equivalent isotropically radiated power
EOF
End of File
ETH
Ethernet
FBE
Free Buffer Enquiry
FDT
Flattened Device Tree
FIT
Flattened Image Tree
FPU
Floating Point Unit
FRAM
Ferroelectric Random Access Memory
ftp
File Transfer Protocol

1 Index of Abbreviations
User Manual 8/374
Abbreviation
Meaning
ftpd
FTP Daemon
GAGAN
GPS Aided GEO Augmented Navigation (indian SBAS)
GCC
GNU Compiler Collection
GCC
Galileo Control Center
GDB
GNU Project debugger
GID
Group Identifier (Linux)
GLONASS
Globalnaja nawigazionnaja sputnikowaja sistema
(russian satellite navigation system)
GND
GNU Debugger
GNSS
Global Navigation Satellite System
GNU
GNU’s Not Unix (recursive acronym) Free Software
GPL
GNU General Public License
GPO
Group Policy object
GPRS
General Packet Radio Service
GPS
Global Positioning System
GSM
Groupe Spécial Mobile (Global System for Mobile Communications)
GUI
graphical user interface
HCI
Host Controller Interface
HSPA
High Speed Packet Access (extension for UMTS)
HTTP
Hypertext Transfer Protocol
hwclock
Hardware Clock (RTC)
IDE
integrated development environment
IEEE
Institute of Electrical and Electronics Engineers

1 Index of Abbreviations
User Manual 9/374
Abbreviation
Meaning
IGN
Ignition
IPC
Internet Protocol Communications
ISCAN
Inquiry Scan Flag (Bluetooth device is detectable)
ISO
International Organization for Standardization
JFFS2
Journalling Flash File System version 2
KL15
Klemme 15 (name of pin for ignition signal)
LFFORMAT
Logger File Format
LFJNAME
Log File Job Name
LGPL
Lesser General Public License (GNU)
LTS
Long Term Support (UBUNTU Linux)
M2M
Machine to Machine
MAC
Media Access Control
MCC
Mobile Country Code
MDT
Memory Technology Device (Subsystem for Linux)
mmc
Microsoft Management Console (Certificates)
MNC
Mobile Network Code
MOT
Motion Sensor (wake-up signal)
MSAS
Multi-functional Satellite Augmentation System (japanese SBAS)
mtd
Memory Technology Device
MTU
maximum transmission unit
NAND
Not AND (logical gate)
NAT
Network Address Translation
NFS
Network File System

1 Index of Abbreviations
User Manual 10/374
Abbreviation
Meaning
NMEA
National Marine Electronics Association (standards for GPS communication)
NOR
Not Or (logical gate)
NRTI
Network Response Time Indicator
OBEX
Object Exchange (protocol)
OS
Operating System
PAP
Password Authentication Protocol
PFX
Personal information exchange (certificates)
pid
Process Identifier
PIN
Personal Identification Number
ppc
Power PC
PPP
Point-to-Point Protocol
pppd
PPP Dial
PSCAN
Page Scan Flag (Bluetooth device accepts connection requests)
PSK
Pre-Shared Key
QZSS
Quasi-Zenith Satellite System (japanese SBAS)
RAM
random access memory
RFCOMM
Radio Frequency Communication
ROM
read only memory
rootfs
Root File System
RTC
Real Time Clock
RTS
Runtime System
RWD
Read Write DirectMessage (user permission)
SBAS
Satellite Based Augmentation System

1 Index of Abbreviations
User Manual 11/374
Abbreviation
Meaning
SIM
subscriber identity module
SMA
Sub Miniature version A (connector)
smime
Secure / Multipurpose Internet Mail Extensions
SMS
Short Message Service
SMTP
Simple Mail Transfer Protocol
SNTP
Simple Network Time Protocol
src
source (Linux folder)
srv
Service (Linux folder)
ssh
secure shell
SSID
Service Set Identifier
ssl
Secure Sockets Layer
stderr
Standard Error Output (Linux)
stdout
Standard Output (Linux)
SW
Software
TAF
Teleservice Application Framework
TCP
Transmission Control Protocol
TFTP
Trivial File Transfer Protocol
TFTPD
Trivial File Transfer Protocol Daemon (server)
TKIP
Temporal Key Integrity Protocol
tty
Input- and output device interface
UDP
User Datagram-Protocol
URL
Uniform Resource Locator
USB
Universal Serial Bus

1 Index of Abbreviations
User Manual 12/374
Abbreviation
Meaning
UTC
Universal Time Coordinated
UTF
Universal Character Set Transformation Format
VDI
Virtual Box Disk Image
VI
visual (text editor within Linux)
WAAS
Wide Area Augmentation System (SBAS)
WEP
Wired Equivalent Privacy (WLAN encryption)
WLAN
Wireless Local Area Network
WMM
Wi-Fi Multimedia
WPA
Wi-Fi Protected Access (WLAN encryption)
XML
Extensible Markup Language
XOR
exclusive OR (logic gate)

2 Introduction
User Manual 13/374
2 Introduction
This is the user manual of the on-board module TC1. It describes all features of the three hardware variants of
the TC1. Please note that some features might not be available, depending on the variant of your TC1.
Technology provided by the TC1
On-board connectivity: Integration into on-board vehicle and machine control CANbus and Ethernet
networks; reading of your relevant machine data (machine status, operating hours, maintenance warnings).
Wireless connectivity: The TC1 is available in three standard variants tuned to the respective use case with
WiFi and Bluethooth, or cellular communication, or GNSS functionality. Without unnecessary parts for the
intended use case makes the TC1 a cost optimized on-board module.
Cloud connectivity: Prepared for connecting to STW’s “machines.cloud” platform; storing of information
regarding vehicle parameters, settings and behavior. Simple and straightforward connection to other server
and cloud platforms.
Application examples
Connecting fleet vehicles to optimize operating hours
Forward planning of maintenance and repairs to minimize or avoid unplanned downtime
Possibility for remote maintenance e.g. transferring software updates

3 General Information
User Manual 14/374
3 General Information
3.1 Contact
Germany
Sensor Technik Wiedemann GmbH
Am Bärenwald 6
D-87600 Kaufbeuren
Phone: +49-8341-9505-0
Fax: +49-8341-9505-55
Web:www.sensor-technik.de (http://www.sensor-technik.de/)
Email: info@sensor-technik.de (mailto:info@sensor-technik.de)
Email support: support@sensor-technik.de (mailto:support@sensor-technik.de)
USA
STW Technic, LP Electronic Controls
3000 Northwoods Pkwy.
Suite 240
Norcross, GA 30071
Phone: (770) 242-1002
Fax: (770) 242-1006
Web: www.stw-technic.com (http://www.stw-technic.com/)
Email: sales@stw-technic.com (mailto:sales@stw-technic.com)
UK
Sensor-Technik UK Ltd.
Unit 21M, Bedford Heights Business Centre,
Manton Lane, Bedford
Bedfordshire, MK41 7PH
Phone: +44 (0)1234-270770
Fax: +44 (0)1234-348803
Web: www.sensor- technik.co.uk (http://www.sensor-technik.co.uk/)
Email: nick.d@sensor- technik.co.uk (mailto:nick.d@sensor-technik.co.uk)
If you have found an error in this document, or have a suggestion as to how this document could be improved,
please write to documentation@sensor-technik.de (mailto:documentation@sensor-technik.de)

3 General Information
User Manual 15/374
3.2 Copyright
Copyright © Sensor-Technik Wiedemann GmbH 11.01.2017
Am Bärenwald 6, 87600 Kaufbeuren, Germany
All rights reserved.
The information provided in this document contains function descriptions that in case of actual use do not
always apply as described due to the configuration of the product. An obligation to provide the respective
functions shall only exist if expressly agreed in the terms of contract.
Subject to change without prior notice.
ESX and powerMELA are registered trademarks of the Sensor-Technik Wiedemann GmbH.
Other product names, companies, logos, and other brands that are referenced in this documentation are the
property of their respective owners.
3.3 Warranty
Warranty will be void if:
The warranty seals of STW have been removed or damaged
The product was opened by unauthorized persons
Damage has been caused as a result of use, storage or installation that does not comply with the user
manual
3.4 Documents
Overview of documents that are available for the TC1:
Document title
Publisher
Description
TSP - TC1 - Release Notes
STW
Contains Release Notes of the communication driver PSM
Datasheet - TECHNICAL
DATA - TC1
STW
Contains an overview of the technical data of the ECU.
TC1 User Manual
STW
This document, user manuals with information about the
handling and programming of the TC1.
Getting Started for
machines.cloud
STW
A getting started guide to connect your TC1 to machines.cloud
and use the TC1 with the Vehicle Data System (VDS) for data
logging.
Accessibility and archiving:
Keep this document and allow access for everyone working with this product.
This document contains instructions that must be observed and followed.

3 General Information
User Manual 16/374
3.5 Target Group
This manual describes the handling and characteristics of the TC1. It is designed to be a comprehensive
source of information about the TC1 for system design, engineering and maintenance personnel.
System development, installation and commissioning of the TC1 must only be carried out by trained and
experienced personnel who are sufficiently familiar with the used components and with the complete system.
To be able to understand and use the TC1 this personnel must be familiar with:
The programming language C and shell scripting
Installation and usage of communication interfaces like CAN bus, RS232, ETH, WIFI, GSM, GPS and BT
STW offers training courses for commissioning and programming the TC1. Please see the training catalog
of our Academy on the homepage of STW:www.sensor-technik.de (http://www.sensor-technik.de/)
3.6 Used Symbols and Formats
The following symbols and formats are used in our manuals to mark important information:
WARNING:
Warning on faults and errors during the application development.
NOTE:
A note provides additional and important information of the system behavior.
RECOMMENDATION:
A recommendation provides recommended actions that can provide an easier live.
REQUIREMENT:
A requirement is the law, stick to it otherwise you are in big trouble.

3 General Information
User Manual 17/374
3.7 Disposal
The disposal of the unit shall be conform to the recycling regulations of the country and regions in which they
are disposed.
Dispose the TC1 according to the valid local regulations.
3.8 History
Version
Date
Editor
Changes
link to changed
data
V1.00r0
11.01.2017
CKA
Added chapter
All chapters

4 Getting Started
User Manual 18/374
4 Getting Started
This chapter describes what to do to get started with your TC1.
4.1 Additional Available Supplies
Additional available supplies for the TC1 that can be ordered from STW:
Position
Description
STW part number
1
Development box (see "Connect to Development Box" on page
19) for TC1
33518
2
Power supply 5 V ... 15 V
(the TC1 needs at least 9 V DC)
53711
3
Accessories kit for mating connector (see "Connector" on page
35)
48083
4.2 Insert SIM Card
To be able to use the mobile feature of the TC1 a SIM card must be installed. The TC1 can handle any kind of
common network provider. The SIM card slot is located inside the connector.
How to install a SIM card
1. Press the yellow button beside the card tray.
2. Remove the SIM card holder
3. Place the SIM card into the tray.
4. Slide in the fitted holder carefully.

4 Getting Started
User Manual 19/374
4.3 Connect TC1
There are two ways to connect the TC1:
Manufacture your own connecting cable: The mating connector for wire harness see Pin Assignment (see
"Pin Assignment" on page 30), or
Cabling for development purposes: Use the development box, see Development Box (see "Connect to
Development Box" on page 19)
4.4 Connect to Development Box
STW offers a development box for the TC1, for purchase see Additional Available Supplies (see "Additional
Available Supplies" on page 18).
How to connect the TC1 with your development system:
1. Directly plug in the TC1 in the 29 pin connector on top of the development box. See Pin Assignment (see
"Pin Assignment" on page 30) for further information.
2. Connect the development box to your computer. Use a straight-through cable with two 9 pins DSUB female
connectors. Connect one end of the RS232 cable with the RS232-1 connector of your development box.
Connect the other end of the cable to the COM1 port of your PC. You can also use a USB to RS232
converter (recommended converter from GIGAWARE).
3. Connect the development box to your network. Use a CAT 5 Ethernet cable. Connect the cable with the
RJ45-connector to the back of the development box. Connect the other end of the cable to a network
switch or router.
Use a cross over cable when connecting the development box to a hub or with a PC.
4. Connect the power supply to the back of the development box. See Additional Available Supplies (see
"Additional Available Supplies" on page 18) for a suitable power supply.

4 Getting Started
User Manual 20/374
4.5 Setting up the Serial Interface
Terminal program for the serial interface
Use a serial straight-through cable to connect the TC1 with your PC.
Depending on the used operating system on the used PC for development, a RS232 terminal must be installed.
Recommended programs for a RS232 terminal:
GtkTerm for computers using a Linux operating system
Tera Term for Windows desktop PCs
GtkTerm used for RS232 terminal program:
Settings for the serial port
Property
Value/Description
Port
state here your port
Baud rate
115200
Data
8bit
Parity
none
Stop
1 bit
Flow control
none
Table of contents
Popular Controllers manuals by other brands

Milesight
Milesight UC100 quick start guide

Agilent Technologies
Agilent Technologies Multiple Channel Controller 85330A Operating and service manual

IOT-Smart Solutions
IOT-Smart Solutions KBD-5820 user manual

ESYLUX
ESYLUX ELC quick guide

Philips
Philips Dynalite DMAL120F installation instructions

Omron
Omron SYSMAC C200HW-ZW3AT2-E-V2 Operation manual