CN109040752B - Automatic debugging system for smart television - Google Patents

Automatic debugging system for smart television Download PDF

Info

Publication number
CN109040752B
CN109040752B CN201811198357.XA CN201811198357A CN109040752B CN 109040752 B CN109040752 B CN 109040752B CN 201811198357 A CN201811198357 A CN 201811198357A CN 109040752 B CN109040752 B CN 109040752B
Authority
CN
China
Prior art keywords
debugging
command
module
serial port
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811198357.XA
Other languages
Chinese (zh)
Other versions
CN109040752A (en
Inventor
曾品超
刘军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201811198357.XA priority Critical patent/CN109040752B/en
Publication of CN109040752A publication Critical patent/CN109040752A/en
Application granted granted Critical
Publication of CN109040752B publication Critical patent/CN109040752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of intelligent television software, and discloses an automatic debugging system for an intelligent television, which is used for automatically debugging the intelligent television and reducing the time investment of field debugging management personnel or factory testing personnel. The invention comprises PC end software and television end software; the television software comprises a service processing module and a sub-function module, wherein the service control module comprises a serial port command receiving and transmitting control unit, a command analysis and verification unit, an information packaging unit and a command execution control unit; the command execution control unit distributes the commands analyzed and verified by the command analysis and verification unit to different sub-function modules and executes corresponding function debugging; and after receiving the debugging result fed back by the sub-function module, the control information packaging unit packages the debugging result into a serial port command, and finally sends the debugging result to the PC side software in the form of the serial port command. The method is suitable for factory debugging of the smart television.

Description

Automatic debugging system for smart television
Technical Field
The invention relates to the technical field of intelligent television software, in particular to an automatic debugging system for an intelligent television.
Background
With the popularization and development of Android smart televisions, more and more Android smart televisions are used in the use occasions of field debugging, exhibition halls, dormitories and the like, however, in the occasions, users using the televisions are mobile and generally require certain use rules, for example, limited sound in field debugging cannot be opened to the maximum, the state of the televisions can be changed due to the use of the users, the states of the televisions need to be debugged and controlled regularly, and in the traditional method, managers manually operate remote controllers to operate the functions of the televisions needing debugging one by one, so that time and labor are wasted, and the efficiency is low; the technical scheme for updating is to change the television state by importing the USB flash disk into the database, which improves efficiency, but has obvious limitation that only the attribute in the database of the television can be set, the function is single, and more complex operations cannot be executed, especially the popularization of the smart television, and more functions for operation and debugging on the smart television are available, for example, operations such as application APK installed by a user are expected to be uninstalled.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the automatic debugging system for the intelligent television is used for automatically debugging the intelligent television and reducing the time investment of field debugging management personnel or factory testing personnel.
In order to solve the problems, the invention adopts the technical scheme that: the automatic debugging system for the intelligent television comprises PC end software and television end software; the television software comprises a service processing module and a sub-function module, wherein the service control module comprises a serial port command receiving and sending control unit, a command analysis and verification unit, an information packaging unit and a command execution control unit;
the serial port command receiving and sending control unit is used for receiving and sending serial port commands, wherein the serial port commands received by the serial port command receiving and sending control unit comprise debugging information from PC (personal computer) end software, and the serial port commands sent by the serial port command receiving and sending control unit comprise debugging results;
the command analysis and verification unit is used for analyzing and verifying the serial port command received by the serial port command receiving and transmitting control unit;
the command execution control unit is used for distributing the commands analyzed and verified by the command analysis and verification unit to different sub-function modules; after receiving the debugging result fed back by the sub-function module, controlling the information packaging unit to package the debugging result into a serial port command;
the sub-function module is used for executing corresponding function debugging according to the command distributed by the command execution control unit and feeding back a debugging result to the command execution control unit.
Further, in order to perform relatively comprehensive debugging on the smart television, the sub-function modules may include a handshake protocol debugging module, a system information acquisition and setting debugging module, a network operation debugging module, a USB device debugging module, a TV/DTV function debugging module, an APK install/uninstall debugging module, an image white balance debugging module, a program source switching debugging module, a function key debugging module, a factory mode debugging module, a whole machine control debugging module, and an ADC data correction debugging module;
the handshake protocol debugging module is used for establishing handshake information debugging of the connection between the PC and the television to be tested;
the system information acquisition and setting debugging module is used for completing system version number, country, language, time zone, volume and mute setting debugging;
the network operation debugging module is used for checking LAN and wifi states and programming and debugging MAC addresses;
the USB equipment operation debugging module is used for USB upgrading and importing the USB into a database for debugging;
the TV/DTV function debugging module is used for program searching, channel increasing and decreasing, graphic caption and program cloning debugging;
the APK installation/uninstallation debugging module is used for unloading non-preset applications in batches, installing self-defined applications and obtaining application list debugging;
the image white balance debugging module is used for switching an image mode and setting white balance data for debugging;
the program source switching debugging module is used for switching a specified program source channel, and obtaining signal state and resolution debugging;
the function key debugging module is used for debugging the operation of the virtual remote controller;
the factory mode debugging module is used for debugging in a factory mode;
the whole machine control debugging module is used for controlling and debugging the whole machine;
and the ADC data correction debugging module is used for ADC data correction debugging.
Further, as a feasible manner, the serial command received and sent by the serial command receiving and sending control unit is composed of 7 fields, which are respectively:
HEADER 1: a fixed field indicating a television core type;
HEADER 2: a fixed field indicating the direction of command transmission, such as: 0x96 indicates that the command is PC to send to TV, 0x86 indicates that TV is to send to PC;
CMD: a command field for indicating the selected sub-function module required for debugging, such as checking wifi status, and the value is 0x 21;
VAL1, VAL2, VAL 3: a command parameter field including a function debugging execution detail or a returned result;
CKS: and checking the field, namely checking the correctness of the data by adopting a checksum mode.
Further, the verification process of the command parsing verification unit includes:
a. and (3) data integrity checking: putting the received command into an array, and checking whether the effective length of the array is 7;
b. and (3) data correctness checking: adopting a Checksum check mode, namely adding the 1 st to 6 th bits of the array and then adding the added bits with 0xff, and comparing the result with the 7 th bit to determine whether the result is equal or not;
c. it is checked whether the 2 nd and 3 rd bits in the array, i.e., HEADER1 and HEADER2 fields, are the correct television core type and command transmission direction.
Further, the command execution control unit is provided with an operation flag in the process of executing the command debugging, and the operation flag indicates that no new command is received in the process.
Furthermore, in the process of executing the command debugging, the command execution control unit caches the command sequence at the PC end so as to reduce the magnitude of system resource consumption in serial port debugging at the television end as much as possible.
The invention has the beneficial effects that: the service processing module and the sub-function module provided by the invention realize that the PC computer communicates with the television core through a serial port encapsulation protocol command, realize the purpose of controlling the television core to execute self-function debugging, system setting and machine configuration, realize debugging and control under various use scenes, realize automatic debugging of single function and batch function, realize visual interactive operation, reduce the debugging manpower and time input, improve the debugging efficiency and enable the television product to have market competitiveness.
Drawings
Fig. 1 is a functional block diagram of the present invention.
Fig. 2 is a flow chart of the serial port debugging service program of the present invention.
Fig. 3 is a diagram of a checksum encapsulation process for a protocol command of the present invention.
Detailed Description
The invention discloses an automatic debugging system for a smart television, which is characterized in that on an Android smart television system, connection is established with a PC computer in a serial port communication mode, and a set of communication protocol rules is designed, so that the television can correctly analyze PC computer commands to execute corresponding operations to achieve the purpose of debugging and controlling the television, and a debugging result can be returned; the PC end is designed in a visual mode, so that the operation of a user is simple and convenient, and the debugging commands are edited in batch in a script mode, so that the purpose of one-key automatic debugging is achieved.
The following describes in detail a specific embodiment of the present invention with reference to the accompanying drawings.
1. Firstly, a service processing module is required to be established at the intelligent television end to take charge of receiving and analyzing a processing command, controlling the television function debugging execution process and returning a debugging result, and the design of the service processing module adopts the following technical scheme:
1.1, starting and quitting a service processing module, wherein the starting scheme of the service is divided into a starting-up scheme and a manual starting scheme. The boot start is prepared for factory commissioning and the manual start is prepared for field commissioning. That is to say, in the field debugging mode, the user can choose not to start up, thereby reducing the consumption of the service resident memory, and only starting up the service when debugging is needed. The serial port control switch option is added in a field debugging menu, meanwhile, a starting broadcast receiver is added in the service processing module design, and the service is started only by judging the starting of a field debugging mode and the starting of a serial port control switch in the receiver. The service processing module registers another system broadcast receiver to monitor the exit event after starting, the exit service mode is that a system broadcast stopbroadcasting receiver is sent while the serial port control switch is closed or the field debugging mode is exited, the service processing module receives the broadcast and then continues to complete the good work, namely the last command is executed or exited correctly, and then kills itself and exits.
The initial state of the system is designed as a starting service processing module, after the factory debugging command script is executed, a command is added and sent to the television, and the function of the command is as follows: the service processing module is started, namely the television is manually started after leaving the factory, and a user can set a starting mode at will.
And 1.2, after the service processing module is started, starting to establish program connection with a PC (personal computer) end, wherein the connection protocol uses an RS232 serial port protocol. The invention also designs a set of packaging protocol format on the basis of the standard protocol, and the packaging protocol design scheme of the serial port command is as follows:
the serial port command consists of 7 fields, which are respectively as follows:
HEADER 1: a fixed field indicating a television core type;
HEADER 2: a fixed field indicating the direction of command transmission, such as: 0x96 indicates that the command is PC to send to TV, 0x86 indicates that TV is to send to PC;
CMD: a command field for indicating the selected sub-function module required for debugging, such as checking wifi status, and the value is 0x 21;
VAL1, VAL2, VAL 3: a command parameter field including a function debugging execution detail or a returned result;
CKS: and checking the field, namely checking the correctness of the data by adopting a checksum mode.
1.3, according to the protocol command, after receiving the command sent by the PC, the tv service processing module firstly checks the accuracy of the command, and the checking process is as follows:
a. and (3) data integrity checking: putting the received command into an array, and checking whether the effective length of the array is 7;
b. and (3) data correctness checking: adopting a Checksum check mode, namely adding the 1 st to 6 th bits of the array and then adding the added bits with 0xff, and comparing the result with the 7 th bit to determine whether the result is equal or not;
c. the 2 nd and 3 rd bits in the array, i.e., the HEADER field, are checked for the correct television core type and command transmission direction.
After the 3 items are checked, it means that the correct command is received, and the 3 rd to 6 th bits of the command array are repackaged into a new command and sent to the command execution control unit, because there are many functions to be debugged, the command execution control unit needs to distribute the command to different sub-modules to execute corresponding function debugging, and the distribution basis is the 1 st bit field of the new array, that is, the CMD field of the original command.
1.4, the first command to be executed by the command execution control unit is a handshake command, that is, to debug other functions of the television, the command must first receive the handshake command sent by the PC, the service processing module receives the handshake command, then stores a flag and returns a handshake command to the PC, and when receiving each other and confirming that the handshake is successful, the command execution control unit can start the debugging of other functions.
The debugging of the function is based on the command field and the parameter field in the serial port command, the command field determines what function debugging is executed, the parameter field determines the execution details of the function, the command execution control unit defines all the command fields in the protocol in an array by macro definition in advance, and the received command is searched and matched in the array. And entering the corresponding sub-function module to execute debugging after the search is correct, and otherwise, returning PC error command information.
The sub-function module comprises a handshake protocol debugging module, a system information acquisition and setting debugging module, a network operation debugging module, a USB device debugging module, a TV/DTV function debugging module, an APK (android package) installation/uninstallation debugging module, an image white balance debugging module, a program source switching debugging module, a function key debugging module, a factory mode debugging module, a whole machine control debugging module and an ADC (analog to digital converter) data correction debugging module; wherein: the handshake protocol debugging module is used for establishing handshake information debugging of the connection between the PC and the television to be tested; the system information acquisition and setting debugging module is used for completing system version number, country, language, time zone, volume and mute setting debugging; the network operation debugging module is used for checking LAN and wifi states and programming and debugging MAC addresses; the USB equipment operation debugging module is used for USB upgrading and importing the USB into a database for debugging; the TV/DTV function debugging module is used for program searching, channel increasing and decreasing, graphic caption and program cloning debugging; the APK installation/uninstallation debugging module is used for unloading non-preset applications in batches, installing self-defined applications and obtaining application list debugging; the image white balance debugging module is used for switching an image mode and setting white balance data for debugging; the program source switching debugging module is used for switching a specified program source channel, and obtaining signal state and resolution debugging; the function key debugging module is used for debugging the operation of the virtual remote controller; the factory mode debugging module is used for debugging in a factory mode; the whole machine control debugging module is used for controlling and debugging the whole machine; and the ADC data correction debugging module is used for ADC data correction debugging.
Taking DTV searching program as an example, the debugging method of the invention is:
the DTV searches for a program, commands CMD 0x46, VAL 10, VAL 20, VAL3 searching for a channel number, and the command execution control unit macro defines the commands in advance as:
public static final int CMD_SET_DTVSCAN=0x46。
and when the command is successfully matched, opening a channel searching interface, transmitting the parameter VAL3 to the channel searching module, and starting channel searching.
The command execution control unit sets an operation mark in the process of executing the command debugging, a new command is not allowed to be received in the process, and the command sequence is designed to be cached at the PC end instead of the television end, so that the magnitude of system resource consumption in serial port debugging at the television end is reduced as much as possible. Similarly, in the process of executing the command, the violent exit of the serial port service is not allowed, and the exit process of the last executed command must be correctly finished. For example, in the above channel searching and debugging process, if the serial port service directly exits, the system bottom layer function software is still in the channel searching state, and it looks that the serial port service exits, but the television cannot operate because the bottom layer is still in the channel searching state.
The command execution control unit waits for the end of channel searching, stores programs after the channel searching module executes the channel searching in the waiting process, and then calls an interface of the program management module to acquire the current program number and returns the current program number to the PC terminal.
1.5, the information returned to the PC by the tv is also in the same format of the naming protocol by sending a serial command, and as described above, the information is distinguished by HEADER2 field, the returned information is first encapsulated into the command format, and the specific scheme is as follows:
the command execution control unit acquires command execution result information and stores the command execution result information in fields of VAL1, VAL2 and VAL3, wherein the VAL3 is the program number as the program searching and debugging are described above;
adding CMD and HEADER fields;
calculating CKS fields by adopting a checksum mode:
CKS=(HEADER1+HEADER2+CMD+VAL1+VAL2+VAL3)&0xFF。
and after the command is packaged, writing the command into a serial port buffer area and sending the command to the PC.
2. The software design scheme of the PC end is to develop a window application by VC + +, and the application program mainly comprises three parts: the system comprises a serial port transceiving service, a protocol layer command control unit and a visual window program, and the specific scheme is as follows:
2.1, serial port receiving and transmitting service, which is mainly used for calling Windows system service, and is responsible for establishing a link with a television core, setting protocol parameters such as baud rate and the like, and receiving and transmitting data of a serial port protocol layer.
2.2, a protocol layer command control unit, wherein the protocol refers to a command protocol designed in the invention. The module function corresponds to the command execution control unit of the core end of the television. Command encapsulation, transmission, reception and verification also follow the design rules described in the service processing module. Different from the television core side, the PC side controls the buffering of commands and the selection and control of execution modes.
The execution mode design is divided into a single step mode and a batch mode, a protocol layer command control unit needs to be compatible with the two modes at the same time, and in the single step mode, the command of the window program only needs to be received and then sent to a television end, and the command is transmitted to the window program for display after the television end returns information; in the batch mode, the script files need to be read, the instructions are controlled to be read one by one, the instruction execution progress is controlled, execution exception, interruption and the like are processed, and the execution result is written into the files.
2.3, visualization window program, namely window interactive unit, the protocol command designed by the invention is not suitable for common users, therefore, a humanized interactive interface is designed, all operable functions are listed in the interface design in a hierarchical manner, the editing can be very convenient, the function names actually correspond to the CMD fields of the protocol command, the functions are described in the language of the user, and the user only needs to edit the parameter part.
The editing and executing commands design a plurality of selectable modes, and the scene selection is divided into a factory mode and a field debugging mode, wherein the factory mode allows debugging all functions which can be debugged in the scheme of the invention, and the field debugging mode is a subset of the field debugging mode. In each scene, a single-step execution mode and a batch execution mode are divided.
In the batch mode, a user can select batch editing commands and then save the scripts, the command scripts can be imported in next debugging without editing every time, in addition, the debugging result files can be directly read and saved after batch execution, and multiple times of debugging and comparison can be realized. The whole process realizes one-key debugging, the debugging process does not need manual participation, and automatic debugging is realized.
In summary, the invention includes PC end software and television end software; the television software comprises a service processing module and a sub-function module, wherein the service control module comprises a serial port command receiving and sending control unit, a command analysis and verification unit, an information packaging unit and a command execution control unit;
the serial port command receiving and sending control unit is used for receiving and sending serial port commands, wherein the serial port commands received by the serial port command receiving and sending control unit comprise debugging information from PC (personal computer) end software, and the serial port commands sent by the serial port command receiving and sending control unit comprise debugging results;
the command analysis and verification unit is used for analyzing and verifying the serial port command received by the serial port command receiving and transmitting control unit;
the command execution control unit is used for distributing the commands analyzed and verified by the command analysis and verification unit to different sub-function modules; after receiving the debugging result fed back by the sub-function module, controlling the information packaging unit to package the debugging result into a serial port command;
the sub-function module is used for executing corresponding function debugging according to the command distributed by the command execution control unit and feeding back a debugging result to the command execution control unit.
Further, in order to perform relatively comprehensive debugging on the smart television, the sub-function modules may include a handshake protocol debugging module, a system information acquisition and setting debugging module, a network operation debugging module, a USB device debugging module, a TV/DTV function debugging module, an APK install/uninstall debugging module, an image white balance debugging module, a program source switching debugging module, a function key debugging module, a factory mode debugging module, a whole machine control debugging module, and an ADC data correction debugging module;
the handshake protocol debugging module is used for establishing handshake information debugging of the connection between the PC and the television to be tested;
the system information acquisition and setting debugging module is used for completing system version number, country, language, time zone, volume and mute setting debugging;
the network operation debugging module is used for checking LAN and wifi states and programming and debugging MAC addresses;
the USB equipment operation debugging module is used for USB upgrading and importing the USB into a database for debugging;
the TV/DTV function debugging module is used for program searching, channel increasing and decreasing, graphic caption and program cloning debugging;
the APK installation/uninstallation debugging module is used for unloading non-preset applications in batches, installing self-defined applications and obtaining application list debugging;
the image white balance debugging module is used for switching an image mode and setting white balance data for debugging;
the program source switching debugging module is used for switching a specified program source channel, and obtaining signal state and resolution debugging;
the function key debugging module is used for debugging the operation of the virtual remote controller;
the factory mode debugging module is used for debugging in a factory mode;
the whole machine control debugging module is used for controlling and debugging the whole machine;
and the ADC data correction debugging module is used for ADC data correction debugging.
Fig. 1 shows the main functional modules and the interaction relationship of the present invention, and the service control module at the tv end is the core of the present invention and is responsible for the control and analysis of command receiving and sending, function debugging process control, and package return information; the sub-function module is a target function of debugging; and the PC terminal protocol layer command control unit is responsible for interacting with the television through a windows bottom layer serial port interface, sending and controlling script batch commands, storing return information and the like, and interacting with the window interface to receive user control.
Further, the serial port command field of the present invention is composed of 7 fields, which are respectively:
HEADER 1: a fixed field for indicating a television core type;
HEADER 2: a fixed field for indicating the command transmission direction, such as: 0x96 indicates that the command is PC to send to TV, 0x86 indicates that TV is to send to PC;
CMD: a command field for indicating a function module to be debugged, such as checking wifi status, which is 0x 21;
VAL1, VAL2, VAL 3: command parameter field, which is used for function debugging execution details or returned results;
CKS: and checking the field, namely checking the correctness of the data by adopting a checksum mode.
Further, the verification process of the command parsing verification unit includes:
a. and (3) data integrity checking: putting the received command into an array, and checking whether the effective length of the array is 7;
b. and (3) data correctness checking: adopting a Checksum check mode, namely adding the 1 st to 6 th bits of the array and then adding the added bits with 0xff, and comparing the result with the 7 th bit to determine whether the result is equal or not;
c. it is checked whether the 2 nd and 3 rd bits in the array, i.e., HEADER1 and HEADER2 fields, are the correct television core type and command transmission direction.
Further, the command execution control unit is provided with an operation flag in the process of executing the command debugging, and the operation flag indicates that no new command is received in the process. In the process of executing the command debugging, the command execution control unit caches the command sequence at the PC end so as to reduce the magnitude of system resource consumption in serial port debugging at the television end as much as possible.
Examples
According to the method of the invention, the embodiment firstly makes a specific protocol command format and all function debugging CMD commands, specifically:
configuration of a serial port protocol: the baud rate is 115200, the data bit is 8, the parity is none, and the stop bit is 1.
The serial port command format: HEADER1-HEADER2-CMD-VAL1-VAL2-VAL3-CKS, for a total of 7 fields.
PC side transmission instruction data (TX): 0x 360 x96 CMD VAL1 VAL2 VAL3 CKS.
Television return command data (RX): 0x 360 x86 CMD VAL1 VAL2 VAL3 CKS.
For example: the accompanying sound balance debugging function is defined as: CMD is 0x5A, and VAL3 is balance, i.e., the sound balance value. The HEADER1 field is defined as 0x36 and represents the television core, the HEADER2 field is defined as 0x96 and 0x86 and represents the receiving and transmitting of the television core respectively, and the television core of the project formulates 109 CMD debugging commands in total, and the debugging and the control of the main function point of the television are covered.
After the protocol command is customized, a serial port debugging service program UartService of the television end is compiled, the UartService is compiled into an application APK, and the application APK is prefabricated at the core end of the television and installed in a system.
The UartService starting and exiting logic is firstly written in the UartService, the starting is divided into starting and hotel service mode starting, namely manual starting, and the exiting is performed after the hotel service mode exiting and the PC end exiting command are received. Therefore, the startup broadcast receiver is programmed in UartService to be responsible for startup, and the serial port control option is programmed in the hotel service mode menu to be responsible for manual startup and exit.
Writing a logical code for starting a serial port receiving command, mainly starting a switching serial port from a console mode to a communication mode after a UartService is started, and registering a data broadcast receiver in the communication mode.
Next, core code logic of the command execution control unit is developed, and the specific logic is as follows:
after data are received in a broadcast mode, the data are analyzed and verified through a command, command data are correctly identified and then enter a command distribution control program, the program enters a corresponding function debugging process according to a specific CMD field, and the debugging of the following sub-function modules is included:
1) the handshake protocol debugging module: establishing handshaking information debugging of connection between the PC and the television, wherein the debugging is the premise that other modules can be debugged;
2) the system information acquisition and setting debugging module: setting and debugging the system version number, country, language, time zone, volume, mute and the like;
3) the network operation debugging module: checking LAN and wifi states, programming MAC addresses and the like;
4) the USB equipment operation debugging module: USB upgrading, namely importing the USB into a database for debugging;
5) a TV/DTV function debugging module: debugging such as program searching, channel adding and subtracting, graphic caption, program cloning and the like;
6) APK installation/uninstallation debugging module: unloading non-preset applications in batches, installing self-defined applications, and obtaining application list debugging;
7) the image white balance debugging module: switching an image mode, and setting white balance data debugging;
8) the program source switching and debugging module: switching a specified program source channel, and obtaining information debugging such as signal state, resolution ratio and the like;
9) the function key debugging module is operated by the virtual remote controller and returns a correct corresponding result for debugging;
10) a factory mode debugging module: debugging a factory mode;
11) the whole machine controls the debugging module: complete machine control debugging
12) ADC data correction debugging module: and correcting and debugging ADC data.
Writing a control program to call the functional interface, controlling the debugging execution process, obtaining the execution result, packaging the result information into a command protocol format and sending the command protocol format to the PC terminal.
Writing PC end software, wherein the PC end software writes a window program by using VC + + and simultaneously writes an initial debugging script, each action in the debugging script format is a command, each field of the command is separated by a blank space, the initial debugging script comprises a factory debugging script and a field debugging script, the two modes corresponding to batch debugging are corresponded, and other self-defined modes can be edited by a user.
Fig. 2 depicts a serial port service debugging process in the present invention, two monitors are registered after the serial port service is started, and a debugging command of the PC end and a user quit broadcast are respectively received, the debugging process requires that the handshaking connection with the PC is successful first, the execution needs to be blocked during the debugging function process, a running flag is added in the program, and when the quit broadcast is received, the quit can be performed only after the completion of the function debugging of the current blocked execution.
Fig. 3 shows the encapsulation and verification process of the protocol command of the present invention, and the television side and the PC side follow the same protocol, so as to achieve the purpose of communication, wherein the verification adopts a checksum mode.

