CN-122028022-A - Bluetooth bridging module and communication method
Abstract
The embodiment of the application provides a Bluetooth bridging module and a communication method thereof, wherein the Bluetooth bridging module is applied to an electric friction controller and comprises a Bluetooth communication unit, a multi-channel communication interface unit, a handshake unit and a protocol conversion unit, wherein the Bluetooth communication unit is used for carrying out data interaction with a communication end according to a preset communication protocol, the multi-channel communication interface unit is respectively connected with the electric friction controller through corresponding transceiver circuits, the handshake unit is used for sequentially sending handshake request frames on the multi-channel communication interfaces, traversing candidate baud rates, determining effective communication interface units and baud rates according to handshake response frames and locking the effective communication interface units and baud rates into current communication configuration, and the protocol conversion unit is used for carrying out bidirectional conversion on the preset communication protocol frames and protocol frames at the side of the controller. Through the mode, the communication interface type and the baud rate of the electric friction controller can be adaptively identified, various controller side communication protocols are uniformly converted into the Bluetooth side preset communication protocol, the bridging function of multiprotocol normalization is realized, the operation complexity of a user is reduced, and the parameter adjustment and upgrading efficiency is improved.
Inventors
- WANG HE
- LIU YOUHUI
Assignees
- 深圳市好盈科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260414
Claims (10)
- 1. A bluetooth bridge module for use in an electric motor controller, comprising: the Bluetooth communication unit establishes wireless connection with the communication terminal and is configured to perform data interaction with the communication terminal according to a preset communication protocol; The multipath communication interface units are respectively connected with the electric motor controller through corresponding transceiver circuits; The handshake unit is configured to sequentially send handshake request frames on the multipath wired communication interfaces, traverse a plurality of candidate baud rates on each interface, determine effective communication interface units and communication baud rates according to handshake response frames returned by the electric friction controller, and lock the effective communication interface units and the communication baud rates into the current communication configuration; A protocol conversion unit configured to convert a preset communication protocol frame received by the bluetooth communication unit into a controller-side protocol frame corresponding to the current communication configuration, and convert a controller-side protocol frame returned by the electric friction controller into a preset communication protocol frame; the locked communication interface unit is used for sending the controller side protocol frame converted by the protocol conversion unit to the electric friction controller; The Bluetooth communication unit is used for transmitting the preset communication protocol frame converted by the protocol conversion unit back to the communication terminal.
- 2. The bluetooth bridge module according to claim 1, further comprising: and the parameter caching unit is configured to read the parameter data of the electric friction controller through the locked communication interface unit in a preset period after the handshake is successful and cache the parameter data into the local memory, and when the communication terminal requests to read the parameter, the cached parameter data is returned to the communication terminal.
- 3. The bluetooth bridge module according to claim 1, further comprising: a storage unit configured to temporarily store firmware data to be upgraded received via the bluetooth communication unit; and the offline upgrading unit is configured to respond to a physical trigger signal, read the firmware data to be upgraded from the storage unit, and write the firmware data into the electric friction controller through the protocol conversion unit and the locked communication interface unit.
- 4. The Bluetooth bridge module according to claim 3, wherein the memory unit receives firmware information via the Bluetooth communication unit before buffering the firmware data, wherein the firmware information includes a firmware check value, a firmware platform code, and a firmware item code; And the offline upgrading unit judges that the upgrading target is the electric friction controller or the Bluetooth bridging module according to the firmware platform code and the firmware item code.
- 5. The bluetooth bridge module according to claim 4, wherein the bluetooth communication unit receives the firmware data to be upgraded in a packet manner, the storage unit replies acknowledgement information to the communication terminal from the bluetooth communication unit after each packet is written, and the temporary complete firmware data is checked and compared with the firmware check value after all the reception is completed to confirm the data integrity; The storage unit records a data offset position that has been successfully received, and when the transmission is reconnected after termination of the communication interruption, the bluetooth communication unit continues to receive firmware data from the data offset position.
- 6. The bluetooth bridge module according to claim 4, wherein when the upgrade target is the bluetooth bridge module itself, the offline upgrade unit sets an upgrade flag bit and triggers a reset after firmware temporary storage is completed and verification is passed, and after the reset, a bootstrap program of the bluetooth bridge module reads firmware data from a nonvolatile memory unit and writes the firmware data into an application program memory area to complete the firmware upgrade itself.
- 7. The bluetooth bridge module according to claim 3, wherein when the offline upgrade unit performs firmware writing, a boot procedure entry instruction is sent to the electric friction controller, firmware data is sent in packets after the electric friction controller enters a boot procedure mode, and each packet waits for a writing acknowledgement; and the offline upgrading unit records the position of the successfully transmitted data packet, continues to transmit from the position when triggered next time if the upgrading process is interrupted, and keeps waiting for re-upgrading in a boot program mode if the verification of the firmware of the electric friction controller fails.
- 8. The communication method is applied to a Bluetooth bridging module comprising a multipath communication interface, a Bluetooth unit and a memory, and is characterized by comprising the following steps: Sequentially sending handshake request frames at a plurality of candidate baud rates on the multi-path communication interface; Determining effective communication interfaces and communication baud rates according to handshake response frames returned by the electric friction controller, and locking the effective communication interfaces and the communication baud rates into current communication configuration; receiving an instruction frame sent by a communication terminal through a Bluetooth unit in a preset communication protocol, converting the instruction frame into a controller-side protocol frame corresponding to the current communication configuration, then sending the controller-side protocol frame to the electric friction controller, converting response data of the electric friction controller into a preset communication protocol frame, and then returning the response data to the communication terminal; Receiving firmware information and firmware data to be upgraded sent by the communication terminal through the Bluetooth unit, judging an upgrading target according to firmware platform codes and firmware item codes in the firmware information, writing the firmware data into the memory in a packetized manner, and carrying out integrity check on the temporarily stored firmware data after the reception is completed; and responding to a physical trigger signal, and writing the temporarily stored firmware data in the memory into the electric friction controller through the locked communication interface.
- 9. The method of claim 8, wherein the sequentially sending handshake request frames at a plurality of candidate baud rates over the multiple communication interfaces, determining valid communication interfaces and communication baud rates based on handshake reply frames returned by the electric mole controller, locking to a current communication configuration, comprises: Waiting for preset time after sending a handshake request frame for each candidate baud rate of each communication interface; if the effective handshake response frame is received within the preset time, locking the current communication configuration and stopping scanning; If the effective handshake response frame is not received within the preset time, switching to the next candidate baud rate or continuing to scan the next communication interface.
- 10. The method of claim 8, wherein the writing the buffered firmware data in the memory to the electronic friction controller via the locked communication interface in response to a physical trigger signal comprises: Sending a guide program entering instruction to the electric friction controller, after the electric friction controller enters a guide program mode, sending firmware data in a subpacket mode, waiting for writing confirmation packet by packet, and recording the position of a successfully sent data packet to support breakpoint continuous transmission after interruption; When the upgrading target is the Bluetooth bridging module, after the temporary storage of the firmware is completed and the verification is passed, setting an upgrading flag bit and resetting the upgrading flag bit, and completing the firmware updating of the Bluetooth bridging module by a bootstrap program of the Bluetooth bridging module.
Description
Bluetooth bridging module and communication method Technical Field The present application relates to the field of communication control, and in particular, to a bluetooth bridge module and a communication method. Background Along with the continuous improvement of the intelligent level of electric friction, the parameter adjusting and upgrading technology has become an important means for electric friction maintenance and performance optimization. Currently, parameter adjustment and upgrading of an electric friction controller generally require that communication connection is established between the electric friction controller and the controller by means of a special tool, so that operations such as parameter reading and writing, firmware updating and the like are completed. However, there are significant differences in the communication modes adopted by different brands and models of electric motor controllers, and common communication interfaces include CAN, UART, RS485 and the like. Meanwhile, even in the same communication scheme, the communication baud rates supported by different controllers are different. The diversity of the communication modes and the baud rates directly leads to fragmentation of the parameter adjusting and upgrading tool, and special parameter adjusting tools such as a CAN analyzer, a serial port debugger and the like are needed to be equipped for each communication mode, and the operation interfaces and the use flows of the tools are different. The main problem brought by the current situation is that when users carry out parameter adjustment and upgrading on electric motor controllers with different models, the users need to frequently switch among various tools and manually match the communication mode and the baud rate. The method not only greatly increases the operation complexity and the error probability, but also ensures that after-sales maintenance personnel need to master the using methods of a plurality of tools at the same time, and the maintenance efficiency is obviously restricted. Disclosure of Invention The application aims to solve the problems of complex operation and low maintenance efficiency caused by the fact that communication parameters are required to be frequently switched and manually matched among various special tools due to the diversity of communication modes and baud rates in the parameter adjustment and upgrading process of the traditional electric friction controller. The application provides a Bluetooth bridging module which is applied to an electric friction controller and comprises a Bluetooth communication unit, a multi-channel communication interface unit, a handshake unit, a locked communication interface unit and a Bluetooth communication unit, wherein the Bluetooth communication unit is in wireless connection with a communication end and is configured to conduct data interaction with the communication end according to a preset communication protocol, the multi-channel communication interface unit is connected with the electric friction controller through corresponding transceiving circuits, the handshake unit is configured to sequentially send handshake request frames on the multi-channel wired communication interfaces, traverse a plurality of candidate baud rates on each interface, determine effective communication interface units and communication baud rates according to handshake response frames returned by the electric friction controller and lock the effective communication interface units and the communication baud rates into a current communication configuration, the protocol conversion unit is configured to convert the preset communication protocol frames received by the Bluetooth communication unit into controller-side protocol frames corresponding to the current communication configuration and convert the controller-side protocol frames returned by the electric friction controller into preset communication protocol frames, the locked communication interface unit is used for sending the controller-side frames converted by the protocol conversion unit to the electric friction controller, and the Bluetooth communication unit is used for converting the preset protocol frames back to the communication end. Optionally, the Bluetooth bridging module further comprises a parameter caching unit, wherein the parameter caching unit is configured to read the parameter data of the electric friction controller through the locked communication interface unit at a preset period after the handshake is successful and cache the parameter data into the local memory, and when the communication terminal requests to read the parameter, the cached parameter data is returned to the communication terminal. Optionally, the Bluetooth bridging module further comprises a storage unit configured to temporarily store firmware data to be upgraded received through the Bluetooth communication unit, and an offline upgrading unit configured to read the firmware da