Rockchip · AI & Linux Hub

Industrial control

Keeping an Orange Pi serial dashboard from duplicating samples after a network outage

When an Orange Pi collector is moved to ArmSoM Forge1, the serial port protocol is often easier to retain.

The difficult thing is how to restore the historical curve after the network is disconnected. Determine the unique identifier of each sampling record first, and then design the local queue and server-side confirmation to avoid duplicate points or missing segments.

Make sample identity independent of wall time

Record the equipment number, sampling sequence number and collection time. If the time has not been calibrated when the device is first powered on, the timestamp may jump. Simply relying on “the same time means duplication” will lose valid data. It should also be clear how the serial number is continued across restarts, and can be distinguished by combining the session ID.

Simulate the most repeatable moments

The server has written a batch of records, but deliberately does not send the confirmation back to the collector. The collector will retry the same batch after recovery. The server should identify duplicates based on unique identifiers, and the local queue should recycle the corresponding records only after receiving clear confirmation.

Calculate the storage limit

The capacity is estimated based on the actual disk size, sampling frequency and longest disconnection time of each record, and index overhead is reserved. During acceptance, compare the number of records on the sending end and the server, and randomly check the first and last serial numbers before and after the network is disconnected, so that there is evidence of the continuity of the curve.

Board documentation and references

ArmSoM Forge1

Products and development resources

Check the hardware revision, carrier, image and interfaces in the product documentation. An article association is not evidence that a configuration has been tested.

Explore this topic → · Learning paths →