CN104539500B - A kind of external device extension method of car-mounted terminal - Google Patents
A kind of external device extension method of car-mounted terminal Download PDFInfo
- Publication number
- CN104539500B CN104539500B CN201410848433.2A CN201410848433A CN104539500B CN 104539500 B CN104539500 B CN 104539500B CN 201410848433 A CN201410848433 A CN 201410848433A CN 104539500 B CN104539500 B CN 104539500B
- Authority
- CN
- China
- Prior art keywords
- serial port
- vehicle
- mounted terminal
- box
- packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Small-Scale Networks (AREA)
Abstract
本发明提供一种车载终端的外部设备扩展方法,包括如下步骤:步骤1、所述车载终端与串口盒输入端连接,所述串口盒子的输出端连接外部设备,步骤2、设置串口的连接对象以及串口盒输出端连接的外部设备,步骤3、车载终端发送数据一包时,先按照串口盒的通信协议进行组包,得到组包一,然后将其组包一发送至串口盒,串口盒按照所述通信协议进行解析,然后根据所述扩展ID将所述数据包一发送至该外部设备;所述外部设备给车载终端发送数据包二时,所述串口盒收到数据包二后按照所述通信协议进行组包,得到组包二,所述车载终端按照所述通信协议解析,得到所述数据包二。本发明实现串口外接设备多元化且实现一个串口能同时对接多个外部设备的功能。
The present invention provides a method for expanding external equipment of a vehicle-mounted terminal, comprising the following steps: Step 1, the vehicle-mounted terminal is connected to the input end of a serial port box, the output end of the serial port box is connected to an external device, and step 2, the connection object of the serial port is set And the external device connected to the output end of the serial port box, step 3, when the vehicle-mounted terminal sends a packet of data, first group packets according to the communication protocol of the serial port box, get the packet one, and then send the packet one to the serial port box, the serial port box Analyze according to the communication protocol, and then send the data packet one to the external device according to the extended ID; when the external device sends the data packet two to the vehicle terminal, the serial port box receives the data packet two and follows The communication protocol is grouped into packets to obtain the second packet, and the vehicle-mounted terminal is analyzed according to the communication protocol to obtain the second data packet. The invention realizes the diversification of serial port external devices and realizes the function that one serial port can be connected to multiple external devices at the same time.
Description
【技术领域】【Technical field】
本发明涉及一种车载终端的外部设备扩展方法。The invention relates to a method for expanding external equipment of a vehicle-mounted terminal.
【背景技术】【Background technique】
汽车上通常需要连接多个外部设备,一般是通过串口连接外部设备实现特定的功能,例如,需要连接行车记录仪用于实时记录车辆的行驶状态,但是。对于不同客户需求也会相应不同,例如,出租车需要接入计价器记录运营状态,公交车需通过摄像头记录公交车运行状态。传统的车载终端一般只提供2~3个串口接口用来连接外部设备,随着客户的功能需求越来越多,接的外设越来越多,传统车载终端已无法满足客户需求。为了满足客户多外部设备的连接需求二开发新的具备更多串口的车载终端,不仅新产品周期长,且开发成本高,显然不可取。Cars usually need to connect multiple external devices, usually through serial ports to connect external devices to achieve specific functions, for example, it is necessary to connect a driving recorder to record the driving status of the vehicle in real time, but. The needs of different customers will also be different. For example, taxis need to be connected to the meter to record the operation status, and buses need to record the bus operation status through the camera. Traditional vehicle-mounted terminals generally only provide 2 to 3 serial ports for connecting external devices. With the increasing functional requirements of customers, more and more peripherals are connected, and traditional vehicle-mounted terminals can no longer meet customer needs. In order to meet the customer's needs for connecting multiple external devices and develop a new vehicle-mounted terminal with more serial ports, not only the new product cycle is long, but also the development cost is high, which is obviously not advisable.
【发明内容】【Content of invention】
本发明要解决的技术问题,在于提供一种车载终端的外部设备扩展方法,在不改变原有车载终端硬件前提下实现串口外接设备多元化且实现一个串口能同时对接多个外部设备的功能。The technical problem to be solved by the present invention is to provide a vehicle-mounted terminal external device expansion method, which realizes the diversification of serial port external devices and realizes the function that one serial port can connect multiple external devices at the same time without changing the original vehicle-mounted terminal hardware.
本发明是这样实现的:1、一种车载终端的外部设备扩展方法,其特征在于,包括如下步骤:The present invention is achieved like this: 1, a kind of external equipment expansion method of vehicle-mounted terminal, it is characterized in that, comprises the steps:
步骤1、将一串口盒的输入端与车载终端的串口连接,将至少一外部设备与所述串口盒的输出端连接,所述串口盒包括至少两输出端;Step 1. Connect the input end of a serial port box with the serial port of the vehicle-mounted terminal, connect at least one external device with the output end of the serial port box, and the serial port box includes at least two output ports;
步骤2、通过所述车载终端设置所述串口的连接对象为串口盒,以及配置所述串口盒所连接的不同外部设备的串口参数,所述串口参数包括各输出端的扩展ID;Step 2, setting the connection object of the serial port through the vehicle-mounted terminal as a serial port box, and configuring the serial port parameters of different external devices connected to the serial port box, the serial port parameters include the extended ID of each output terminal;
步骤3、车载终端给其中一外部设备发送数据一包时,所述数据包一先按照串口盒的通信协议进行组包,得到组包一,然后将其组包一发送至所述串口盒,所述通信协议定义了组包一中包含所述扩展ID,所述串口盒按照所述通信协议进行解析,得到数据包一,然后根据所述扩展ID将所述数据包一发送至该外部设备;Step 3, when the vehicle-mounted terminal sends a data packet to one of the external devices, the data packet is first grouped according to the communication protocol of the serial port box to obtain a group packet, and then its group packet is sent to the serial box, The communication protocol defines that the group package 1 includes the extension ID, and the serial port box analyzes according to the communication protocol to obtain the data packet 1, and then sends the data packet 1 to the external device according to the extension ID ;
所述外部设备给车载终端发送数据包二时,所述串口盒收到数据包二后按照所述通信协议进行组包,得到组包二,所述串口盒将所述组包二发送至所述车载终端,所述车载终端按照所述通信协议解析,得到所述数据包二,所述通信协议还定义了组包二中包含所述扩展ID。When the external device sends the data packet 2 to the vehicle terminal, the serial box receives the data packet 2 and performs grouping according to the communication protocol to obtain the group packet 2, and the serial port box sends the group packet 2 to the The vehicle-mounted terminal, the vehicle-mounted terminal analyzes according to the communication protocol to obtain the second data packet, and the communication protocol also defines that the second group packet contains the extended ID.
进一步地,所述组包一的数据格式包括帧头、串口盒子的设备标识码、包含所述扩展ID的命令标识、参数内容、校验和以及帧尾。Further, the data format of the group package 1 includes a frame header, a device identification code of a serial port box, a command identifier including the extended ID, parameter content, a checksum, and a frame trailer.
进一步地,所述组包二的数据格式包括帧头、串口盒子的设备标识码所述扩展ID、数据内容以及帧尾。Further, the data format of the group package 2 includes a frame header, the device identification code of the serial port box, the extension ID, data content, and a frame tail.
本发明具有如下优点:The present invention has the following advantages:
本发明车载终端通过扩展ID识别各数据包对应的外部设备,串口盒通过扩展ID识别数据传送对象,在车载终端硬件不变更的情况下,实现单串口外接多种外部设备,满足客户外部设备的添加需求。The vehicle-mounted terminal of the present invention identifies the external device corresponding to each data packet through the extended ID, and the serial port box identifies the data transmission object through the extended ID. Under the condition that the vehicle-mounted terminal hardware does not change, a single serial port can be externally connected to various external devices to meet the needs of customers' external devices. Add requirements.
【附图说明】【Description of drawings】
下面参照附图结合实施例对本发明作进一步的说明。The present invention will be further described below in conjunction with the embodiments with reference to the accompanying drawings.
图1为本发明车载终端与外部设备的连接示意图。FIG. 1 is a schematic diagram of connection between a vehicle-mounted terminal and an external device according to the present invention.
图2为本发明车载终端数据传输至外部设备的流程图。Fig. 2 is a flow chart of data transmission from the vehicle-mounted terminal to the external device according to the present invention.
图3为本发明外部数据数据传输至车载终端的流程图。Fig. 3 is a flowchart of the transmission of external data to the vehicle-mounted terminal according to the present invention.
【具体实施方式】【Detailed ways】
请参阅图1至图3,一种车载终端的外部设备扩展方法,包括如下步骤:Please refer to Fig. 1 to Fig. 3, a kind of external device expansion method of vehicle terminal, comprises the following steps:
步骤1、将一串口盒的输入端与车载终端的串口连接,将至少一外部设备与所述串口盒的输出端连接,所述串口盒包括至少两输出端;所述外部设备可以是摄像头、计较器、LED显示器、行车记录仪;Step 1, the input end of a serial port box is connected with the serial port of vehicle-mounted terminal, at least one external device is connected with the output end of described serial port box, and described serial port box comprises at least two output ends; Described external device can be camera, Calculator, LED display, driving recorder;
步骤2、通过所述车载终端设置所述串口的连接对象为串口盒,以及配置所述串口盒所连接的不同外部设备的串口参数,所述串口参数包括各输出端的扩展ID;Step 2, setting the connection object of the serial port through the vehicle-mounted terminal as a serial port box, and configuring the serial port parameters of different external devices connected to the serial port box, the serial port parameters include the extended ID of each output terminal;
步骤3、车载终端给其中一外部设备发送数据一包时,所述数据包一先按照串口盒的通信协议进行组包,得到组包一,然后将其组包一发送至所述串口盒,所述通信协议定义了组包一中包含所述扩展ID,所述串口盒按照所述通信协议进行解析,得到数据包一,然后根据所述扩展ID将所述数据包一发送至该外部设备;在本实施例中,所述组包一的数据格式包括帧头、串口盒子的设备标识码、包含所述扩展ID的命令标识、参数内容、校验和以及帧尾。Step 3, when the vehicle-mounted terminal sends a data packet to one of the external devices, the data packet is first grouped according to the communication protocol of the serial port box to obtain a group packet, and then its group packet is sent to the serial box, The communication protocol defines that the group package 1 includes the extension ID, and the serial port box analyzes according to the communication protocol to obtain the data packet 1, and then sends the data packet 1 to the external device according to the extension ID ; In this embodiment, the data format of the group package 1 includes the frame header, the device identification code of the serial port box, the command identification including the extended ID, the parameter content, the checksum and the frame tail.
所述外部设备给车载终端发送数据包二时,所述串口盒收到数据包二后按照所述通信协议进行组包,得到组包二,所述串口盒将所述组包二发送至所述车载终端,所述车载终端按照所述通信协议解析,得到所述数据包二,所述通信协议还定义了组包二中包含所述扩展ID,在本实施例中,所述组包二的数据格式包括帧头、串口盒子的设备标识码所述扩展ID、数据内容以及帧尾。When the external device sends the data packet 2 to the vehicle terminal, the serial box receives the data packet 2 and performs grouping according to the communication protocol to obtain the group packet 2, and the serial port box sends the group packet 2 to the The vehicle-mounted terminal, the vehicle-mounted terminal analyzes according to the communication protocol, and obtains the data package 2, and the communication protocol also defines that the group package 2 contains the extended ID. In this embodiment, the group package 2 The data format includes the frame header, the extended ID of the device identification code of the serial port box, the data content and the frame tail.
本发明车载终端通过扩展ID识别各数据包对应的外部设备,串口盒通过扩展ID识别数据传送对象,在车载终端硬件不变更的情况下,实现单串口外接多种外部设备,满足客户外部设备的添加需求。The vehicle-mounted terminal of the present invention identifies the external device corresponding to each data packet through the extended ID, and the serial port box identifies the data transmission object through the extended ID. Under the condition that the vehicle-mounted terminal hardware does not change, a single serial port can be externally connected to various external devices to meet the needs of customers' external devices. Add requirements.
虽然以上描述了本发明的具体实施方式,但是熟悉本技术领域的技术人员应当理解,我们所描述的具体的实施例只是说明性的,而不是用于对本发明的范围的限定,熟悉本领域的技术人员在依照本发明的精神所作的等效的修饰以及变化,都应当涵盖在本发明的权利要求所保护的范围内。Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments we have described are only illustrative, rather than used to limit the scope of the present invention. Equivalent modifications and changes made by skilled personnel in accordance with the spirit of the present invention shall fall within the protection scope of the claims of the present invention.
Claims (3)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410848433.2A CN104539500B (en) | 2014-12-31 | 2014-12-31 | A kind of external device extension method of car-mounted terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410848433.2A CN104539500B (en) | 2014-12-31 | 2014-12-31 | A kind of external device extension method of car-mounted terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN104539500A CN104539500A (en) | 2015-04-22 |
| CN104539500B true CN104539500B (en) | 2018-06-08 |
Family
ID=52854969
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410848433.2A Active CN104539500B (en) | 2014-12-31 | 2014-12-31 | A kind of external device extension method of car-mounted terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104539500B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106004730A (en) * | 2016-07-12 | 2016-10-12 | 深圳华汽车科技有限公司 | Automotive heterogeneous network convergence device and plug and play expanding method of automotive intelligent equipment based on same |
| CN109739572B (en) * | 2018-12-25 | 2022-01-28 | 江南机电设计研究所 | Universal integrated serial port communication method |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN202009138U (en) * | 2011-04-07 | 2011-10-12 | 厦门翼迅智能科技有限公司 | Vehicle-mounted intelligent interface box |
| CN103631363A (en) * | 2013-09-22 | 2014-03-12 | 深圳市联和安业科技有限公司 | Automobile data interface expanding device and method for achieving data interaction |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8638207B2 (en) * | 2007-08-09 | 2014-01-28 | Drew Technologies | Modular vehicular diagnostic tool |
-
2014
- 2014-12-31 CN CN201410848433.2A patent/CN104539500B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN202009138U (en) * | 2011-04-07 | 2011-10-12 | 厦门翼迅智能科技有限公司 | Vehicle-mounted intelligent interface box |
| CN103631363A (en) * | 2013-09-22 | 2014-03-12 | 深圳市联和安业科技有限公司 | Automobile data interface expanding device and method for achieving data interaction |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104539500A (en) | 2015-04-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103957136B (en) | Moonlet CAN bus monitoring system | |
| CN104734911A (en) | CAN bus network management test system and method | |
| CN107317638A (en) | Method, terminal device and the computer-readable recording medium of bluetooth test | |
| CN207601619U (en) | A kind of automobile gateway prototype system based on BroadR-Reach Ethernets | |
| CN105162674A (en) | Method and network card for physical machine to access to virtual network | |
| CN102932327A (en) | Method and system for communicating zero-terminal equipment and desktop virtual machine | |
| CN103098039B (en) | High-speed peripheral device interconnection bus port collocation method and equipment | |
| CN105262638A (en) | Method for simultaneously testing plurality of electronic products | |
| CN104539500B (en) | A kind of external device extension method of car-mounted terminal | |
| CN205845433U (en) | A kind of equipment state LED display screen | |
| CN106844275A (en) | Data transmission method and device | |
| CN104243246B (en) | A kind of FlexRay bus tests and optimization method and device based on ZigBee technology | |
| CN102611741A (en) | Method for extracting communication matrix from AUTOSAR (Automotive Open System Architecture) system allocation model | |
| CN115663549B (en) | Multi-interface conversion device and vehicle | |
| CN108540318A (en) | A kind of Lower level logical implementation method and device for realizing that serial ports redirects | |
| CN202134153U (en) | Electronically controlled engine ECU simulation device | |
| CN202374285U (en) | Real-time data communication system employing programmable logic controller | |
| CN102932458B (en) | Point-to-point protocol (PPP) hardware acceleration system and achieving method thereof | |
| CN206270694U (en) | A CAN bus automatic coding circuit | |
| CN105872060A (en) | Communication method and system, and data collection end device | |
| CN116418615A (en) | Vehicle data processing system and method, electronic device and readable storage medium | |
| CN210605680U (en) | Automobile ECU program updating system | |
| CN103257648B (en) | Automobile calibration system | |
| CN101834876A (en) | Distributed semi-physics simulation system based on Bluetooth, database and UDP protocol and data summarization and distribution method thereof | |
| CN105550153B (en) | A kind of 1394 bus multi-channel flow datas are unpacked method parallel |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |