Not just TCP/UDP gateways. Based on Spring Boot 2.x technology, the complex docking of hardware interfaces is transformed into an easy-to-use interface and message push method. It has multiple capabilities such as device management, data analysis, and message push, and can be widely used in various vehicle supervision scenarios and application platform.

As the interface service of this gateway, bartender can provide strong support for the realization of vehicle networking supervision and ministry standard standards, and help the intelligentization and standardization of vehicle supervision.

bartender interface documentation

document

Software Architecture

Gateway Architecture of Light Vehicle Internet of Vehicles

Product Roadmap

Light vehicle network gateway circuit diagram

System Requirements

configuration itemSpecification
CPU memory2-core 4G within 1w devices
hard disk20G per 100 devices for 1 year
operating systemLinux

Supported device types

Equipment typeprotocol
Conquest cable/OBD power connection equipmentConquest private agreement
Qiguo OBD DeviceQiguo private agreement
Zero One OBD DeviceZero One Private Protocol
Car hoist OBD equipmentCar hoist private agreement
car easy control driving recorderJT808 ministry standard agreement
Hezheng driving recorderHezheng private agreement
Xinyuanrun wireless equipmentXinyuanrun private agreement
ADAS equipmentJT1078 ministry standard agreement

Supported alarm types

categoryAlarm item
The device comes with an alarmBattery removal alarm, illegal removal alarm, vibration alarm,
Risk location alarm, anti-hijacking alarm, cover opening alarm,
Displacement alarm, false base station alarm
Abnormal Driving Behavior – Fatigue/Talking/Smoking
Platform judgment alarmOverspeed alarm, alarm for entering sensitive area, alarm for exiting sensitive area,
Disconnected alarm, parking overtime alarm, separation alarm,
Out-of-province alarm, stay alarm in sensitive areas, timeout alarm for not entering commonly used areas,
In-situ fortification alarm, power fence alarm,
Alarm when exiting the electronic fence, alarm inside the fence, and overtime parking inside the fence

Glossary

conceptdefinition
messageHardware uplink data, such as positioning, heartbeat, alarm, OBD and other information.
server timeThe time when the platform receives the message.
positioning timeThe GPS positioning time in the message is the GPS positioning time obtained by the hardware using its own GPS module.
online/offline statusThe platform updates the device status to offline 10 minutes after receiving the last message from the hardware. It is online during message reporting.
Parking/driving statusSpeed ​​greater than 5 is regarded as driving, otherwise stop. Device speed is 0 when offline.
mileageAccording to the reported positioning points, it is sorted by GPS time, and the distance between the positioning points is accumulated.
stop pointA period of time from the start of parking to driving is regarded as a stop point, and the stop time is at least 10 minutes.
trackA route drawn by sorting historical positioning data by positioning time.
track segmentationDivide the trajectory into travel segments. By default, the separation condition is that the point spacing exceeds 10 meters, and the positioning time interval exceeds 15 minutes.

1. API authentication

When using it for the first time, we will provide the authentication information of the calling terminalclient_idandclient_secretcall the authentication interface to obtain credentialsaccess_tokenand then you can start using other business API interfaces.

Authentication interface POST /oauth/token

The token_type and access_token returned by this interface use' '(Space) After connection, carry the calling service interface in the request header.

request parameters

nameLocationtyperequiredillustrate
grant_typequerystringyesfixed parameters
client_idquerystringyesClient ID
client_secretquerystringyesclient key

Successful return example

{
  "access_token": "this_is_an_example_access_token",
  "token_type": "bearer",
  "expires_in": 40528,
  "scope": "all",
  "jti": "483fb3cf-e63b-415d-93bd-bdd4f12a8213"
}

return result

status codestatus code meaningillustratedata model
200OKsuccessInline

return data structure

nametyperequiredconstraintChinese nameillustrate
» access_tokenstringtruenoneauthentication tokennone
» token_typestringtruenoneAuthentication typenone
» expires_inintegertruenoneAfter how many seconds the token expiresnone

2. Device access and message reception

After the system is built, if you use third-party hardware, you need to configure the hardware to the TCP (UDP) online port of the corresponding protocol. If you use our equipment, you can contact customer service for configuration. As shown in the figure, first add the device to ensure that the device is online. If you need to receive real-time location and alarm of the device, you need to enable event push.

Devices – add interface GET /devices/syn

Support batch adding of the same model, use default parameters to bypass authentication.

request parameters

nameLocationtyperequiredillustrate
clientIdquerystringyesClient ID
categoryNoquerystringyesdevice model, long name
deviceNumsquerystringyesDevice number, separated by commas in batches

return result

status codestatus code meaningillustratedata model
200OKsuccessInline

Device-batch start and stop push interface GET /devices/batch

If the enabled status is not specified when the device is imported, it will be enabled by default, and there is no need to enable it in batches. If the initial state of the specified device is disabled during import, you need to use this interface to control. When disabled, the positioning status and event information will not be pushed.

request parameters

nameLocationtyperequiredillustrate
devicesquerystringyesDevice numbers that need to be started and stopped, separated by commas when multiple
isEnablequerystringyes0: enable 1: disable

