BSTPL VB - Integaration Dcoument V2.0

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

BS Technotronics Private Limited

Voice Box Integration Document


Version No VBI-2.0, 29-09-2023
SCOPE:
The Document describes the integration procedure for BSTPL Voice Box with VTU Device.
Commands mentioned below shall be sent on Voice Box UART or sever.
Revision History:

Version Number Date Changes


VBI-1.0 06-03-2020 Initial Version
VBI-1.2 07-04-2020 Configuration added in VB.
VBI-1.3 09-04-2020 Internal change
VBI-1.4 17-04-2020 Internal Change
1) GSM ON/OFF command.
2) VB Sleep Enable Command.
VBI-1.5 04-05-2020
3) VB language Section command.
4) GSM Status and Lang parameters added in RDFL frame.
1) Break RDFL command into RDDP & RDSP command.
VBI-1.6 09-05-2020
2) ’#’ is added in voice Lang command.
1) Change in GPS String
2) GPS ping start command added.
3) Out going call request command format change.
VBI-1.7 25-05-2020 4) Sending of health packet for every 15min is disabled and
query and response mechanism added.
5) Health frame parameter length modified to even number.
6) Volume Command added.
1) Change in GPS String $SHOW_VBPRINT2
2) Call END command Implemented.
3) Incoming call authentication enable/disable command
VBI-1.8 20-06-2020 implemented.
4) ”A2” in health frame.
5) Double header added in GPS string and EVENT commands
to
1.Change in RDDP Frame
VBI-1.9 06-10-2020 2.Connection diagram change
3.VB without calling command added.
VBI-2.0 29-09-2023 1.New SIVA commands are added.

IMPORTANT POINTS TO NOTE:


 Voice Call features & functionality support is strictly for the VB devices with 2-way voice hardware only
 Normal functionality of VB will be on hold during following conditions.
 Till the receipt of a valid response from VTD during initial handshaking process
 During an outgoing call, irrespective of Re-attempt flag “0” or “1”.
 If Re-attempt flag is set to “1” and all the 5 numbers stored in the list are dialed out (Considering call ring time
as 30 seconds for mobile and 60 seconds for landline), approximate duration of effecting VB normal
functionality would be 250 – 400 seconds excluding success call duration.
 If Re-attempt flag is set to “0” and first number stored in the list is dialed out (Considering call ring time as 30
seconds for mobile and 60 seconds for landline), approximate duration of effecting VB normal functionality
would be 50 – 80 seconds excluding success call duration.
 During Incoming & Outgoing calls process, VB will store the events received / generated for playing after call process.
Maximum events can be stored are 10 and events received thereafter are will be ignored.
 VB will send “\r\n” at the end of each instruction.
BS Technotronics Private Limited
Voice Box Integration Document
Version No VBI-2.0, 29-09-2023
PROCEDURE:
INITIAL HAND-SHAKING PROCESS:
 After 30 seconds of power ON (or)Upon establishing successful connection with server, VB will send below health
commands every 300 seconds. VB will continue to wait for receiving commands from server or from UART and execute
the actions accordingly. The connection with server is continuous and will be reestablished incase of any
disconnections in-between.
HEALTH / VOICE PLAY FRAME FORMAT:

Ex: 11 A2 04 00 11 11 11 11 00 00 00 00 00 00 00 00 00 01 00 1F 22

'11' : Start of string.(HEX)


'A2' : Anchor for voice box identification(HEX)
'XX' : 00 In Case of Normal Health Packet(HEX)
01 ACK if received voice command from the device & run the voice file accordingly
02 ACK if received voice command from the server & run the voice file accordingly.
03 ACK if generate geofence entry from the voice box
04 ACK if generate geofence exit from the voice box
05 ACK if Base on the geofence entry run the voice file accordingly.
06 ACK if Base on the geofence exit run the voice file accordingly.
'XX' : This diagnostic field will be as(HEX)
00 if no tampering is detected
01 if speaker is tampered

‘XXXXXXXX’: The serial number of the voice box. (HEX)


00 00 00 00 In case of older version voice boxes.
11 11 11 11 In case of Voice calling VB.
22 22 22 22 In case of Non-Voice Calling VB.
‘00’: Last played event number of LANG1(HEX).
‘00’: Last played event number of LANG2(HEX).
‘00’: Last played event number of LANG3 (HEX).
‘000000’: Geofence ID(HEX)
‘00’: Zone priority (HEX)
01-High.
02-Medium.
03-Low.
04-Over Speed.
05-Reset Overspeed as default.
06-Restricted Geofence Entry.
07-Restricted Geofence Exit.
‘0000’: Reserved characters for future use. (HEX)
‘00’: GSM Status (HEX)
00-No SIM 01-Local 05-Romaing 02-Searching
‘0000’: 0x0001 to 0xFDE8 (0-65000) for Ack Frame Number (HEX).
‘22’: End of string (HEX).
BS Technotronics Private Limited
Voice Box Integration Document
Version No VBI-2.0, 29-09-2023
INCOMING CALL PROCESS:
 On receiving of an incoming call, VB will follow below procedure.

1. If Authentication Enabled:
VB will validate the incoming number with authenticated numbers list. If incoming number is listed in the list, device
will answer the call and an intimation is sent to VTD. Command sequence is as followed.

Command from Voice Box 


$SHOW_INCOME:A,919876543210,Duration in sec\r\n
Incoming Number forwarded will be as received from GSM Network
Where A=0 Call Picked Up.
=1 Call Rejected.
=2 Call Completed.

 If the incoming number received is not from the list, VB will reject the incoming call and an intimation is sent to VTD.
Command sequence is as followed.

Command from Voice Box 


$SHOW_INCOME:1,919876543210,Duration in sec\r\n
Incoming Number forwarded will be as received from GSM Network

2. If Authentication Disabled:
VB will answer the call without any validation and an intimation is sent to VTD. Command sequence is as followed.

Command from Voice Box 


$SHOW_INCOME:A,919876543210,Duration in sec\r\n
Incoming Number forwarded will be as received from GSM Network
Where A=0 Call Picked Up.
=1 Call Rejected.
=2 Call Completed.
 After completion / disconnection of incoming call, details of call duration in seconds along with incoming number is
sent to VTD. Command sequence is as followed.

Command from Voice Box   Response from GPS Device


$SHOW_INCOME:2,919876543210,Duration in sec\r\n {[EVENT]:CALDU_OK!}
Note:
 Validation of response from VTS is not mandatory
 And Call will be disconnected after Threshold value set.

OUTGOING CALL PROCESS:


 When outgoing call request received to VB (either from server or SOS switch request) out going call will be initiate to
pre-defined numbers

Below is the command from server to initiate the outgoing call:


Command from Server 
{[EVENT]:CALL# Re-attempt flag!}

Note: For SOS request Re-attempt flag will set to “1” by default.
BS Technotronics Private Limited
Voice Box Integration Document
Version No VBI-2.0, 29-09-2023
 On receipt of outgoing call request, VB will give below acknowledgement and start attempt to dial out the numbers
from the list.
$SHOW_CALL:+919876543210,A,B,C,D\r\n
Where, A Can be 0 = Call Success; 1 = Call Failed;2=Call End;3=Call Processed.
Where, B Can be 0=No Network,1=Local,2=Roaming, 3=No SIM, 4=Monthly outgoing limit exceeded.
 If Re-attempt flag is set to “0”, VB will attempt to dial only the first number stored in the list
 If Re-attempt flag is set to “1”, VB will attempt to dial the numbers in list in a sequential order i.e. from 1 to 5 till a
successful outgoing call is established.
 If Re-attempt flag is set to “2”, ongoing call will be disconnected
 In both the flags i.e. Re-attempt flag is either “0” or “1”, Number/s in the list will be attempted only once. Thereafter
VB will return to normal functionality.
 On success of outgoing call, VB will send following command to VTD including the number
$SHOW_CALL:+919876543210,A,B,C,D\r\n
 On failure of outgoing call, VB will send following command to VTD including the number
$SHOW_CALL:+919876543210,A,B,C,D\r\n
Where “A” Can be 0 = Call Success; 1 = Call Failed;2=Call End;3=Call Processed.
Where” B” Can be 0=No Network,1=Local,2=Roaming, 3=No SIM,4=Monthly outgoing limit exceeded.
Where” C” is Call Duration in sec.
Where” D” is Total Duration in min.
 After completion / disconnection of outgoing call, details of call duration in seconds along with incoming number is
sent to VTD. Command sequence is as followed.
Command from Voice Box   Response from GPS Device
$SHOW_CALL:+919876543210,A,B,Duration in sec,
[EVENT]:CALDU_OK!}
Total Duration in min\r\n
 Validation of response from VTS is not mandatory
 And Call will be disconnected after Threshold value set.
Note: Total Duration in min Rounded off to per minute call rate.

VB CONFIGURATION COMMAND:
Note: Max timeout for Executed response is 25 sec.
Max timeout for Received response is 2 sec.

1. To configure “MAX OUTGOING CALL Duration”


 ~SET#OUTD#A!
 A=01 to 99 min.
 ACK FROM VB: $OUTD:A\r\n
Where A=0 Received & A=1 Executed.
2. To configure “OUTGOING CALL Numbers” (Max we can SET 5 numbers)

 ~SET#OUTN#N1#N2#N3#N4#N5!
 N1,N2,N3,N4,N5=Mobile Nos without “91” max length is 15 Bytes
 Example: =77729990985
Note: If number is not available then don’t send anything between two respective consecutive #
 ACK FROM VB:
$OUTN:A\r\n
Where A=0 Received & A=1 Executed.

3. To configure “MAX INCOMING CALL Duration”


BS Technotronics Private Limited
Voice Box Integration Document
Version No VBI-2.0, 29-09-2023
 ~SET#INCD#A!
 A=01 to 99 min. (Always 2 BYTES)
 ACK FROM VB:
$INCD:A\r\n
Where A=0 Received & A=1 Executed.

4. To configure “INCOMING CALL Numbers” (Max we can SET 5 numbers)

 ~SET#INCN#N1#N2#N3#N4#N5!
 N1,N2,N3,N4,N5=Mobile Nos without “91” max length is 15 Bytes
 Example: =77729990985
Note: If number is not available then don’t send anything between two respective consecutive #
 ACK FROM VB:
$INCN:A\r\n
Where A=0 Received & A=1 Executed.
5. To Enable/Disable Authentication for incoming call

 ~SET#INCA#A!
 Where A=0 Disable & A=1 Enable.
 ACK FROM VB:$INCN:A\r\n
Where A=0 Received & A=1 Executed.
6. To Load Default Configuration Settings

 ~SET#LDDF!
 ACK FROM VB:
$LDDF:A\r\n
Where A=0 Received & A=1 Executed.
Default parameters are as shown below:

Default Configuration Details for VOICE BOX (with voice calling)


Incoming Call Numbers Authentication Disable
Incoming Call Numbers 1234567891 NULL NULL NULL NULL
Maximum incoming Call Duration (Minutes) 10
Outgoing Call Numbers 1234567891 NULL NULL NULL NULL
Maximum Outgoing Call Duration (Minutes) 1
Reset Date (outgoing call units) 22
Speaker Volume (future use) 100

7. To Restart “VB”
 ~SET#CRST!
 ACK FROM VB:
$CRST:A\r\n
Where A=0 Received & A=1 Executed.
8. To configure Voice language
~SET#LAG1#A#B#C!
Where A=1st Lang, B=2nd Lang, C= 3rd Lang.
 ACK FROM VB:
$LAG1:A\r\n
Where A=0 Received & A=1 Executed.
BS Technotronics Private Limited
Voice Box Integration Document
Version No VBI-2.0, 29-09-2023

Please note below sequence of language for configuration:


Seq. No. Language
1 Hindi
2 English
3 Bhojpuri
4 Kannada
5 Malayalam
6 Punjabi
7 Telugu
8 Tamil
9 Awadhi
A Bengali
B Marathi
C Guajarati
D Oriya

9.To Set Server IP and PORT

~SET#IP#183.82.100.200#2003#!
 ACK FROM VB:
$IP:A\r\n
Where A=0 Received & A=1 Executed.

10.To Set APN.

~SET#APN#JIONET!

 ACK FROM VB:


$APN: A\r\n
Where A=0 Received & A=1 Executed.

11.To Get Static Parameters.


~GET#RDSP!
 ACK FROM VB:
Seq. No. Parameter Description Remarks
1 $RDSP: Header. Always $RDSP: Always 6 byte
2 0(or)1 Status 0=Auto & 1=Request Always 1 byte
3 123456789123456 IMEI Number Always 15 bytes
4 123456789123456789F CCID MAX 20 bytes
5 TMSI42_1.0 Hardware VER Max 9 bytes
6 42V_1.0 Firmware version Max 9 bytes
7 GD_V1.0 Geofence VER for file1 Max 9 bytes
8 GD_V1.0 Geofence VER for file2 Max 9 bytes
9 GD_V1.0 Geofence VER for file3 Max 9 bytes
10 GD_V1.0 Geofence VER for file4 Max 9 bytes
11 GD_V1.0 Geofence VER for file5 Max 9 bytes
BS Technotronics Private Limited
Voice Box Integration Document
Version No VBI-2.0, 29-09-2023
12 1-99% Memory Max 2 bytes
13 11111111
22222222 (Non-Voice The serial number of the voice box. Always 8 bytes
Calling VB).
14 0000000000(0-Empty ,1- Reserved voice file Status Always 10 bytes
Voice loaded)
15 0 Reserved Always 1 byte
16 0 Reserved Always 1 byte
17 \r\n END OF STRING Always 2 Bytes

 $RDSP:Flag,IMEI,CCID,Hardware VER,Firmware VER,Geofence data VER1, Geofence data VER2, Geofence data VER3,
Geofence data VER4, Geofence data VER5, Memory, Serial number, Reserved voice file Status,0,0\r\n

12.To Get Dynamic Parameters.


 ~GET#RDDP!
 ACK FROM VB:

$RDDP:Flag,SIM Status, GSM Status,GSM ON Status,IN no1,IN no2,IN no3,IN no4,IN no5,IN Max Duartion ,Out no1,Out no2,Out
no3,Out no4,Out no5,Out max Duration, Date for resetting, Total Outgoing Units in Minutes, Total Outgoing Units in sec, Tampering
Staus,Lang1,Lang2,Lang3,Speaker volume, Incoming numbers Authentication Enable/Disable, Monthly allowed Max out going Call
Min,Reserved bit, Speaker access status bit\r\n
Without Voice
With Voice Calling Description
Calling
1 $RDDP: Header. Always $RDDP: $RDDP: Always 6 byte
Status 0=Auto Status 0=Auto Always 1 byte
2 0(or)1
1=Request 1=Request
3 1-SIM Inserted, 0-No SIM SIM Status 0 Always 1 byte
0=No Network,
4 GSM Status 0 Always 1 byte
1=Local,2=Roaming
5 0=OFF,1=ON GSM ON Status 0 Always 1 byte
6 7729990985 IN No1 0 Max 15 bytes
7 7729990985 IN No2 0 Max 15 bytes
8 7729990985 IN No3 0 Max 15 bytes
9 7729990985 IN No4 0 Max 15 bytes
10 7729990985 IN No5 0 Max 15 bytes
11 1 to 99 IN Max Duration (Config) 0 Max 2 bytes
12 7729990985 OUT No1 0 Max 15 bytes
13 7729990985 OUT No2 0 Max 15 bytes
14 7729990985 OUT No3 0 Max 15 bytes
15 7729990985 OUT No4 0 Max 15 bytes
16 7729990985 OUT No5 0 Max 15 bytes
17 1 to 99 (Min) OUT Max Duration (Config) 0 Max 2 bytes
18 1 to 31 Date for Resting OUT Units 0 Max 2 bytes
Total Outgoing Units in Min.
19 1-999 0 Max 3 Bytes
(Calculated)
1-99999 Total Outgoing Units in sec.
20 0 Max 5 Bytes
(For future use) (Calculated)
21 0=OK,1=Tampered Tampering Status 0=OK,1=Tampered Always 1 byte.
22 1-D Voice Language1 1-D Always 1 byte.
23 1-D Voice Language2 1-D Always 1 byte.
BS Technotronics Private Limited
Voice Box Integration Document
Version No VBI-2.0, 29-09-2023
24 1-D Voice Language3 1-D Always 1 byte.
25 0-99 Speaker Volume 0-99 Max 3 bytes
1=Enable
26 Incoming call Authentication 0 Always 1 byte.
0=disable
Monthly allowed Max out
27 0 0 Max 3 bytes
going Call Min.
28 0 Reserved 0 Always 1 byte.
29 0 Reserved 0 Always 1 byte.
30 \r\n END OF STRING Always 2 Bytes

13. Server or VTU initiated voice announcements: Following commands can be sent to Voice Box from server or Voice
Box UART for playing corresponding audio file

Sr. No EVENT Base- Server event


1 Ignition-On ~SIVA01^
2 Ignition-Off ~SIVA02^
3 Over Speed ~SIVA03^
4 Accident Prone zone Entry ~SIVA04^
5 Continuous Driving ~SIVA05^
6 Sudden braking ~SIVA06^
7 Sudden acceleration ~SIVA07^
8 Route Deviation ~SIVA08^
9 Sudden Turn ~SIVA09^
10 Night Driving ~SIVA10^
11 High hooter sound ~SIVA11^
12 SOS ~SIVA12^
13 Low alert ~SIVA13^
14 Medium Alert ~SIVA14^
15 High Alert entry ~SIVA15^
16 High Alert exit ~SIVA16^
17 Long stoppage ~SIVA51^
18 Detention ~SIVA52^
19 Reserved ~SIVA53^
20 Reserved ~SIVA54^
Note: From 53 and 54 are reserved voice files which can be updated throw VTU.

13.LED Indications:
Voice Box is provided with 5 LEDs for indicating various statuses / functionality.

LED FUNCTIONALITY
1. Continuously ON: Indicates device power status i.e. ON / OFF
RED
2. 1 Sec ON & 1 Sec OFF: During device firmware is upgrading

1. Normal Condition: LED is OFF


ORANGE
2. 1 Sec ON & 1 Sec OFF: During voice file updating
BS Technotronics Private Limited
Voice Box Integration Document
Version No VBI-2.0, 29-09-2023
YELLOW 1. Normal Condition: LED is OFF

1. Normal Condition: LED is OFF


BLUE
2. Continuously ON: During a call (Incoming & Outgoing)

1. Normal Condition: LED is OFF


GREEN 2. Continuously ON: When device play’s voice file for an event-based alert and
when receive geofence alert from VTS.

14.Voice Number Sequence:

You might also like