Realize multi-ARM nodes to complete program burning of batch nodes through wireless communication

An overview of the overall design and platform

The project aims to achieve multi-ARM nodes to complete the program burning of batch nodes through wireless communication, as shown in Figure 2.1. The system is divided into three parts: the upper computer, the transmitting and receiving module and the node to be burned. The upper computer selects the node to be burned by the ID number and broadcasts the burned data through the wireless module, and each selected node receives the burned data through the wireless module. Check it after saving. The host computer software sets the parameters of the node to be burned, the directory of the burned file, the size of the transmitted data packet, the transmission rate and the like, and then packages and transmits the data to the base station, and the base station broadcasts the data through the wireless transmitting module.

Figure 2.1 a data-cke-saved-href='http://multi-node' href='http://multi-node' target='_blank'/p multi-node wireless batch burning

Figure 2.1 Multi-node wireless batch burning

The overall idea is to compare existing code with object code. The difference between the two is broadcast over the wireless network (802.15.4). At each receiving node, according to the received difference file (that is, the patch file patch), the original code is modified (patching process) to achieve the purpose of updating the program.

Overall, the project has two major difficulties, involving clever algorithm design.

1. How to use the least number of bytes to represent the difference between different codes?

2. How to ensure reliable transmission?

Regarding question 1, we know that the fewer bytes to be transmitted, the lower the communication requirements. Updating the program will be more efficient. And the small number of bytes also means that fewer packets are lost. Regarding question 2, since we are going to fix the code, a one-byte error may cause the entire program to crash. This is unacceptable for embedded programs, especially those running on thousands of nodes, and must be 100% correct. In addition to these two difficulties (also a key point), there are some additional requirements. If it is satisfied, it can improve the durability of the system. They are:

1. Use as little RAM as possible. Because the RAM of the embedded chip is generally precious.

2. Consumption as little energy as possible.

3. Update speed as fast as possible.

The hardware platform used by the project is our self-made smart car eMouse. The platform uses TI's 32-bit Stellaris LM3S1968 microprocessor, operating at 50MHz, including 256 KB single-cycle Flash and 64 KB single-cycle SRAM. The flash supports user-managed block protection and data programming; the on-board Zigbee module runs through the serial port. CPU communication, the module only provides the MAC layer service, and the CPU and the module transmit data through the serial port in the form of MAC frames. The appearance of the eMouse is shown in Figure 2.2.

Figure 2.2 Hardware Platform eMouse

Figure 2.2 Hardware Platform eMouse

The project development system environment is Ubuntu9.04, the program compilation and download tools are open source sourcery G++ and Openocd, and the user interface is written in java language.

The system design is discussed in detail in the following sections.

Second program update design and implementation

Some traditional update methods focus on the characteristics of the code itself. For example, the function is the basic update unit. Run a dynamic linker on each node to relink the new function to the original program. In fact, the code itself can treat it as a string of binary text files. The code is updated from a bunch of old text to a new set of text.

To this end we define a series of basic update operation commands, as well as two auxiliary index pointers: in_index and out_index. In_index represents the current index value of the input file, and out_index represents the current index value of the output file.

The basic commands are as follows:

Copy: Copy the byte pointed to by in_index to out_index, and add 1 to in_index and out_index respectively.

Replace A: Replace the byte pointed by the current out_index with A, and increment the in_index and out_index by 1.

Delete: in_index is incremented by 1, and out_index is unchanged. Actually delete the byte pointed to by in_index

Insert A: Insert A at the current out_index, in_index is unchanged, and out_index is incremented by 1.

Kill: Indicates all the original program code after deleting in_index.

It contains the following sub-problems:

2.1 representation of the command

Through the combination of the basic commands mentioned above, we can express the process from an old file to a new file. This has brought a problem. How should these commands be expressed in order to reduce the size of the patch file (combination of commands) as much as possible?

There are a few things to note:

If there are consecutive Copy commands, we can combine them into a single command, just add the Length parameter indicating the length after Copy.

Similarly, if there are consecutive Delete commands, you can also combine them into one command, just add the Length parameter indicating the length after Delete.

If you can use the Replace command, do not use the combination of the Delete and Insert commands. This is actually another important sub-question: How do you generate as few patch files as possible based on these commands?

There are five basic commands, so at least 3 bits are required to distinguish the five commands.

Since most of the time, most of the updates are parameters of the program. In other words, the number of Copy commands is much larger than other commands. We define these five commands as shown in the following table:

48v100Ah Lithium Ion Battery

ZTTEK Batteries, For 5G backup base station .Customize the lithium ion battery packs according to the application and product requirements of the customers.
Lithium ion battery integration requires a special set of skill and expertise to optimize the performance and battery life.ZTTEK Batteries , using the most advanced technology delivers the best quality battery packs.
Our batteries are safe to use, better performance, higher shelf life and a very low maintenance cost.

48V100Ah Lithium Ion Battery,Lithium-Ion Battery For Home Backup Electricity,Lithium Ion Battery 48V 100Ah,48V Lithium Iron Phosphate Battery

Jiangsu Zhitai New Energy Technology Co.,Ltd , https://www.zhitainewenergy.com