Claims (6)

1. The automatic debugging system for the intelligent television is characterized by comprising PC end software and television end software; the television software comprises a service processing module and a sub-function module, wherein the service processing module comprises a serial port command receiving and sending control unit, a command analysis and verification unit, an information packaging unit and a command execution control unit;
the serial port command receiving and sending control unit is used for receiving and sending serial port commands, wherein the serial port commands received by the serial port command receiving and sending control unit comprise debugging information from PC (personal computer) end software, and the serial port commands sent by the serial port command receiving and sending control unit comprise debugging results; after the serial port service of the service processing module is started, two monitors are registered, a debugging command of a PC end and a user exit broadcast are respectively received, a handshaking connection with the PC is required to be successfully carried out in a debugging process, blocking execution is required in a debugging function process, a running mark is added in a program, and when the exit broadcast is received, exiting can be carried out only by waiting for the completion of the function debugging of the current blocking execution;
the command analysis and verification unit is used for analyzing and verifying the serial port command received by the serial port command receiving and transmitting control unit;
the command execution control unit is used for distributing the commands analyzed and verified by the command analysis and verification unit to different sub-function modules; after receiving the debugging result fed back by the sub-function module, controlling the information packaging unit to package the debugging result into a serial port command;
the sub-function module is used for executing corresponding function debugging according to the command distributed by the command execution control unit and feeding back a debugging result to the command execution control unit.
2. The automatic debugging system for smart TV of claim 1, wherein the sub-function modules comprise a handshake protocol debugging module, a system information acquisition and setting debugging module, a network operation debugging module, a USB device debugging module, a TV/DTV function debugging module, an APK install/uninstall debugging module, an image white balance debugging module, a program source switching debugging module, a function key debugging module, a factory mode debugging module, a whole machine control debugging module, and an ADC data correction debugging module;
the handshake protocol debugging module is used for establishing handshake information debugging of the connection between the PC and the television to be tested;
the system information acquisition and setting debugging module is used for completing system version number, country, language, time zone, volume and mute setting debugging;
the network operation debugging module is used for checking LAN and wifi states and programming and debugging MAC addresses;
the USB equipment operation debugging module is used for USB upgrading and importing the USB into a database for debugging;
the TV/DTV function debugging module is used for program searching, channel increasing and decreasing, graphic caption and program cloning debugging;
the APK installation/uninstallation debugging module is used for unloading non-preset applications in batches, installing self-defined applications and obtaining application list debugging;
the image white balance debugging module is used for switching an image mode and setting white balance data for debugging;
the program source switching debugging module is used for switching a specified program source channel, and obtaining signal state and resolution debugging;
the function key debugging module is used for debugging the operation of the virtual remote controller;
the factory mode debugging module is used for debugging in a factory mode;
the whole machine control debugging module is used for controlling and debugging the whole machine;
and the ADC data correction debugging module is used for ADC data correction debugging.
3. The automatic debugging system for smart television of claim 1, wherein the serial command received and transmitted by the serial command receiving and transmitting control unit consists of 7 fields, which are respectively:
HEADER 1: a fixed field indicating a television core type;
HEADER 2: a fixed field indicating a command transmission direction;
CMD: a command field for indicating the selected sub-function module required by debugging;
VAL1, VAL2, VAL 3: a command parameter field including a function debugging execution detail or a returned result;
CKS: and checking the field, namely checking the correctness of the data by adopting a checksum mode.
4. The auto-debugging system for smart tv of claim 3, wherein the verification process of the command parsing verification unit comprises:
a. and (3) data integrity checking: putting the received command into an array, and checking whether the effective length of the array is 7;
b. and (3) data correctness checking: adopting a Checksum check mode, namely adding the 1 st to 6 th bits of the array and then adding the added bits with 0xff, and comparing the result with the 7 th bit to determine whether the result is equal or not;
c. it is checked whether the 2 nd and 3 rd bits in the array, i.e., HEADER1 and HEADER2 fields, are the correct television core type and command transmission direction.
5. The auto-debugging system for smart tv of claim 1, wherein the command execution control unit sets a run flag during the execution of the command debugging, the run flag indicating that no new command is received during the process.
6. The automatic debugging system for intelligent televisions according to claim 1, wherein the command execution control unit caches the command sequence at the PC side during the execution of the command debugging.
CN201811198357.XA 2018-10-15 2018-10-15 Automatic debugging system for smart television Active CN109040752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811198357.XA CN109040752B (en) 2018-10-15 2018-10-15 Automatic debugging system for smart television

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811198357.XA CN109040752B (en) 2018-10-15 2018-10-15 Automatic debugging system for smart television

Publications (2)

Publication Number Publication Date
CN109040752A CN109040752A (en) 2018-12-18
CN109040752B true CN109040752B (en) 2020-03-24

Family

ID=64613068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811198357.XA Active CN109040752B (en) 2018-10-15 2018-10-15 Automatic debugging system for smart television

Country Status (1)

Country Link
CN (1) CN109040752B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111203869B (en) * 2018-11-21 2021-12-17 深圳市优必选科技有限公司 Robot system maintenance method and device, robot and readable storage medium
CN110647490B (en) * 2019-10-22 2021-09-07 深圳市康冠智能科技有限公司 Data transmission method, device, equipment and computer storage medium
CN110830850A (en) * 2019-10-31 2020-02-21 四川九州电子科技股份有限公司 Debugging information acquisition method of android set top box
CN112235078A (en) * 2020-10-14 2021-01-15 四川长虹教育科技有限公司 Method for realizing Android and Windows communication under intelligent interactive large screen
CN112423129A (en) * 2020-10-26 2021-02-26 四川长虹电器股份有限公司 Voice debugging system and method for smart television
CN112579435B (en) * 2020-11-27 2022-06-21 福州智象信息技术有限公司 Method and system for debugging HTML5APP on intelligent Linux television operating system
CN115225889A (en) * 2022-05-12 2022-10-21 四川长虹网络科技有限责任公司 Method for automatically detecting hardware interface of embedded product through serial port

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231843A (en) * 2011-06-15 2011-11-02 中山大学 Verification platform for digital television integration test
CN103176877A (en) * 2013-03-21 2013-06-26 广东欧珀移动通信有限公司 Method and system for debugging peripheral of embedded device
US9571826B1 (en) * 2014-11-05 2017-02-14 CSC Holdings, LLC Integrated diagnostic and debugging of regional content distribution systems
CN205375453U (en) * 2016-01-27 2016-07-06 珠海格力电器股份有限公司 Debug system

