Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging tool

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging tool

Bittly is a communication debugging tool that supports multiple communication methods or protocols. Supports serial port, network, Bluetooth, HTTP, Websocket, MQTT, and Modbus. Support fast implementation of upper computer control panel through command binding. Support automated testing of communication commands and output test reports.

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure

When multiple instructions need to be executed frequently, switching back and forth between TAB instructions becomes a cumbersome task. This allows us to quickly execute multiple instructions by binding them to buttons or slider components, without the need to switch TAB operations. And through the panel, it is more convenient to implement a simulated upper computer control panel.

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure1

Layout Description:

  1. 模块: The function module menu is used to switch the functional content of the current workspace. At present, this menu includes instruction management, Panel drawing, Test Management, Environmental variables and project management.
  2. 指令目录 : List of instructions for managing and saving, Support folder and drag and drop management. After clicking the command, the command details will be opened in the right workspace for debugging operations.
  3. 打开的指令列表 : Display the list of currently opened commands, Other commands can be quickly closed through email, You can also click on it x Icon closes the current. By clickingTabUse tags to switch between instructions.
  4. 通讯配置 : The communication configuration area is used to configure various communication parameter information, The first dropdown menu is used to select the communication method, For example, serial port, Internet, Bluetooth, etc. After selecting the communication method, You can configure the corresponding communication parameters, For example, serial port number, Communication speed, etc, According to different communication methods, The communication parameters that need to be configured are also different.
  5. 参数构建 : The parameter construction area is used to construct request parameters, Select the parameter construction mode through the radio button above.
    • HEXpattern : Used for quickly constructing hexadecimal request parameter content, for example : 01 02 03 AA BB CC
    • text mode: Used for quickly constructing text request parameter content, for example: how are you
    • File Mode: Used to send a file as a request parameter, Support three modes of line by line or byte by byte transmission, as well as full-text transmission.
    • forms mode : Used for quickly creating complex request parameters, Automatically construct request data by specifying data types, No need for manual base conversion or size end processing.
  6. 响应查看 : Support multiple ways to view response content, Easy to observe and analyze response data.
    • data flow: The data flow mode will record the content of each sent and received data, And display it in the form of a list, Click on the list entry to view the complete response content.
    • Text: Parse the response content into text and display it.
    • HEX: Convert the response content to a hexadecimal string and display it.
    • formatting: Automatically parse and convert received data by configuring data types and lengths.
    • Drawing: Parse the data using the specified parsing method and display it in the form of a line chart.
  7. 活跃连接列表 : Display all currently connected devices or services, can pass through x Icon disconnects specified connection.

Control panel interface layout

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure2

Layout Description:

  1. 面板列表 : Each project can create any number of control panels, The panel can be switched directly by clicking.
  2. 面板控制: Display the current panel name, And switching logs, Display status of variable list. Or switch the working mode of the panel. Switch to editing mode to edit panel components.
  3. 面板组件区域 : The panel component area is used to display all components of the panel, This area can freely define components and their working modes by dragging and dropping them in editing mode.
  4. 变量列表 : The variable list is used to display the values of all variables in the current panel, The area can be controlled through the panel 变量 Button to switch between display and off states.
  5. 指令日志区域 : Display the current panel communication log, The area can be controlled through the panel 日志 Button to switch between display and off states

Bittly Data transmission can be done by creating a new commandTABOr open a command from the left-hand directory to perform the operation.

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure3

Instructions for Operation Steps:

  1. Select communication method, Select the type of communication required as needed, For example, serial port, Network or other types.
  2. After selecting the communication method, The communication configuration will display the required parameter content based on the selected communication method. For example, select as WebSocket way, You need to configure the server address for the connection.
  3. send request, After configuring the request parameters, you can click the send button to send the data. If the requested connection is not established, We will first establish a connection and then proceed with the sending operation. If the connection already exists, the request content will be sent directly.
  4. Request parameter construction mode, Choose the appropriate request parameter construction mode, for example, When the request parameters are relatively simple, You can choose text orHEXpattern, If the parameters are responsible, you can choose the form mode for quick construction.
  5. Request parameter construction, Taking the form mode as an example here, Construct data content based on the required data types in the document. The name column is used to indicate the name of the attribute, Type is used to describe the data type of the attribute, The value column is used to edit the value of the attribute. The description column is used to extend the description of the attribute, For example, the range of values or other necessary explanations.
  6. Response viewing mode is used to select the appropriate response data viewing method, for example:
    • When there are multiple sending and receiving frequencies, When the request content is relatively simple, You can use data flow mode to view content interaction;
    • When the data is textual content, You can use text mode to view the response text;
    • When the data is binary data, It can also be usedHEXView the hexadecimal content of the response data in the pattern;
    • When the data content is relatively complex, But when it belongs to analyzable structured data, Format mode can be used to automatically parse the response content;
    • You can also specify or customize parsing modes to parse data, And render it as a line chart.
    • Bittly Data formatting and parsing
    • When the request content is quite complex, Creating binary data manually becomes very tricky, Now we can Bittly To change this situation.
    • Request parameter construction
    • for example, We takeModbusTaking reading data in the protocol as an example, The parameters required in the document for us to pass are as follows:
    • So we can use forms to create this structure:
    • 名称 : Name used to mark the attribute
    • 类型 : Specify the data type of this attribute, The supported data structures are as follows: 字节(uint8), 单字节整型(int8), 字符(int8/char)无符号字符(uint8)短整型(uint16),  无符号短整型(int16)整型(int32)无符号整型(uint32), 长整型(int32)无符号长整型(uint32) , 长长整型(int64)无符号长长整型(uint64)单精度浮点型双精度浮点型字符串字节数组文件 .
    • 取值: Edit attribute values.
      • When the attribute is unsigned data, The value format can be specified as 二进制(BIN)八进制(OCT)十进制(DEC) Or 十六进制(HEX), And automatically perform conversion operations when sending data.
      • Placeholders can be used {{env.name}} To use data from environment variables, For example, there are environmental variables 测试=YES, When sending data {{env.测试}} It will be replaced with YES.
      • Placeholders can be used {{name}} To use variables in the script, For example, executing in a script $this.variableSet("变量","HELLO"); Then {{变量}} When sending, it will be replaced with HELLO
      • Status placeholders can be used {{status.name}} To use the values in the instruction state, For example, the existence of a state COUNT=1, Then {{status.COUNT}} When sending, it will be replaced with 1
      • can be used{{@func()}} To execute functions for quick calls, For example, in the above picture {{@crc16modbus($1,$2,$3,$4)}} It will be sent when, callcrc16modbus function, And execute the function with the first four attributes as parameters, Finally, the result of the function will be sent as data.
    • 描述 : Used for commenting and explaining attributes.
    • Data response analysis
    • When Bittly After receiving the response content, We can configure the formatting method for the response data, as follows:
    • After this configuration is completed, Execution in the future will automatically perform parsing operations.
    • among which:
    • 名称 : Used to describe the name of the response attribute
    • 类型 : Specify the data type of the response attribute, The supported data types are as follows: 字节(uint8), 单字节整型(int8), 字符(int8/char)无符号字符(uint8)短整型(uint16),  无符号短整型(int16)整型(int32)无符号整型(uint32), 长整型(int32)无符号长整型(uint32) , 长长整型(int64)无符号长长整型(uint64)单精度浮点型双精度浮点型字符串字节数组; For indefinite length data, For example, strings and byte arrays, You need to specify the data length.
    • 取值 : Used to display the parsed data results, When the data type is unsigned, Can specify its numerical base type.
    • 描述 : Used for commenting on attributes and other information.
    • Bittly Data visualization and analysis
Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure4
  1. Bittly Support drawing line charts based on response data, for example:
  2. The current parsing method supports the following types:
  3. [num] [num]CRLF : This parsing method is in a fixed format, The response data is [num] [num]CRLF The format, for example : 1 2 3rn4 5 6 , Among them1, 2, 3For the first channel, The first data of the second and third channels, 4,5,6For the second data.
  4. 数据帧 : The data frame format supports configuring frame headers, end of frame, data length, data type, And the number of channels
  5. 矩阵 : Matrix format refers to using all response data as parsing data, Parse by specifying data format and number of channels
  6. 格式化数据 : Format data refers to using pre configured formatting and parsing methods as templates for data parsing, And support drawing data with specified attributes. As shown in the figure above.
  7. 自定义解析 : Support custom parsing scripts for data parsing.

Bittly The control panel

When multiple instructions need to be executed frequently, Switching instructions back and forthTABIt became a rather troublesome matter, This way, we can bind the instructions that need to be executed to the button, Or use slider components to achieve fast execution of multiple instructions, And avoid switchingTABThe operation. And through the panel, it is more convenient to implement a simulated upper computer control panel.

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure5

Operation Mode

As shown in the figure above, When the panel editing is completed, You can switch to the running mode for operation.

In operating mode, You can click on the button above 日志 Use the button to expand the communication logs during the operation of the panel, To view the execution status of the corresponding instructions.

Click on the button above, 变量 Button to view variable data in the current panel.

Edit Mode

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure6

The editing mode is used to edit the content of this panel, For example, which components should be included in the panel, What variables are needed, etc. Let's take a button as an example to add a component:

0x01. Drag the button to the appropriate position on the panel

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure7

0x02. Bind instructions and parse response content into variables, After completion, click the OK button to close the configuration

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure8

0x03. Return to operating mode

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure9

This completes the instruction binding and variable binding, Other component operations are similar to this.

  •  

Bittly Automated testing

Unit Test

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure10

You can use Bittly To conduct automated testing on instructions, As shown in the figure above, You can select the command you need to test, Then click on the right workspace 创建测试用例 Button to create a test case for the instruction.

Test cases work by specifying request parameters and expected response content, During execution, Test case sending configured request parameters, After receiving the response content, Compare with expected response content, If the comparison is successful, The test passed, Otherwise, the test will fail, The execution flowchart is as follows:

Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure11
Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging toolFigure12
Related Tags
Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

《 “Bittly serial port, network, Bluetooth, HTTP, Websocket, MQTT, Modbus debugging tool” 》 有 326 条评论

Leave a Reply

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