Skip to Content

DRV Command

The DRV module keeps a single driver per device. That driver goes in the iButton field of Wialon reports (which Wialon and Traccar use to assign the driver), in the 'DRV' token of report templates, in the trip of the TRIP module and in the DRV signals of the event engine.

Previously, the last key read, the IC session and the trip code were three separate things. With DRV you configure once where the driver comes from, and the rest of the device uses it.

What is it for?

  • 🪪 Assign the driver on the platform without rules: Wialon and Traccar take it from the iButton field.
  • 📋 Accept only authorized drivers using the ICL code list.
  • ⏱️ Close the session automatically some time after the engine is turned off.
  • 🚚 Link each trip to its driver in the TRIP module.
  • 🚨 Require a driver on ignition: warning with a buzzer or light, and cut if nobody identifies, without writing rules.
  • ⚙️ Trigger rules on login, logout or an unauthorized code.

Configuration: SCXDRV

>SCXDRV<origen>,<lista>,<retención>,<ventana>,<aviso>,<corte>,<vel corte>,<rpt login>,<rpt logout>,<rpt inválido>,<rpt sin chofer>,<dst>,<xp ok>< >QCXDRV< -> >RCXDRV<the 13 fields><
FieldValuesDefaultWhat it does
origen0 off · 1 iButton · 2 IC session · 3 manual only · 4 tachograph1Where the driver comes from
lista0 · 101 = only codes in the ICL list
retención0-65535 s0Logout after this time with the ignition off; 0 = never
ventana0-3600 s0Time to identify after ignition on; 0 = no driver required
aviso0-2 · --Output activated while the window runs
corte0-2 · G · H0-H2 · --What is activated if the window expires: an output, the gradual cut or nothing. With H, the output enables the vehicle only with a driver (see below)
vel corte0-255 km/h3The output cut is only applied below this speed
rpt loginreport · --Report to send on each login (see Automatic reports)
rpt logoutreport · --Report to send on each logout
rpt inválidoreport · --Report to send on an unauthorized code
rpt sin choferreport · --Report to send when the window expires with no driver
dstGP WI BT TR BGP BWI LOG BACK ALLGPDestination of those reports (the same names as SCXDTC)
xp ok0-2 · --Output activated for 2 s on each login: a beep or an LED to confirm to the driver
  • Fields are positional and an empty field keeps its value: >SCXDRV,,120< only changes the retention.
  • Everything is validated before saving. With an invalid value nothing is saved and the response names the field: RCXDRV,ERR,ORIGEN, LISTA, RETENCION, VENTANA, AVISO, CORTE, VELCORTE, RPTLOGIN, RPTLOGOUT, RPTINVALIDO, RPTSINCHOFER, DST, XPOK.
  • Changing the origin logs out the current driver.

Origins

OriginThe driver is…How they identify
0 offalways none— (the Wialon field is NA)
1 iButtonthe last key readiButton key (Spider/Smart) or SDRV
2 IC sessionthe driver session (IC)iButton key, RF433 remote, SIC/SDRV, or a serial reader with CXXB + SDA
3 manual onlywhatever was loaded with SDRVOnly SDRV (keys are ignored)
4 tachographthe driver 1 card in the tachographThe card in the tachograph (CAN J1939) or SDRV

Origin 4: tachograph

Only on devices with CAN (on the others SCXDRV4 answers RCXDRV,ERR,ORIGEN). The device reads from the J1939 bus:

  • DI (PGN 65131): the card numbers of driver 1 and driver 2. The device driver is driver 1; driver 2 goes in the 'DRV2' token.
  • TCO1 (PGN 65132): whether each card is inserted and the working state of each driver ('TCO' token).
Tachograph eventDevice driver
Driver 1 card is insertedLogin with the card number (source T)
Driver 1 card is removedLogout
Driver 1 card changesThe new one replaces the previous one
  • The code is the card number in uppercase, without spaces, up to 16 characters (16 in the EU).
  • A CDRV with the card inserted removes the driver until the next change in the tachograph (another card, or removing it and inserting it again).
  • A driver loaded with SDRV is not removed by the tachograph.
  • lista=1 also applies: a card outside the code list does not log in and fires DRV03.

Not all trucks put DI on the bus: in many of them the tachograph only sends it through the FMS interface. Before configuring origin 4, check with a bus scan that PGN 65131 arrives.

The last login wins: if there is a driver and another one identifies, the new one replaces the previous one.

With origin 2 and lista=0, any valid code opens the IC session even if it is not in the code list. With lista=1 it behaves as always: only codes in the list open it.

Code list (lista=1)

  • A code that is not in the list does not change the driver and fires the DRV03 signal.
  • A code loaded with $ in the list is recognized, but it is not a driver: it does not change the driver and does not fire DRV03 either (it still fires its ICLnn).

Driver codes are 1 to 16 alphanumeric characters: letters and digits, without spaces, hyphens or underscores. To add to the list use SICL+ CODIGO, with a space after the +.

Requiring a driver: window, warning and cut

  1. Ignition ON with no driver and ventana greater than 0: the window starts and the aviso output is activated. State 3.
  2. The driver identifies within the window: the warning turns off.
  3. The window expires (DRV04 signal) or an unauthorized code is presented (DRV03): the warning turns off and the cut is applied.
    • Output: activated only with GPS fix and below vel corte. If the vehicle is going faster, it stays pending until it slows down (state 4).
    • G: the gradual cut is activated, with the ramp configured with SGC. It does not wait for the speed to drop: the ramp is already gradual (state 5).
  4. Ignition OFF: the warning and the window turn off. The cut is not released when the ignition is turned off.

A valid login releases the cut, and only the cut set by DRV. Since v1.09.28 the cut is also released immediately if the configuration no longer backs it: ventana set to 0, corte changed (to -, to another output or to another mode) or the module turned off (origen = 0, >SCXDRV0<). Turning the module off while the window is running also turns the warning off. Rewriting the same configuration (for example, when saving from the configurator) or a reboot does not release it. If the cut was activated by something else (a jamming rule, SGCA from the platform), the login does not touch it. From the platform it can still be released with SGCS or by turning the output off.

To use G, the gradual cut must be enabled with SGCE. If it is not, nothing is cut when the window expires.

The warning pattern (steady, blinking) is whatever that output has configured with SCXXP. The window and cut state is saved: if the device restarts in the middle of a cut, it stays cut until a login (or until the configuration is changed, see above).

// Key from the list; 2 min to identify; buzzer on XP2; cut on XP1 with the vehicle stopped >SCXDRV1,1,0,120,2,1,3< // IC session from the list; logout 60 s after ignition off; gradual cut >SCXDRV2,1,60,120,2,G<

Enable the vehicle only with a driver (H)

With corte = H plus the output number, that output enables the vehicle: it is active only while there is an identified driver. It is wired to a relay that enables the starter, the pump or the ignition: with no driver the vehicle does not start, also with the ignition off.

SituationEnable output
A driver identifiesActivated immediately
Logout with the ignition offTurned off immediately
Logout with the ignition on and the vehicle stopped (GPS with fix, below vel corte)Turned off
Logout while moving or without GPS fixStays active (state 4, pending) until the vehicle stops or the ignition is turned off
Device restartRestored according to the saved driver
  • It never disables a moving vehicle. A CDRV from the platform while the vehicle is moving is only applied when it stops or the ignition is turned off.
  • The platform can force the output (for example, enable a vehicle with no driver with SSSXP): DRV does not touch it again until the next login or logout.
  • The window and the warning can still be used (for example, to sound the buzzer while nobody identifies); when the window expires nothing else is cut: the vehicle is already disabled.
  • The warning and xp ok cannot be on the enable output: the response is RCXDRV,ERR,AVISO or RCXDRV,ERR,XPOK. Since T60 the warning cannot be on the output used for the output cut either.

For the vehicle to stay disabled also if the device loses power, use a relay that enables when the output is active (normally open in the starter or pump circuit).

// Key from the list; the vehicle only starts with a driver (XP0 enables) >SCXDRV1,1,0,0,-,H0,3< // IC session from the list; logout 5 min after ignition off; buzzer on XP2 while nobody identifies >SCXDRV2,1,300,30,2,H0,3<

Automatic reports

On each event the configured report is sent to dst, the same as if a rule did G<report>;@<dst>, but without writing rules. The report is written like the G action without the G: type, number in hexadecimal and priority (U101H is the user report with template SUC01, number 01, high priority).

FieldEventSignal
rpt loginLogin (also the driver who comes in when replacing another one)DRV01
rpt logoutLogout: CDRV, retention expired, driver changeDRV02
rpt inválidoUnauthorized codeDRV03
rpt sin choferThe window expired with no driverDRV04
  • The report date and time are those of the event, even if it goes out up to one second later.
  • In the report template, 'DRV' is the driver of the event: the one who came in on login, the one who left on logout, and the rejected code on an unauthorized code. On the expired window report it is empty (or NA with 'DRV::NA').
  • On a driver change both are sent: first the logout of the previous driver and then the login of the new one.
// Template 1: the driver of the event >SUC01 $CHOFER='DRV::NA'< // The 4 events with template 1, numbers 01 to 04, to the log >SCXDRV,,,,,,,U101H,U102H,U103H,U104H,LOG<

xp ok cannot be the corte output: the login releases the cut and the beep would activate it again. With gradual cut (G), if xp ok is the gradual cut output, the beep is not done.


Bluetooth driver: SCXDRVB

The driver identifies with an iBeacon or Eddystone-UID beacon that they carry or leave in the vehicle. It relies on a BSW slot: the filter (UUID, major/minor, distance) and the absence time are configured there.

>SCXDRVB<slot>,<modo>,<id>,<toggle>< >QCXDRVB< -> >RCXDRVB<slot|->,<modo>,<id>,<toggle><
FieldValuesDefaultWhat it does
slot0-3 · --BSW slot that feeds the driver; - turns it off
modoP · BPP presence, B button
idM · IMDriver code: M the MAC (12 hex), I the iBeacon major+minor (8 hex) or the Eddystone-UID instance (12 hex)
toggle0 · 10Mode B: pressing again logs out
Presence (P)Button (B)
LoginBSW catches the beacon and sees it again 2 s laterEvery time BSW catches the beacon again
LogoutBSW releases it (its timeout is the absence time)Another login, the retention, CDRV or pressing again with toggle=1
Does it replace another driver?No: it only logs in if there is no driver, and only removes the driver it setYes
  • Button mode: iBeacon and Eddystone have no button field. It works with beacons that only advertise when pressed; BSW must have a short timeout (5-10 s) to release the beacon between presses.
  • If the login fails (code outside the list) or another source removes the driver later (CDRV, the retention), the beacon has to leave and come back for a new attempt.
  • Works with origin 1 and 2. With origin 3 (manual only) it is ignored.
  • Only on devices with Bluetooth Low Energy. On the others it answers RCXDRVB,ERR,NOBLE.
  • Errors: RCXDRVB,ERR,SLOT, MODO, ID, TOGGLE, CAMPOS.

BSW catches the first beacon it sees, not the closest one. Filter by UUID and distance, and if possible use lista=1. With id=M, a beacon that rotates its MAC changes code: prefer I.

// Slot 1: iBeacon with that UUID, closer than 2 m, absence 30 s >SBSW01E,FF,E2C56DB5DFFB48D2B060D0F5A71096E0,,,30,2< // Presence; the code is major+minor >SCXDRVB1,P,I<

Actions: QDRV / SDRV / CDRV

// Query the driver >QDRV< >RDRV <código|NA>,<fuente>,<desde>,<estado>< // Manual login (answers like QDRV) >SDRV <código>< // Logout (answers like QDRV, with NA) >CDRV<
SourceMeaning
NiButton key
RRF433 remote
SManual (SDRV or SIC)
BBluetooth
TTachograph
-No driver
StateMeaning
0No driver
1Driver logged in
2Driver logged in, ignition off, counting the retention
3Waiting for identification (window running, warning active)
4Output cut active, or pending until the speed drops. With H: no driver, vehicle disabled or about to be disabled
5Gradual cut in progress or complete

State diagram

What the diagram does not show:

  • From 3 it goes to 4 if corte is an output and to 5 if it is G; with no cut configured, it returns to 0 when the window expires. State 2 is only reached with retención greater than 0.
  • In 4 the output is only activated with GPS fix and below vel corte; meanwhile the cut stays pending, in the same state.
  • The cut is not released when the ignition is turned off: only a valid login leaves 4 and 5. If something else releases the cut (SGCS, the output by hand), DRV no longer considers it its own and returns to 0.
  • A login with another driver from 1 or 2 is a logout of the previous driver plus a login of the new one: the state stays at 1.
  • With ventana at 0, states 3, 4 and 5 do not exist. With retención at 0, the driver stays when the ignition is turned off (state 1).

SDRV errors:

ResponseCause
RDRV,ERR,CODIGOThe code does not have 1 to 16 alphanumeric characters
RDRV,ERR,LISTAlista=1 and the code is not in the list, or it is a $ code
RDRV,ERR,ORIGENThe origin is 0 (module off)

With origin 2, SDRV <código> is equivalent to SIC <código>,S and CDRV is equivalent to SIC*.

The driver is saved in non-volatile memory only on login and logout: it survives a restart in the middle of a trip without wearing out the flash. If the device restarts with the ignition off, the retention starts counting again from boot.


Signals for rules

SignalTypeMeaning
DRV00levelThere is a driver
DRV01pulseLogin
DRV02pulseLogout (also when a driver is replaced by another one)
DRV03pulseUnauthorized code (with lista=1)
DRV04pulseThe window expired with no driver

In EVAL: DRV(n), for example 'DRV(0)' is 1 with a driver.

The signals exist on all models, even if the device has no iButton reader.

// Report on each login >SRL10E;TRG=DRV01+;ACC={GCP01H}< // Activates output XP01 on an unauthorized key >SRL11E;TRG=DRV03+;ACC={SSSXP0111}<

'DRV' token

In report templates (UC), SDA and QDA:

TokenWith driverWith no driver
'DRV'the codeempty
'DRV::NA'the codeNA
'DRV2'origin 4: the driver 2 cardempty
'TCO'origin 4: working states <driver 1>,<driver 2> from the tachographempty (no TCO1 in the last 10 s)

'TCO' states: 0 rest · 1 available · 2 work · 3 driving · 6 error · 7 not available.

>SUC05 $CHOFER='DRV::NA'<

Wialon and Traccar

In Wialon IPS mode, the iButton field of the #D# packet carries the driver code, or NA with no driver.

  • Wialon: create a driver assignment sensor on the iButton parameter in the unit, and load the same code, with the same case, in each driver. If the drivers are loaded with the number engraved on the key (CRC first), configure the device with SCXOW,,1 so the code comes out in that order.
  • Traccar: the field arrives as driverUniqueId; each change generates the driverChanged event.

With the default configuration (SCXDRV1,0,0), the only thing that changes after updating is that the Wialon iButton field goes from NA to the last key read. Wialon only uses it if the unit has the driver assignment sensor configured.


TRIP module

  • STPSTART without a code takes the current driver.
  • If the trip started with no driver, it takes the first login during the trip.
  • A driver change in the middle of the trip does not change the trip driver. To split trips by driver:
>SRL12E;TRG=DRV01+;ACC={STPSTOP}{STPSTART}<
  • A code loaded by hand (STPSTART,<código>, STPDRV,<código>) takes priority.

Examples

// iButton, any key, no retention (default) >SCXDRV1,0,0< // IC session, only the list, logout 60 s after ignition off >SCXDRV2,1,60< // Manual loading only (platform or SMS) >SCXDRV3,0,0< // Manual login >SDRV JPEREZ01< // Query: driver JPEREZ01, loaded by hand, driver logged in (state 1) >QDRV< >RDRV JPEREZ01,S,111026143022,1< // Logout >CDRV< >RDRV NA,-,000000000000,0<

Available from version 1.09.28 T53; the window, warning and cut from T54; automatic reports and driver confirmation from T56; the Bluetooth driver from T57; the tachograph from T58; the enable output (H) from T60.


Compatibility

💾Firmware:v1.09.28.T53
💾Firmware v1.09.28.T53
SP-IOT
SM-IOT
ZE-IOT
Window, warning and cut since v1.09.28.T54; automatic reports and confirmation since v1.09.28.T56; driver over Bluetooth (SCXDRVB) since v1.09.28.T57; tachograph since v1.09.28.T58; enable output H since v1.09.28.T60
Last updated