C4-D

This page has been updated on 29 March 2011.

How to manage the outputs?

  • Type #SWITCH# to open the basics console.
  • Type screen 2 to open the commands console.
  • Type cexe MainProc_DigitalOutputs.cmd setState 1 1 to enable the output 1.
  • Type cexe MainProc_DigitalOutputs.cmd setState 1 0 to disable the output 1.
  • Type cexe MainProc_DigitalOutputs.cmd setState 2 1 to enable the output 2.
  • Type cexe MainProc_DigitalOutputs.cmd setState 2 0 to disable the output 2.

Note: Use the command iostate from the basics console to control the outputs.

Basics[C4D]> iostate
Input 1 : Disconnected
Input 2 : Disconnected
Input 3 : Disconnected
Output 1 : Disconnected
Output 2 : Disconnected
Alarm : Disconnected
Ignition : Connected

How to get the versions from the console?

  • Type #SWITCH# to open the basics console.
  • Type screen 1 to open the advanced console.
  • Type version to display the hardware/software versions.
i.e.
Advanced[C4D]> version
Libplug : 790
SBSL : 549
Kernel : 7f69264
System : 790
Serial number : 978
Board type : C4D V1 4 E

 - device : 'type'
 - version : 'C4D'
 - category : 'Hardware'
 - info : ''
Result : 0
 - device : 'type'
 - version : 'C4D'
 - category : 'Hardware'
 - info : ''
Result : 0
 - device : 'release'
 - version : 'Release-2.4.3'
 - category : 'Software'
 - info : ''
Result : 0
 - device : 'serial'
 - version : '978'
 - category : 'Hardware'
 - info : ''
Result : 0
 - device : 'bootloader'
 - version : '549'
 - category : 'System'
 - info : ''
Result : 0
 - device : 'kernel'
 - version : '133599844'
 - category : 'System'
 - info : ''
Result : 0
 - device : 'rootfs'
 - version : '790'
 - category : 'System'
 - info : ''
Result : 0
 - device : 'libplug'
 - version : '790'
 - category : 'Software'
 - info : ''
Result : 0
 - device : 'VM'
 - version : '0x10006'
 - category : 'Software'
 - info : ''
Result : 0
 - device : 'com.mdi.services.dataEmitter'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.ibutton'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.sshTunnel'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.jvm'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.messageGate'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.ledManager'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.gpsEcho'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.cpnManager'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.update'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.versionManager'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.netMonitoring'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.config'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.pwrManager'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.pdm'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.dataRecorder'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.gpsOdometer'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.hygrometer'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.dnsProxy'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.eeprom'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.criticalCommandManager'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.fileManager'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.dbg'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.boardsInfo'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.can'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.acceleroMvtDetector'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.batt'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.gpsMvtDetector'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.temperatureSensor'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.accelerometers'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.wdg'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.binaryGate'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.commandManager'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.leds'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.services.adminProtocol'
 - version : '6185'
 - category : 'Dynamic service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.onewire'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.serialPPP'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.ios'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.modem'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.tools.boot'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.gps'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'com.mdi.drivers.bootReason'
 - version : '6185'
 - category : 'Static service'
 - info : ''
Result : 0
 - device : 'modem'
 - version : '07.03.700'
 - category : 'Hardware'
 - info : ''
Result : 0
 - device : 'gps'
 - version : 'GSW3.5.0Telit_3.5.00.00-C23P2.00a '
 - category : 'Hardware'
 - info : ''
Result : 1
Advanced[C4D]>

How to disable the binaryGate?

  • Type #SWITCH# to open the basics console.
  • Type list cpnManager.
i.e.
Basics[C4D]> list cpnManager
cpnManager.notStartedMDICpns[0]=
cpnManager.notStartedMDICpns[1]=
cpnManager.notStartedMDICpns[2]=
cpnManager.notStartedMDICpns[3]=com.mdi.services.history
cpnManager.notStartedMDICpns[4]=com.mdi.services.gpsEcho
cpnManager.notStartedMDICpns[5]=com.mdi.services.relayControl
cpnManager.notStartedMDICpns[6]=com.mdi.services.geoFencing
cpnManager.notStartedMDICpns[7]=com.mdi.services.fileProtocol
cpnManager.notStartedMDICpns[8]=com.mdi.tools.statSlaveJava
  • check the free indexes (0, 1, 2).
  • Type s cpnManager notStartedMDICpns 0 com.mdi.services.binaryGate.
  • Type s cpnManager notStartedMDICpns 1 com.mdi.services.adminProtocol.
  • Type s cpnManager notStartedMDICpns 2 com.mdi.services.messageGate.
  • Type list cpnManager.
i.e.
Basics[C4D]> list cpnManager
cpnManager.notStartedMDICpns[0]=com.mdi.services.binaryGate
cpnManager.notStartedMDICpns[1]=com.mdi.services.adminProtocol
cpnManager.notStartedMDICpns[2]=com.mdi.services.messageGate
cpnManager.notStartedMDICpns[3]=com.mdi.services.history
cpnManager.notStartedMDICpns[4]=com.mdi.services.gpsEcho
cpnManager.notStartedMDICpns[5]=com.mdi.services.relayControl
cpnManager.notStartedMDICpns[6]=com.mdi.services.geoFencing
cpnManager.notStartedMDICpns[7]=com.mdi.services.fileProtocol
cpnManager.notStartedMDICpns[8]=com.mdi.tools.statSlaveJava
  • Type reboot to reset the device.

How to filter incoming SMS?

You can filter (authorize/unauthorize) incoming SMS using one of the following methods (not both).

Build a list of authorized numbers (allowedSMSNumbers)

  • Type #SWITCH# to open the basics console.
  • Type screen 2 to open the commands console.
  • Type cexe MainProc_ConfigAccess.cmd modem getKey allowedSMSNumbers. In this sample it returns 0.
  • Type cexe MainProc_ConfigAccess.cmd modem insert 0 +336xxxxxxxxx ''.
  • Type cexe MainProc_ConfigAccess.cmd modem insert 0 +336xxxxxxxxx ''.
  • And so on. You can add a maximum of 254 numbers.

Build a list of unauthorized numbers (modem.deniedSMSNumbers)

  • Type #SWITCH# to open the basics console.
  • Type screen 2 to open the commands console.
  • Type cexe MainProc_ConfigAccess.cmd modem getKey deniedSMSNumbers. In this sample it returns 7.
  • Type cexe MainProc_ConfigAccess.cmd modem insert 7 +336xxxxxxxxx ''.
  • Type cexe MainProc_ConfigAccess.cmd modem insert 7 +336xxxxxxxxx ''.
  • And so on. You can add a maximum of 254 numbers.

If you send a SMS from a denied number you should see the kind of log:

2009/02/15 00:13.16      WARN:SMSManager::filterSMSNumbers: number not allowed {+336xxxxxxxx}.
2009/02/15 00:13.16      ERROR:SMSManager::newSMS: unvalid SMS number {+336xxxxxxxx}

How to download the configuration (console)?

  • Type #SWITCH# to open the basics console.
  • Type list all dl
  • Transfer the file config.txt via Kermit.
i.e
Basics[C4D]> list all dl
...........................................
fileManager.authorizedReadDir[0]=data/
fileManager.authorizedReadDir[1]=/mnt/user/mmc/
fileManager.authorizedReadDir[2]=/var/tmp/
....
binaryGate.url[1]=
binaryGate.url[2]=
binaryGate.url[3]=
binaryGate.url[4]=
Transfering file 'config.txt' in kermit
G-Kermit CU-1.00, Columbia University, 1999-12-25
Escape back to your local Kermit and give a RECEIVE command.

KERMIT READY TO SEND...
9 S~' @-#Y3~*!J*0+++J"U1@O

How to download the log (console)?

  • Type #SWITCH# to open the basics console.
  • Type screen 1 to open the advanced console.
  • Type logs get.
  • Type all and use Kermit to transfer the file all_tar.gz.
i.e
Advanced[C4D]> logs get
Starting log retrieving
@400000004cdabf86240853bc.s
@400000004cdab5e0364282b4.s
@400000004cdaac30373ea594.s
@400000004cdaa2901ec2b3d4.s
@400000004cda98ff01f80d1c.s
@400000004cda8f6505459624.s
@400000004cda85b001500964.s
@400000004cda7c0d330cfe1c.s
@400000004cda74d30124713c.s
current
Which file? : all
Archieving log files
Transfering file 'all.tar.gz' in kermit
G-Kermit CU-1.00, Columbia University, 1999-12-25
Escape back to your local Kermit and give a RECEIVE command.

KERMIT READY TO SEND...
9 S~' @-#Y3~*!J*0+++J"U1@O

Note: Use this converter to convert the timestamp.

How to check modem revision?

C4C

  • Type #SWITCH# to open the light console.
  • Type console to open the full console.
  • Type modemAT.
  • Type at+cgmr. You should get 07.03.700.
i.e.
modemAT
Starting Modem AT mode
Stopping software, please wait
Stopping software done
Stopping modem
0
0
Modem is stopped
Done stopping modem
Starting modem
0
0
Modem is started
Done starting modem
Type your AT command in :
at+cgmr
at+cgmr
07.03.700
OK

C4D

  • Type #SWITCH# to open the basics console.
  • Type screen 1 to open the advanced console.
  • Type version to display all software/hardware versions.
  • Look for the modem version. You should get 07.03.700.
i.e.
Advanced[C4D]> version
...
Result : 0
 - device : 'modem'
 - version : '07.03.700'
 - category : 'Hardware'
 - info : ''
Result : 0

How to get the board Id?

From the console

  • Type #SWITCH# to open the basics console.
  • Type gdb MDI_BOARD_ID to get the DB value.
i.e.
Basics[C4D]> gdb MDI_BOARD_ID
375

From the GUI

  • Select Version/Hardware.
  • Look for the Serial field.

How to get the software version (SMS)?

Method 1

  • Send the SMS command get,jvm.compilation_date.
i.e.
CNF,jvm.compilation_date,Wed Jun 13 13:50:06 CEST 2007

Note: Use this list to find the version.

Method 2

  • Send the SMS command version,com.mdi.drivers.gps
i.e.
com.mdi.drivers.gps, version:[5868M] category:[Static service] infos:[]

Note: This method works on all 2.4.3 devices with a GPS module.

Method 3

  • Send the SMS command version,com.mdi.drivers.screen
i.e.
com.mdi.drivers.screen, version:[5868M] category:[Static service] infos:[]

Note: This method can be used on a D3x.

Method 4

  • Send the SMS command version,com.mdi.drivers.can
i.e.
com.mdi.drivers.can, version:[5868M] category:[Static service] infos:[]

Note: This method can be used on a H4 (no screen, no GPS).

How to enable the interboard communication?

Server device configutration (C4D)

  • Type #SWITCH# to open the basics console.
  • Type s serialPPP enableMultiBoard 1.
  • Type s serialPPP serverMode 1.
  • Type reboot to reset the device.

→ A server device sends a WAKE message on the serial port.

Client devices (H4/D3L)

  • Type #SWITCH# to open the basics console.
  • Type isuspend to invalidate the current suspendOnROM image.
  • Type s serialPPP enableMultiBoard 1.
  • Type s serialPPP serverMode 0.
  • Type reboot to reset the device.

→ A client device sends a CLIENT message on the serial port.

Note: If needed use the parameter serialPPP.sendWakeSignal=0 to disable the WAKE message.

How to add the movement into the frame?

From the console

  • Type #SWITCH# to open the basics console.
  • Type isuspend to invalidate the current suspendOnROM image.
  • Type s acceleroMvtDetector active 1 to enable the accelerometer movement detection.
  • Type s acceleroMvtDetector no_movement_threshold 10 to change the threshold (in second).
  • Type s gpsMvtDetector active 0 to disable the gps movement detection.
  • Type s dataRecorder fieldPeriod 56 0 to add the movement flag in the $GPRMC frame.
  • Type reboot to reset the device.

Note: The parameter acceleroMvtDetector.no_movement_threshold must be strictly greater than 1s.

How to manage the cpnManager?

The cpnManager component is used to activate or deactivate other components thus now the most part of *.active parameters are deprecated.

  • The parameter cpnManager.notStartedMDICpns manages the internal services.
  • The parameter cpnManager.autoStartedCpns manages external module(s).

List of components managed by the cpnManager

com.mdi.services.adminProtocol
com.mdi.services.binaryGate
com.mdi.services.dataEmitter
com.mdi.services.dataRecorder
com.mdi.services.geoFencing
com.mdi.services.ibutton
com.mdi.services.ledManager
com.mdi.services.messageGate
com.mdi.services.relayControl
com.mdi.services.temperatureSensor

Check the current parameters

  • Type #SWITCH# to open the basics console.
  • Type list cpnManager.