return result

status codestatus code meaningillustratedata model
200OKsuccessInline
  1. Verify that the device is online

Device location – operation and maintenance view device location status interface GET /opt/location

Operation and maintenance use query device latest positioning status, when the device number does not exist, it prompts “device number does not exist”

request parameters

nameLocationtyperequiredillustrate
deviceNumquerystringyesnone

Successful return example

{
  "code": 200,
  "data": {
    "categoryNo": "DO90",
    "categoryNoShort": "DO90",
    "createTime": "2022-07-27 05:12:00",
    "deviceNum": "868120250375836",
    "direction": 28,
    "directionName": "东北",
    "gpsTime": "2022-07-26 16:14:49",
    "isMoving": 0,
    "latBd": 29.116056,
    "latGc": 29.109734,
    "lngBd": 119.654767,
    "lngGc": 119.648356,
    "locMode": 9,
    "satCount": 15,
    "speed": 0,
    "startTimeMovingStop": "2022-06-23 07:45:53",
    "startTimeOnOffLine": "2022-07-27 05:12:00",
    "wifiFlag": 1
  },
  "message": "",
  "success": true
}

return result

status codestatus code meaningillustratedata model
200OKsuccessInline

return data structure

nametyperequiredconstraintChinese nameillustrate
» codeintegertruenonenone
» dataobjecttruenonenone
»» categoryNostringtruenoneEquipment typenone
»» categoryNoShortstringtruenoneDevice Type Short Namenone
»» createTimestringtruenonecreation timenone
»» deviceNumstringtruenoneDevice Nonone
»» directionintegertruenonedirectionnone
»» directionNamestringtruenonedirection descriptionnone
»» gpsTimestringtruenonepositioning timenone
»» isMovingintegertruenoneDriving: 1; Parking: 0none
»» latBdnumbertruenoneBaidu coordinate latitudenone
»» latGcnumbertruenoneGaode coordinate latitudenone
»» lngBdnumbertruenoneBaidu coordinate longitudenone
»» lngGcnumbertruenoneGaud coordinate longitudenone
»» locModeintegertruenonePositioning method 0-GPS; 1-LBS single base station; 2-LBS multi-base station; 5-WIFI; 9-no positioningnone
»» satCountintegertruenoneNumber of satellites Number of satellitesnone
»» speedintegertruenonespeednone
»» startTimeMovingStopstringtruenoneDriving/stopping + start time year month day hour minute secondnone
»» startTimeOnOffLinestringtruenoneOnline/offline start time year month day hour minute secondnone
»» wifiFlagintegertruenoneDevice Type 1: Wirednone
» messagestringtruenonenone
» successbooleantruenonenone

The total number of online devices and the online number of each port

The port health status can be roughly judged according to the real-time online number of each port. When there are few vehicles at a certain port or most of the vehicles are parked at the current time, it is not enough to judge the port health status. You can refer to the following SQL query to query the online quantity.


SELECT COUNT(p.ALM_OFFLINE = 0 AND (p.ISSLEEPING=0 OR p.ISSLEEPING IS NULL) OR NULL) AS '在线总数' 
FROM dd_new.position p;

SELECT p.TAG as '端口',
COUNT(p.ALM_OFFLINE = 0 AND (p.ISSLEEPING=0 OR p.ISSLEEPING IS NULL) OR NULL) AS '在线数',
COUNT(*) AS '累计上线数量',
MAX(p.CREATE_TIME) AS '最新服务时间',
NOW() AS '当前时间',
IF(TIMESTAMPDIFF(SECOND,MAX(p.CREATE_TIME),NOW()) <= SECOND(3), '正常', 
IF(COUNT(p.ALM_OFFLINE = 0 AND (p.ISSLEEPING=0 OR p.ISSLEEPING IS NULL) OR NULL) < 100, '设备较少', '异常')) AS '端口健康' -- 该阈值需根据活跃车辆数进行调整
FROM dd_new.position p
GROUP BY p.TAG
ORDER BY MAX(p.CREATE_TIME);

Device does not go online

Location update callbackThe device data cannot be received, or there is no new data for more than 30 minutes.

Operation and maintenance suggestions:

  1. Confirm that the device is powered on and the vehicle is running normally.
  2. Confirm with your network operator that the IoT card is available.
  3. Avoid placing the vehicle in a location with poor signal such as an underground parking lot. Refer to the equipment manual, judge according to the indicator light, and confirm that the network signal is good and the GPS signal is good.

Inaccurate device positioning

There is a deviation between the vehicle’s location on the map and its actual location.

Operation and maintenance suggestions:

  1. Confirm that the vehicle is running normally, otherwise the device may be powered off.
  2. confirmLocation update callbackIt is normal to receive the data of the device. If there is no update, it is suspected that there is a problem that the device is not online.
  3. If the positioning identifier in the callback dataAV=Vindicating that the device cannot search for satellite signals, and GPS positioning fails. It is recommended to drive to a location with better signals.

#bartender #Homepage #Documents #Downloads #Light #Vehicle #Internet #Vehicles #Gateway #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *