Megastek protocol

Protocol used by GPS tracking devices manufactured by Megastek headquartered in China.
flespi parses the Megastek protocol messages into a JSON object with the fields listed below in the Parameters tab.

To connect your tracker using the Megastek protocol, you need to have a megastek channel created first.

Point your tracker to the channel's domain name:port via SMS or configuration tool provided by the vendor.

Then create a device instance for your tracker and use a 15-character IMEI (usually specified on the tracker casing) in the ident field.

Use the Toolbox tab on the device screen to check if the messages are coming.

activity.time
number
minute
The activity time during the sleep quality inspection period
alarm.event
boolean
Alarm event triggered
base.station.imei
string
Base station IMEI
base.station.remove.alarm
boolean
Base station removal alarm
base.station.signal.level
number
percentage
Base station signal level
battery.charging.status
boolean
Battery charging status
battery.level
number
percentage
Internal battery level
battery.low.alarm
boolean
Battery low alarm event
beidou.position.satellites
number
Quantity of satellites from BEIDOU used to calculate coordinates for given position information
blood.oxygen.saturation
number
percentage
Blood oxygen saturation SpO2
channel.id
number
ID of channel that received a message
deep.sleep.time
number
minute
The deep sleep time during the sleep quality inspection period
device.id
number
ID of device that received a message
device.name
string
Name of device that received a message
device.self.name
string
Device name reported by the device
device.type.id
number
ID of device type of device that received a message
disassemble.alarm
boolean
Disassemble alarm event
event.code
string
Protocol-specific event code string
external.powersource.status
boolean
External power source connection status
geofence.alarm
boolean
Geofence alarm event
geofence.id
number
Geofence ID
geofence.name
string
Geofence name
geofence.status
boolean
Geofence entered status
glonass.position.satellites
number
Quantity of satellites from GLONASS used to calculate coordinates for given position information
gps.position.satellites
number
Quantity of satellites from GPS used to calculate coordinates for given position information
gsm.cellid
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) base station ID
gsm.lac
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) location area code
gsm.mcc
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) country code
gsm.mnc
number
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) code
gsm.signal.level
number
percentage
Mobile network (GSM, 3G, 4G, LTE, 5G, ...) signal strength level
heart.rate
number
bpm
Heart rate
ident
string
Device unique identifier like serial number, IMEI, etc
message.buffered.status
boolean
Black box message
peer
string
IP:port from which device connecting to the channel
position.altitude
number
meters
Altitude value for position
position.direction
number
degrees
Heading angle at position detection moment
position.hdop
number
Horizontal dilution of precision
position.latitude
number
degrees
Latitude coordinate value
position.longitude
number
degrees
Longitude coordinate value
position.speed
number
km/h
Instant speed at position detection moment
position.valid
boolean
Is position information accurate and valid for given timestamp
protocol.id
number
ID of protocol
restart.alarm
boolean
Restart alarm event
sensor.temperature
number
celsius
Temperature sensor value
server.timestamp
number
seconds
Timestamp when server received a message
shallow.sleep.time
number
minute
The shallow sleep time during the sleep quality test period
shutdown.alarm
boolean
Shutdown alarm event
sos.alarm
boolean
SOS alarm trigerred
startup.alarm
boolean
Startup alarm event
steps.count
number
The total number of steps for the day
timestamp
number
seconds
Message timestamp
vehicle.mileage
number
km
Total calculated mileage
wifi.mac.address
string
WiFi MAC address
wifi.signal.strength
number
WiFi signal strength, RSSI
wristband.connected.status
boolean
Wristband connection status
Properties
Custom Command
custom
Send custom command to device
payload: Command payload
Read GPRS schedule upload interval
{"payload":"R005"}
Set GPRS schedule upload interval 30 seconds
{"payload":"W005,1"}