Android (Linux) real-time monitoring serial data

Source: Internet
Author: User

Before doing wince car solution, had done a small tool tracemonitor, used to display the debugging information of the application on the wince system, especially in the real car debugging, to display the can box and the host serial data. Because of the need to seize the market opportunity, often in the new car before the market, you have to cooperate with can decoder box manufacturers to debug car end software. At this time, Tracemonitor may be in great useful. When it comes to what side of the problem is not clear, grasp the data to see, it is clearly. Sometimes the end customer's machine has a problem with the original car function, can also directly run the tool, real-time crawl serial data provided to us to analyze the cause of the problem. However, the tool requires special processing of business applications, is not universal, and is implemented at the application level, which may have an impact on performance, but is less powerful. Once with Gyp debugging RK3188 Android car navigation, car end always receive data, hardware engineers said can box will send, tangled half a day, finally can only use USB to the serial board to see on the computer, the data is there, but the frame format is not correct. It's a lot easier if you have a tool on Android that can crawl serial data in real time.

"The use of Android (Linux) wiring procedures" has been mentioned in the adjustment of the android underlying serial communication framework using the line procedures, accidental discovery can be easily in the drive to monitor the serial transceiver data, and then write an application with the display can be. Say dry, toss a little tool, convenient yourself, also convenient for others.

The idea has, the implementation is not complicated, first write a character drive Bonovo_mon, used to cache the data sent and received in the line discipline, the application common use FileInputStream to read the character device data and display. For the convenience of the use, the implementation of data frame filtering, hexadecimal display, data storage, send saved data to the designated mailbox and other functions, more powerful than wince under the tracemonitor, can monitor the communication serial data, business apps do not need to do any special processing, And only when the character driver Bonovo_mon is opened to the line code registration request cache data, so do not run common, the system has little impact.

The use of the common interface and the main functions are shown below.

Android (Linux) real-time monitoring serial data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.