STW TC1 Manuale utente

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
Indice

















