VSH101 1-Lead ECG Holter VSC FILE MODE

VSH101 BLE Communication Flow

After establishing a connection with VSH101, the initial communication flow is as follows:

If the ”VSC MODE“ or “VSC_FILE_MODE” instructions have not been executed, it is necessary to transmit instructions every 10 seconds to maintain the connection.

VSH101 VSC FILE MODE Flow Chart

This functionality requires a firmware update to version 223.

The VSC FILE MODE START and VSC FILE MODE STOP commands are straightforward, similar to the other BLE commands discussed earlier. However, the VSC FILE MODE READ command is slightly more intricate. When a user initiates the VSC FILE MODE READ command, the device will respond with 968/576 bytes of data. The subsequent section will provide a more detailed explanation of the VSC Mode Data Format.

For real-time information, each VSC FILE MODE READ command contains 100 ms of ECG data along with pertinent information. 

Upon establishing the connection, the first step is to read the VSC File Status Information to confirm whether the VSC FILE MODE is currently active. If it is active, you have the option to choose between starting from the last read data or directly accessing the latest data for retrieval.

Each individual data is generated every 200 milliseconds. Therefore, after every 5 packets following the VSC FILE MODE START command, the UTC value should be incremented by 1.


When the APP uses VSC MODE FILE READ for real-time ECG data and related information, the communication transmission interval should be less than 200 milliseconds.

HourMinSecDelta TimeDelta SendEvent
152437.724  [Cmd]VscFileRead Send
152437.8670.143 Receive BLE_VSC_FILE_READ ID = 1
152437.8770.010.153[Cmd]VscFileRead Send
152438.0230.146 Receive BLE_VSC_FILE_READ ID = 2
152438.050.0270.173[Cmd]VscFileRead Send
152438.2280.178 Receive BLE_VSC_FILE_READ ID = 3
152438.2460.0180.196[Cmd]VscFileRead Send
152438.410.164 Receive BLE_VSC_FILE_READ ID = 4
152438.4180.0080.172[Cmd]VscFileRead Send
152438.6000.182 Receive BLE_VSC_FILE_READ ID = 5

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 Type Set0x700xC20x70VSC MODE TYPE Setting
VSC File Mode Start0x710xC20x71VSC File mode start command
VSC File Mode Stop0x720xC20x72VSC File mode stop command
VSC File Mode Read0x730xC20x73VSC File mode Read Command ( read back same VSC Mode Read)
VSC File Status Info0x740xC20x74Read VSC File status Information
File List Read0x710xAC0x71read the Data Flash File List Data
File List Clear0x700xAC0x70Clear Data Flash List
Soft Register Read0x000xA50x00Soft Register Command Read
Soft Register Write0x010xA50x01Soft Register 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 File Mode Start Packet Command

Name

Hex Data

PCode   

0x71

Group Id

0xC2

Cmd    

0x71

Check sum

0xA8

MOSI   

0x0000

MISO   

0x0004

Parameter Data

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

Cmd Data

 

6. VSC File Mode Stop Packet Command

Name

Hex Data

PCode   

0x72

Group Id

0xC2

Cmd    

0x72

Check sum

0xA6

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 File Mode Read Packet Command (example : VSC Type 1)

Name

Hex Data

PCode   

0x73

Group Id

0xC2

Cmd    

0x73

Check sum

0xDA

MOSI   

0x0008

MISO   

0x0238

Parameter Data

67 52 D3 64 00 00 00 00 00 00 00 00 00 00 00 00

Cmd Data

 

Each individual data is generated every 200 milliseconds. The reading interval for the data can be configured to be between 100 to 200 milliseconds.

Once the packet index reaches 8000, a 100-millisecond delay is introduced before attempting another read. If the subsequent read is successful, the process would resemble the below:

Each individual data is generated every 200 milliseconds.and the data from to the next second is as follows:

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.

8. VSC File Status information Packet Command

Name

Hex Data

PCode   

0x74

Group Id

0xC2

Cmd    

0x74

Check sum

0xCA

MOSI   

0x0000

MISO   

0x0020

Parameter Data

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

Cmd Data

 

9. File List Get Packet Command

Name

Hex Data

PCode   

0x71

Group Id

0xAC

Cmd    

0x71

Check sum

0xDA

MOSI   

0x0000

MISO   

0x0144

Parameter Data

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

Cmd Data

 

Each item in the file consists of the following information, each occupying 16 bytes:

  • Start UTC (Coordinated Universal Time at the beginning)
  • End UTC (Coordinated Universal Time at the end)
  • Start Page (Starting data flash page index)
  • End Page (Ending data flash page index)

There can be a maximum of 20 items. Additionally, there is a count represented using 4 bytes, indicating the total 324 bytes.

10. File List Clear Packet Command

Name

Hex Data

PCode   

0x70

Group Id

0xC2

Cmd    

0x70

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

 

Soft Register Send Packet Format

Soft Register Table

SREG NAMESREG TYPEValue Byte SizeNote
SREG_DEVICE_NAMESTRING20BLE Device Name
SREG_DEVICE_RESET 0SREG Write  then reset device
SREG_DEVICE_SSNSTRING32Device SSN
SREG_MEAS_LEAD_OFFINT40: Disable, 1: Enable
SREG_DEVICE_IDINT4Device ID
SREG_DEVICE_BEACONINT40: Disable, 1: Enable
SREG_VSC_MODE_TYPEINT40: Type 0, 1: Type 1
SREG_CHARG_POWER_DOWNINT40: Disable, 1: Enable
SREG_ADVERTISING_INTERVALINT4advertising interval setting range : 20 ~ 1000 (mSec)
SREG_ADVERTISING_FIXEDINT40: Disable, 1: Enable
SREG_FILE_RING_MODEINT40: Disable, 1: Enable

11. Soft Register Write Packet Command

12. Soft Register Read Packet Command