i.e
cpnManager.notStartedMDICpns[0]=com.mdi.services.history
cpnManager.notStartedMDICpns[1]=com.mdi.services.gpsEcho
cpnManager.notStartedMDICpns[2]=com.mdi.services.relayControl
cpnManager.notStartedMDICpns[3]=com.mdi.services.geoFencing
cpnManager.notStartedMDICpns[4]=com.mdi.services.fileProtocol
cpnManager.notStartedMDICpns[5]=com.mdi.tools.statSlaveJava
...
cpnManager.notStartedMDICpns[10]=

Remove a component from the notStartedMDICpns list

  • Type #SWITCH# to open the basics console.
  • Type list cpnManager to display the notStartedMDICpns components list.
  • Type s cpnManager notStartedMDICpns X '' where X is the index number.
i.e.
Basics[C4D]> list cpnManager
cpnManager.notStartedMDICpns[0]=com.mdi.services.history
cpnManager.notStartedMDICpns[1]=com.mdi.services.gpsEcho
cpnManager.notStartedMDICpns[2]=com.mdi.services.relayControl
cpnManager.notStartedMDICpns[3]=com.mdi.services.geoFencing
cpnManager.notStartedMDICpns[4]=com.mdi.services.fileProtocol
...
cpnManager.notStartedMDICpns[10]=
Basics[C4D]> s cpnManager notStartedMDICpns 1 ''
Setting key cpnManager.notStartedMDICpns[1]=''
Value updated successfully
Basics[C4D]> list cpnManager
cpnManager.notStartedMDICpns[0]=com.mdi.services.history
cpnManager.notStartedMDICpns[1]=
cpnManager.notStartedMDICpns[2]=com.mdi.services.relayControl
cpnManager.notStartedMDICpns[3]=com.mdi.services.geoFencing
cpnManager.notStartedMDICpns[4]=com.mdi.services.fileProtocol
...
cpnManager.notStartedMDICpns[10]=
Basics[C4D]>
  • Type reboot to reset the device.

Add a component into the notStartedMDICpns list

  • Type #SWITCH# to open the basics console.
  • Type list cpnManager to display the notStartedMDICpns components list.
  • Type s cpnManager notStartedMDICpns X '' where X is a free index number.

How to BCOM and serialPPP addresses?

The serialPPP component manages the interboard communication (BCOM) and the gateway mode.

→ IPs for interboard communication are set in the deployment and cannot be change.

192.168.50.1 -> C4
192.168.50.2 -> H4

→ IPs for gateway mode are set via the parameter serialPPP.addresses.

192.168.5.1 -> C4
192.168.5.2 -> 3rd party device (pda, etc.)

Note: To prevent routing issues due to the gateway mode which allows to broadcast data on available interfaces, we advised to apply a filter on the routing table. For instance, it’s possible to check if a device is connected before sending data. This may prevent to send data via the modem ppp0 instead of the gateway (ppp2, ppp3).

Use the following API’s to check the interfaces:

  • netDevices.getIP()
  • netDevices.getIp(ppp)

How to manage the pulse (RPM) feature?

Install a compatible CAN/PULSE software
Download the last package and install it according to the update procedure.

Install the ‘pulse’ module

  • Download the module PKG-usersd-manageIgnitionPulse_V1.1.tar.gz.
  • Type #SWITCH# to open the basics console.
  • Type screen 1 to open the advanced console.
  • Type update and transfer the file via Kermit.
  • Type reboot to reset the device. The update will be done at the next reboot.

Configure the ‘pulse’ module

  • Type #SWITCH# to open the basics console.
  • Type s managePulse shutdownLevel 10 (Shutdown level of the component).
  • Type s managePulse period 500 (period of pulling in ms).
  • Type s managePulse reloadDbValueAtStartup 0 (set the counter to the previous value at startup and idle out).
  • Type s managePulse channe l150 (messageGate channel – requires asn1).

Add the PULSE_COUNTER value in the $GPRMC frame

  • Type #SWITCH# to open the basics console.
  • Type s dataRecorder protocolHeader 3.
  • Type s dataRecorder headerSize 45.
  • Type s dataRecorder fieldName X PULSE_COUNTER (name of the DB variable to be record).
  • Type s dataRecorder fieldSize X 20 (field size in bytes).
  • Type s dataRecorder fieldPeriod X 60 (recording interval in second).
  • Type s dataRecorder fieldType X 1 (-1: unknown; 0: boolean; 1: integer; 2 : decimal; 3 : string; 4 : base64 binary).
  • Type reboot to reset the device.

Note: X must be in-between 209-254.

About the software/module
→ If you install them on a standard C4D (w/o CAN chip) the COM3 (white DB9) will be still available.
→ If you install them on a C4D CAN, the COM3 (white DB9) and the inputs 1 & 2 won’t be available for standard use.

Note: Once installed, input 2 won’t be used for other purpose that pulse counter. Thus, you must take it in consideration when you configure your device. For instance, if you use the parameter dataRecorder.fieldPeriod[38] or the DB values MDI_DIO_IN_TOR and MDI_DIO_DIN2.

Results

i.e frames
$GPRMC,155719.00,A,4847.0430,N,00222.0020,E,0.0,0.0,201210,,,A*58,1,35
$GPRMC,155618.00,A,4847.0430,N,00222.0020,E,0.0,0.0,201210,,,A*58,1,18
$GPRMC,155517.00,A,4847.0430,N,00222.0020,E,0.0,0.0,201210,,,A*54,1,0

i.e console
Basics[C4D]> gdb PULSE_COUNTER
159
Basics[C4D]> gdb PULSE_COUNTER
160
Basics[C4D]> gdb PULSE_COUNTER
165
Basics[C4D]> gdb PULSE_COUNTER

How to get the external gps antenna voltage?

From the console

  • Type #SWITCH# to open the light console.
  • Type console to open the full console.
  • Type modemAT.
  • Type at$gpsai to get the antenna amperage.
    → Result must be about 10-12 (mA).
  • Type at$gpsav to get the antenna voltage.
    → Result must be about 3900 (mV).
i.e.
modemAT
Starting Modem AT mode
Stopping software, please wait
Stopping software done
Stopping modem
0
0
Modem is stopped
Done stopping modem
Starting modem
0
0
Modem is started
Done starting modem
Type your AT command in :
at$gpsav
at$gpsav
$GPSAV: 3922
at$gpsai
at$gpsai
$GPSAI: 10
at$gpsav;$gpsai
at$gpsav;$gpsai
$GPSAV: 3927
$GPSAI: 10
OK

With a multimeter
Use a multimeter to control the external gps antenna voltage.

How to create and manage geofencing files?

Build a xml file
This file contains one or more areas (polygons, circles, etc.).

Notes :

  • To make it easier you can use Google Earth which is able to create polygons.

  • Coordinates are in hundred thousandth of degrees.
  • Ray (radius) is in hundred thousandth of degrees.
i.e. Polygon
<?xml version="1.0" ?>
<AreaFile>
    <Polygon id="1" name="district 1">
        <point latitude="3287436" longitude="1318453"/>
        <point latitude="3287229" longitude="1318452"/>
        <point latitude="3287181" longitude="1318691"/>
        <point latitude="3287078" longitude="1318689"/>
        <point latitude="3287036" longitude="1318944"/>
        <point latitude="3287222" longitude="1319008"/>
        <point latitude="3287469" longitude="1318717"/>
        <point latitude="3287436" longitude="1318453"/>
    </Polygon>
    <Polygon id="2" name="district 2">
        <point latitude="3287446" longitude="1318446"/>
        <point latitude="3287442" longitude="1318692"/>
        <point latitude="3287319" longitude="1318860"/>
        <point latitude="3287233" longitude="1319025"/>
        <point latitude="3287210" longitude="1319184"/>
        <point latitude="3287451" longitude="1319183"/>
        <point latitude="3287773" longitude="1319135"/>
        <point latitude="3287827" longitude="1319076"/>
        <point latitude="3287810" longitude="1318800"/>
        <point latitude="3287770" longitude="1318452"/>
        <point latitude="3287446" longitude="1318446"/>
    </Polygon>                       
</AreaFile>
i.e. Circle
<?xml version="1.0" ?>
<AreaFile>
    <Circle id="1" name="district 3">
        <center latitude="2526955" longitude="5531656"/>
        <ray value="1000"/>
    </Circle>
</AreaFile>
i.e. Polyline
<?xml version="1.0" ?>
<AreaFile>
    <Polyline id="6" name="travel 21">
	    <ray value="10"/>
        <point latitude="2524375" longitude="55287439"/>
        <point latitude="2523942" longitude="5529551"/>
        <point latitude="2522938" longitude="5528871"/>
		<point latitude="2522199" longitude="55296053"/>
		<point latitude="2521274" longitude="55293326"/>
    </Polyline>
</AreaFile>
Download MD5
Sample – Paris.kml 25459599e3b78f082e80f2b73ce2ae9b
Sample – Paris.xml 833fbf079dae5e66b034f4cc87116586

Build a geo file

  • Right click on the xml file and select Send to>mdi-encode-map (requires the SDK)
  • Select an ID for your map
  • Select the vertical/horizontal resolution of your map (<=20)

The geo file is copied into the folder \…\mdi-framework-2.X\simulator\data\geofencing.

Note: In some SDK release the application used to compile geofence files is missing. If so, copy the file geofencingMapEncoder.exe into the folder \…\mdi-framework-2.X\bin.

Download MD5
Paris.geo 87a7136ca1bb9f9739c2d9a10f54da86
geofencingMapEncoder.exe 664782feecc2db09f7f0e092bb72ee72

Start the geofencing component

  • Type #SWITCH# to open the basics console.
  • Type list cpnManager.
i.e.
cpnManager.notStartedMDICpns[0]=com.mdi.services.history
cpnManager.notStartedMDICpns[1]=com.mdi.services.ledManager
cpnManager.notStartedMDICpns[2]=com.mdi.services.gpsEcho
cpnManager.notStartedMDICpns[3]=com.mdi.services.relayControl
cpnManager.notStartedMDICpns[4]=com.mdi.services.geoFencing
cpnManager.notStartedMDICpns[5]=com.mdi.services.fileProtocol
cpnManager.notStartedMDICpns[6]=com.mdi.tools.statSlaveJava

In this sample, the goefencing component has the index 4.

  • Type s cpnManager notStartedMDICpns 4 ''.
  • Type reboot to reset the device.

Change the geofencing.directory[x] pathes

  • Type #SWITCH# to open the basics console.
  • Type s geoFencing directory 0 /mnt/user/writeDir/geofencing.
  • Type s geoFencing directory 1 /mnt/user/data/geofencing.
  • Type s geoFencing directory 2 data/geofencing.
  • Type s geoFencing directory 3 /mnt/user/mmc/geofencing.
  • Type list geoFencing to check the new parameters.
i.e.
geoFencing.directory[0],/mnt/user/writeDir/geofencing
geoFencing.directory[1],/mnt/user/data/geofencing
geoFencing.directory[2],data/geofencing
geoFencing.directory[3],/mnt/user/mmc/geofencing
  • Type reboot to reset the device.

Install the manageGeoFencing module (optional)

  • Type #SWITCH# to open the basics console.
  • Type screen 1 to open the advanced console.
  • Type update and transfer the file PKG-usersd-manageGeoFencing_2.4.0.tar.gz via Kermit.
  • Type reboot to reset the device. The update will be done at the next reboot.
  • Type #SWITCH# to open the basics console.
  • Type logdump manageGeoFencing.
Download MD5
PKG-usersd-manageGeoFencing_2.4.0.tar.gz 212bde90babf7cd2db86626e4b1fe0e3
i.e.
Basics[C4D]> logdump manageGeoFencing
2010/09/10 13:47.54   L[j$com/support/test/manageGeoFencing$0] Search for geoFencing file :
2010/09/10 13:47.54   L[j$com/support/test/manageGeoFencing$0] geofencing file detected : ID:1 "paris.geo" active:true
2010/09/10 13:47.54   L[j$com/support/test/manageGeoFencing$0] geofencing file detected : ID:1 "secteursNancyID5.geo" active:true

Install the geo file

  • Type #SWITCH# to open the basics console.
  • Type screen 1 to open the advanced console.
  • Type geomap update and transfer the geofencing (.geo) via Kermit.
  • Type reboot to reset the device.

Add geofencing data in the frame

  • Type #SWITCH# to open the basics console.
  • Type s dataRecorder fieldPeriod 53 0.
  • Type s dataRecorder fieldPeriod 127 0.
  • Type reboot to reset the device.

Note: Detected areas will be added in the frame. Format is (FileId:AreaId;)*.

i.e.
$GPRMC,073400.00,A,4847.0370,N,00221.9870,E,0.0,0.0,220910,,,A*5A,1,664:5;

- 664 is the file id.
- 5 is the zone id.

How to ask a question ?

You can send an e-mail to support@mobile-devices.fr.