Also Published As

Publication number Publication date
CN109040752A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109040752B (en) Automatic debugging system for smart television
US6173438B1 (en) Embedded graphical programming system
CN101521899B (en) System and method for on-computer test of mobile applications
CN105260315B (en) A kind of method of the debugging log in embedded system process
CN103634592A (en) Automatic test method and system for intelligent televisions
CN102665094A (en) Test method of set-top box and test system thereof
CN103316472A (en) Android device gas platform system based on Bluetooth handle and implementation method of Android device gas platform system
CN104427388A (en) Operating system of intelligent television
EP3295311B1 (en) Method and system for automating the process of testing of software application
KR20020027467A (en) Running and testing applications
CN101807168A (en) Testing environment of digital terminal for supporting edition compatibility and building method thereof
CN111194046A (en) Automatic WIFI module testing system and method
CN107122219A (en) The acquisition methods and device of installation file
CN113672441A (en) Method and device for testing intelligent equipment
CN112332997A (en) Network distribution method of terminal equipment, terminal equipment and computer readable storage medium
CN106294119B (en) Test scheduling system and method and terminal equipment
EP0968465B1 (en) Television or radio control system development for mpeg
US11144370B2 (en) Communication method for virtual machines, electronic device, and non-transitory computer readable storage medium
CN105657551A (en) Method and apparatus used by smart television to respond to analog key
CN113407214B (en) Reconfigurable multithreading parallel upper computer system based on can communication
CN110278480A (en) TV channel pre-setting method, device, computer equipment and readable storage medium storing program for executing
CN110851370A (en) Program testing method and device, and storage medium
CN113934619A (en) Sound source testing method, system and storage medium based on Robot Framework testing Framework
CN106210897B (en) set top box automatic test method based on serial port and system thereof
CN107220090A (en) Start the method and apparatus of embedded software in external equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant