VSH101 1-Lead ECG Holter Communication Packet Command

VSH101 BLE Communication Flow

Initial communication flow after connection VSH101:

When VSC MODE has not been performed, instructions must be communicated every 10 seconds to stay connected.

The VSC MODE START and VSC MODE STOP command are simple. Like the other BLE commands introduced before. The VSC MODE READ command will be a little more complicated. When user issues the VSC_MODE_READ commad, device will send back 968 bytes data. The next section will give you a more detail description about the VSC Mode Data Format. Each VSC MODE READ command carries 200 ms ECG data and related information. It means user has to issues at lease 5 times VSC MODE READ command every second or the data will be overflow.

VSH101 BLE Profile :

  • Service profile: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
  • Write Characteristic profile: 6e400002-b5a3-f393-e0a9-e50e24dcca9e
  • Notify Characteristic profile: 6e400003-b5a3-f393-e0a9-e50e24dcca9e

Write Characteristic Profile Packet Command Data Format :

                           PCode                : The Write/Noitfy Characteristic command is same value, set same the ‘Cmd’ byte.

                           Group                 : The Group Command byte.

                           Cmd.                   : The Group sub Command byte.

                           ChkSum              : The (Check Sum) is the sum of the entire packet.

                           MISO                   : Setting the notify receive length. (Little Endian)

                           MOSI                   : Setting the write command data length.(Little Endian)

                           Parameter Data : The parameter setting.(Little Endian)

                          Cmd Data            : The data for command. (Little Endian)

Notify Characteristic Profile Packet Command Data Format :

                             PCode.       : The write/notify command is same, usually same the “Cmd” byte.

                             Group         : The group same the write command.

                             Ack             : Confirm that the ‘Ack’ byte is ‘A’, then the command is correct this time and reply, otherwise will receive ‘N’.

                             ChkSum     : (check sum) is the sum of bytes % 256 of the entire packet.

                             Index          : The receive data memory index.(Little Endian)

                             Length        : The packet data length.(Little Endian)

                             Cmd Data  : The data for command.(Little Endian)

Check Sum Data Get Example Code:

VSH101 Packet Command Table

NamePCodeGroupCmdDescription
Version0x000xC00x00 Device FW Version
Time Set0x400xC00x40Set Device Time
Time Get0x410xC00x41Get Device Time
VSC Mode Start0x640xC20x64VSC MODE Measurement Start, VSC MODE Flow Chart
VSC Mode Stop0x650xC20x65VSC MODE Measurement Stop, VSC MODE Flow Chart
VSC Mode Read0x6A0xC20x6AVSC MODE Read Data, VSC MODE Flow Chart
VSC Mode Type Set0x700xC20x70VSC MODE TYPE Setting
Soft Regsitry Read0x000xA50x00Soft Registry Command Read
Soft Regsitry Write0x010xA50x01Soft Registry Command Write

1. Version Packet Command

Name

Hex Data

PCode   

0x00

Group Id

0xC0

Cmd    

0x00

Check sum

0xE0

MOSI   

0x0000

MISO   

0x0020

Parameter Data

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Cmd Data

 

2. Time Get Packet Command

Name

Hex Data

PCode   

0x41

Group Id

0xC0

Cmd    

0x41

Check sum

0x52

MOSI   

0x0000

MISO   

0x0010

Parameter Data

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Cmd Data

 

3. Time Set Packet Command

Name

Hex Data

PCode   

40

Group Id

C0

Cmd    

40

Check sum

44

MOSI   

0x0010

MISO   

0x0000

Parameter Data

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Cmd Data

 E7 07 05 11 13 13 17 08 3B D8 64 64 80 70 00 00

4. VSC Mode Type Set Packet Command

Name

Hex Data

PCode   

0x70

Group Id

0xC2

Cmd    

0x70

Check sum

0xAB

MOSI   

0x0004

MISO   

0x0000

Parameter Data

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Cmd Data

01 00 00 00

5. VSC Mode Start Packet Command

Name

Hex Data

PCode   

0x64

Group Id

0xC2

Cmd    

0x64

Check sum

0x8A

MOSI   

0x0000

MISO   

0x0000

Parameter Data

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Cmd Data

 

6. VSC Mode Stop Packet Command

Name

Hex Data

PCode   

0x65

Group Id

0xC2

Cmd    

0x65

Check sum

0x8C

MOSI   

0x0000

MISO   

0x0000

Parameter Data

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Cmd Data

 

7. VSC Mode Read Packet Command

Name

Hex Data

PCode   

0x6A

Group Id

0xC2

Cmd    

0x6A

Check sum

0xE3

MOSI   

0x0000

MISO   

0x0238

Parameter Data

00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00

Cmd Data

 

Cmd Data format “index” set loops back from 0 to 999 after VSC Mode starts executing.

When Packet “index” loops back from 0 to 999 after VSC Mode starts executing, if 8000 is received, the data is not ready or 8000 is received for more than 1 second in a row, the VSC MODE Queue is overflowed

VSC MODE TYPE 0 Data Format

As mentioned, There are 968 bytes of returning data of VSC MODE READ. It includes two parts:

ECG DATA  (800 bytes) – 2 channel ECG datas

INFO DATA (168 bytes) – 42 information

The detail description is listed below:

The  INFO Data included 26 information for user to do the monitoring. It is listed below:

It includes Time (1), temperature(2), ECG data(2, 3), G-Sensor (5, 6, 7), Battery Status (8, 9),  HRV (10, 11, 12, 13, 14, 15, 16), Barometer values(17, 18), and  5 G-Sensor points during the period (GS_X0..5, GS_Y0..5, GS_Z0..5).

Since the G-Sensor inside will keep monitor patient’s activity in a sampling rate of 25 Hz. A VSC Mode Data includes 200 ms information and it means the VSC Mode Data will have 5 points of G-Sensor data and they are GS_X0..5, GS_Y0..5, GS_Z0..5.

VSC MODE TYPE 1 Data Format

As mentioned, There are 568 bytees of returning data of VSC MODE READ. It includes two parts:

ECG DATA  (400 bytes) – 1 channel ECG datas

INFO DATA (168 bytes) – 42 information

The detail description is listed below:

The  INFO Data included 26 information for user to do the monitoring. It is listed below:

It includes Time (1), temperature(2), ECG data(2, 3), G-Sensor (5, 6, 7), Battery Status (8, 9),  HRV (10, 11, 12, 13, 14, 15, 16), Barometer values(17, 18), and  5 G-Sensor points during the period (GS_X0..5, GS_Y0..5, GS_Z0..5).

Since the G-Sensor inside will keep monitor patient’s activity in a sampling rate of 25 Hz. A VSC Mode Data includes 200 ms information and it means the VSC Mode Data will have 5 points of G-Sensor data and they are GS_X0..5, GS_Y0..5, GS_Z0..5.

Soft Registry Send Packet Format

Soft Registry Table

SREG NAMESREG TYPENote
SREG_DEVICE_NAMESTRINGBLE Device Name
SREG_DEVICE_RESET SREG Write  then reset device
SREG_DEVICE_SSNSTRINGDevice SSN
SREG_MEAS_LEAD_OFFINT0: Disable, 1: Enable
SREG_DEVICE_IDINTDevice ID
SREG_DEVICE_BEACONINT0: Disable, 1: Enable
SREG_VSC_MODE_TYPEINT0: Type 0, 1: Type 1

8. Soft Registry Write Packet Command

9. Soft Registry Read Packet Command