Title of Invention

A METHOD OF RECEIVING DEBUG MESSAGES OVER NETWORK/PRINTER

Abstract This invention relates in general to Embedded System Field for any electronic devices which have Network card or Printer as a part of the device. More particularly, this invention relates to a method of getting debug message over network / printer wherein a debug print function creates the debug string message and stores the same in two global buffers alternatively where the two global buffers gets filled up alternatively once one gets full.
Full Text FIELD OF INVENTION
This invention relates in general to Embedded System Field for any electronic devices which have Network card or Printer as a part of the device. More particularly, this invention relates to a method of getting debug message over network / printer.
DESCRIPTION OF RELATED ART
While developing some new application on firmware for any electronic device its always be a requirement to find the code flow and do unit testing for the same. There is some software available to help into the same but those are costly and most of the time for debugging developer use to put debug print statements and use to see the same on hyper-terminal using debug port and serial cable to the host PC. Connecting debug port creating hyper-terminal on PC is always be a time consuming job at the same time developer always need to keep the developing device next to his system, so it is favorable if developer can find some shortcut way to get all the debug print information. Now a days there are a number of electronic devices available which have the network and printing related functionalities Ex. Sending Email, Sending information to PC through Network, printing etc.
In present scenario the electronic devices like Printers, MFP etc. have some driver to write any debug message on debug port and the same can be capture on PC using Hyper Terminal through serial cable. The developers use to add debug print statement in their code and the print statement take all the variable input and form a string internally for each input variable. The input can be any type like int, char, char string etc. Once the debug prints statement form a string for each input parameter it starts using writing the same on serial debug port. Through debug port the string message use to transmit using serial cable and can be view on PC by creating port through hyper terminal. The Hyper - terminal is a common utility comes along with Windows operating system. After getting and capturing all the messages the developer use to analyze and find the exact

flow of their code for debugging purpose.
At the same time the existing devices have a number of other features like printing and some network related applications. The printing module is use to print device specification, status etc reports as well as print document from PC also. The network related applications are Scan to Email, Sending Alert email for system, Configuring device through web user interface, Network scanning etc.
In general in printing module while printing reports the application use to call functions for setting different types of font, offset and size and pass the string to print the same. In the network related module generally the network card use to be separate from the main board. There is always a specific protocol for each application (Ex. Scan to Email, Sending Alert email for system, Configuring device through web user interface, Network scanning) to establish communication between network card and main board through shared memory (SM). As per the message getting from main board through SM the network card respond and send data on network accordingly.
The existing scenario has the following Issues:
1. Most of the embedded system device does not have monitor to display print messages so for capturing the debug message we need to use serial port connecting to PC which is time consuming as the same required arranging the full setup for serial cable, debugging port PC etc.
2. The embedded system software are very time sensitive so some time we use to get different results with and without enabling debug print statement as writing data on serial port is slow which internally add some delay.
3. In existing scenario each developer should have one debug port and
serial cable and the machine next to his PC which is costly.
4. In existing scenario if some client reported some issue then the
developer use to invest a lot of time to arrange the same system, understand and simulate the same conditions for debugging the same

or the developer has to visit the client site for the same.
US Patent No. 6732307 titled "Apparatus and Method for Storing Trace Information" describes capturing of debug messages and use of a volatile memory to store the debug messages. The patent also describes a method to send the debug messages to an external system. The described method is related to the host system where the embedded system is being installed. The debug messages, generated by the embedded systems, are captured by the host system and are then stored in a volatile memory. The captured messages can be sent to a vendor by an email. However, the system described in the patent is implemented in a host system and not in a network, and the system cannot capture the debug messages generated by any other embedded system present in a network.
Another US Patent No. 20030023956 titled "Embedded Device Monitoring Agent" describes a software application to capture and store debug messages and a method to send the debug messages to a remote host over a communication link. The software can be used to capture the debug messages generated during a software application execution. However, the software cannot be used to capture the debug messages generated by any other embedded device in a network.
SUMMARY OF THE INVENTION
The present invention relates to a method of capturing debug messages generated by embedded systems and sending debug messages over a network by emails. An embedded system is a special purpose computer system built into a larger device. The embedded systems such as automatic teller machines, computer network equipments have a source code that may generate debug message at run time. The developers generally add debug print statement in the source code and the debug messages can be printed, or viewed on a host PC through a debug port and a serial cable. The invention describes a method for capturing debug messages, generated by the embedded devices with

networking and printing functionalities. The debug messages are captured and stored at a volatile memory of the existing network module or at a printer module. Once the volatile memory is saturated, the debug messages are sent to the system using either an email or alert mail. The debug messages are either sent through the existing network module or printed through the printer module. In case a vendor enables the feature to receive the debug messages, the debug messages are sent to the vendor. The method enables the vendor to receive the debug messages on its terminal and hence results in quick debugging of the source code.
Accordingly the present invention proposes a method for providing support for getting debug messages over network through any network related existing module on the device like (Sending Email, Net Scan etc) or getting debug messages through printer, the method for configuring the setting for this feature through LUI and WUI and the method for capturing module specific debug messages as per user selected modules.
Accordingly, this invention explains a method of getting debug message over network/printer wherein a debug print function creates the debug string message and stores the same in two global buffers alternatively where the two global buffers gets filled up alternatively once one gets full.
Each time before filling the global buffer a check is done to check whether the buffers are adapted to hold the new data string or not. If the buffer is full then a flag get set to start filling another global buffer. After the flag is set a check is made for getting the debug message over printer where if the user configures the printer then the same message is send to printer task which internally print all the debug message data. If the user doesn't configure printer as for getting debug message data then a check is made for user configuration of network application for the same. If user configures network application then an event is send to the same task and after receiving the event it creates data packet for debug message where the task passes the network information to network card through a shared memory. After writing network information the debug message

data passes to network card through shared memory where the network card sends the said data over the network. A user interface is providing for enable/disable the debugging feature and for selecting an existing module which is used for capturing debug message data. Network related features are configured prior to the operation of said debugging. The captured debug message is analyzed on host system once the message gets received from the network. There are two global buffers, one flag, one semaphore, one position indicator and one user interface selection buffer for performing the said method.
The first global buffer is used to store all debug print message, for sending over network or for printing automatically or as per user request. The second global buffer is used to store all the debug print message, for sending over network or for printing automatically or as per user request. A global flag is maintained that indicates which global buffer first or second needs to be sent over network or printer. The holding value 1 in the global flag indicates first global buffer needs to be sending over network or printer and 2 indicate second global buffer needs to be sending over network or printer. Semaphore is used for synchronization purpose where each time when the data packet needs to send over network or printer the same is acquired and released once the job gets completed. The position indicator flag is used to get the filled size of active global buffer. The selection flag provides information about the user selection value. One interface function is used to call in the debug message logging function. The interface function is used to check if the status flag is not equal to 0 and if the said flag is equal to 0 then returns. The interface function is used to assign position flag to some local variable, add input string length to that local variable and to check local variable length is not greater or equal to the size of global buffer. The interface function is used to check status flag where if the flag is 1 then the second global buffer is filled and if the flag is 2 then the first global buffer is filled from the input string. If the current filling buffer gets full then the interface function acquires the semaphore and send event to Network or Printer module. After sending event the interface function returns and for another call of debug print statement interface fills the global buffers. The network application or printer module gets the event and create data packet and after creating data packet in

case of network feature network application passes all required network configuration information to network card and then passes the data packet to network card to send the same to the network. The printer module gets the event and creates data packet and after creating data packet is send to the printer to get all debug messages through printout.
BRIEF DESCRIPTIPTION OF THE ACCOMPANYING DRAWINGS
Figure 1 shows a block diagram for existing system.
Figure 2 shows a block diagram for invention system.
DETAILED DESCRIPTION OF THE INVENTION
The invention will provide a method for capturing all the debug messages and store the same into global buffer and once the global buffer gets fill the same can be sent to existing modules to send the same over network or print the same through printer. This method will be very helpful for quick debugging the source code to the developer. This will also very cost effective as for the same there is no need to arrange any additional HW/SW like debugs port, serial cable or device etc.
In order to understand the objective and method of the present invention, it will be necessary to understand the existing system given in figure 1.
As per exiting system the electronic devices like Printers, MFP etc. have some driver to write any debug message on debug port and the same can be capture on PC using Hyper Terminal through serial cable. The developers use to add debug print statement in their code and the print statement take all the variable input and form a string internally for each input variable. Once the debug print statement form a string for each input parameter it starts using writing the same on serial debug port. Through debug port the string message use to transmit using serial cable and can be view on PC by creating port through hyper

terminal. The Hyper - terminal is a common utility comes along with Windows operating system. After getting and capturing all the messages the developer use to analyze and find the exact flow of their code for debugging purpose.
At the same time the existing devices have a number of other features like printing and some network related applications. The printing module is use to print device specification, status etc reports as well as print document from PC also. The network related applications are Scan to Email, Sending Alert email for system, Configuring device through web user interface, Network scanning etc.
In general in printing module while printing reports the application use to call functions for setting different types of font, offset and size and pass the string to print the same. In the network related module generally the network card use to be separate from the main board. There is always be a specific protocol for each application (Ex. Scan to Email, Sending Alert email for system, Configuring device through web user interface, Network scanning) to establish communication between network card and main board through shared memory (SM). As per the message getting from main board through SM the network card respond and send data on network accordingly.
Further, the system of the present invention is given in figure 2 wherein, the exiting system code flow will have the debug print function. The debug print function creates the debug string message and store the same in two global buffers alternatively. There will be two global buffers which will get fill alternatively once the one get full. Each time before filling the global buffer a check is done to check the same can hold the new data string or not. If the buffer is full then a flag get set to start filling another global buffer. After that a check is made for the user configured method to get the debug message over printer or not. If user configures the printer then the same message send to printer task which will internally print all the debug message data which can be analyzed by the developer. If the user doesn't configure printer as for getting debug message data then a check made for user configuration of network application (Scan to Email or Net Scan etc.) for the sam

If user configures network application then a event is send to the same task. After receiving the event it create data packet for debug message. Then the task will pass the network information to network card through shared memory. After writing network information the debug message data is also pass to network card through shared memory and the network card sends the same over network (As email or as net scan data).
If the device have network feature then this will be also very helpful for eliminating visit to client site if client report any issue on their device. The vendor can simple enable this feature on client device and can get all the debug messages on their PC itself either through automatic Email or through network data dump feature available on the device.
This method will include the core module about how all debug messages will be stored, what synchronization mechanism will be used, how the global buffer will be maintained and how the debug message data can be sent to network or printer module. This invention will include providing user interface part for enable/disable this feature. The prerequisite of the invention is the availability of exiting features like configuring network related features (Ex If the debug message needs to go through email then the email address and SMTP information needs to be configured). The invention will also include a method for enabling debug message capturing as per different modules. The user interface part will also provide user interface for selecting the existing module which will be used for capturing debug message data Ex. the use can set "Printer" or "Email Sending module" or "Network Data capture on PC" etc.
The basic object of the invention is to avoid the cumbersome process for debugging the code, save developer time and eliminate the cost involve in HW/SW for debugging purpose. This invention will help to avoid visiting client site or creating full setup at development site if the client reported some issue. The captured debug message can easily be analyzed on host system once the same get received from network.

This invention is to provide the full method about how the debug message can be directly diverted on the network or printer so the cumbersome and costly process of debugging can be avoided. This will also be very helpful in saving development cycle time of any project. The pre requirement for this method is that the electronic device should have some existing network features like Scan to Email; Alert Email Sending or Network Scan etc or the device should have printer module associated.
As per the method for this invention there will be two global buffer, one flag, one semaphore, one position indicator and one user interface selection buffer incorporated into the existing source code. The functionality and type description of each variable for implementing this method will be as follows:
First global buffer: This will be a global buffer of 2KB Size. The functionality of the same is to store all debug print messages, which will be used to send the same over network or printer automatically or as per user request.
Second global buffer: This will be a global buffer of 2KB Size. The functionality of the same is to store all debug print messages which will be used to send the same over network or printer automatically or as per user request.
Flag: As per this method a global flag will be maintained. This flag will use to indicate that which global buffer first or second needs to be sent over network or printer. Holding value 1 in this flag indicates first global buffer needs to be sent and 2 indicate second global buffer needs to be sent.
Semaphore: A semaphore will also be use for synchronization purpose. Each time when the data packet needs to be sent over network or printer the same will acquire and will be release once the job gets completed.
Position Indicator flag: The same will be used to get the filled size of active global buffer. Each time when any call for debug print statement appear it fill

data into global buffer starting from POS1 then increment the POS1 with the same. If the POS1 crosses the max storage size of GB1 or GB2 then the request for sending GB1 or GB2 send to specific network or printer module and POS1 will reinitialize with the input string of debug print statement.
Selection Flag: This flag will provide information about the user selection value. If flag will hold value 0 then the feature of sending debug message over network/printer will disable. If the flag set value 1 then this feature will send the debug message only for Modulel and if the flag is 2 then Module2 etc. There will one more value Oxff can be hold by the SF1 which will indicate to send all debug message irrespective of any specific module.
As a part of this method there will be one interface function, which needs to be
call in debug message logging function.
Figure 1 shows a block diagram for existing system.
• During development of coding the debug messages will be inserted.
• The debug messages will be sent via the SERIAL/PARALLEL cable to the PC or the Hyper Terminal.
• The "Application" module will be calling the printer module to print the data.
• The "Network Application" module separately makes the data packet and sends the data packet via Email Server or send to the Serial Port.
Figure 2 shows a block diagram for invention system.
• The user can enable or disable the need of the debug messages to be sent through network
• When building the code, insert the debug print functions where ever it's required to collect the debug information.
• Create a Buffer for to hold the "Debug Messages"
• Store the "debug Messages" in the Global Memory Buffer, and increment the Global Buffer pointer as and when the debug messages are appended.

• If the Global Buffer is Full or user request the device to get the debug messages in between, then start filling the "Debug Messages" in other global buffer.
• If the global buffer is not available, then wait on the Semaphore till we get the global buffer for the "debug messages" to be appended.
• Depending on the feature configuration, initiate a function in order to send the global buffer via network or printer configuration item.
• If user configure the printer to send the debug message.
• If yes, then send the global buffer to Printer for the printing.
• The printer module prints the debugging message information and prints.
• If user configured to send it using network.
• Then create a data packet from debug global buffer.
• Write network configuration information to Network Card to send the data to the Email Server.
• All the required data will be sent to the E-Mail Server via Network. The debug dump is available in the Email Server or any other configured server.
The interface function will follow the following process:
1. Check if the status flag is not equal to 0. If the same is equal to 0 then return.
2. Assign position flag to some local variable, Add input string length to that local variable, Check local variable length is not greater or equal to the size of global buffer, if the same is greater then check status flag, If the same is 1 then set the same to 2 and if the same is 2 then set the same to 1.
3. Check status flag, if the same is 1 then fill the second global buffer and if the same is 2 then fill the first global buffer from the input string.
4. If the current filling buffer gets full then acquire the semaphore and send event to Network or Printer module.
5. After sending event the interface function will return. After that for

another call of debug print statement will fill global buffers.
6. The network application (Ex Email) or printer module will get the event and create data packet
7. After creating data packet in case of Network feature it will pass all required network configuration information (SMTP) to network card. And then pass the data packet to network card to send the same as a email.
8. If printer module is selected then pass data packet to printer module. To get all debug messages through printout.
It will also be obvious to those skilled in the art that other control methods and apparatuses can be derived from the combinations of the various methods and apparatuses of the present invention as taught by the description and the accompanying drawings and these shall also be considered within the scope of the present invention. Further, description of such combinations and variations is therefore omitted above. It should also be noted that the host for storing the applications include but not limited to a microchip, microprocessor, handheld communication device, computer, rendering device or a multi function device.
Although the present invention has been fully described in connection with the preferred embodiments thereof with reference to the accompanying drawings, it is to be noted that various changes and modifications are possible and are apparent to those skilled in the art. Such changes and modifications are to be understood as included within the scope of the present invention as defined by the appended claims unless they depart therefrom.



WE CLAIM
1. A method of getting debug message over network/printer wherein a debug print function creates the debug string message and stores the same in two global buffers alternatively where the two global buffers gets filled up alternatively once one gets full.
2. A method as claimed in claim 1 wherein each time before filling the global buffer a check is done to check whether the buffers are adapted to hold the new data string or not.
3. A method as claimed in claim 2 wherein if the buffer is full then a flag get set to start filling another global buffer.
4. A method as claimed in claim 3 wherein after the flag is set a check is made for getting the debug message over printer where if the user configures the printer then the same message is send to printer task which internally print all the debug message data.
5. A method as claimed in claim 4 wherein if the user doesn't configure printer as for getting debug message data then a check is made for user configuration of network application for the same.
6. A method as claimed in claim 5 wherein if user configures network application then an event is send to the same task and after receiving the event it creates data packet for debug message where the task passes the network information to network card through a shared memory.
7. A method as claimed in claim 6 wherein after writing network information the debug message data passes to network card through shared memory where the network card sends the said data over the network.
8. A method as claimed in claim 7 wherein a user interface is providing for

enable/disable the debugging feature and for selecting an existing module which is used for capturing debug message data.
9. A method as claimed in claim 8 wherein network related features are configured prior to the operation of said debugging.
10. A method as claimed in claim 9 wherein the captured debug message is analyzed on host system once the message gets received from the network.
11. A method as claimed in claim 10 wherein there are two global buffer, one flag, one semaphore, one position indicator and one user interface selection buffer for performing the said method.
12. A method as claimed in claim 11 wherein the first global buffer is used to store all debug print messages, for sending over network or for printing automatically or as per user request.
13. A method as claimed in claim 11 wherein the second global buffer is used to store all debug print messages, for sending over network or for printing automatically or as per user request.
14. A method as claimed in claim 11 wherein a global flag is maintained that indicates which global buffer first or second needs to be sent over network or printer.
15. A method as claimed in claim 11 wherein the holding value 1 in the global flag indicates first global buffer needs to be sent over network or printer and 2 indicate second global buffer needs to be sent over network or printer.
16. A method as claimed in claim 11 wherein semaphore is used for synchronization purpose where each time when the data packet needs to send over network or printer the same is acquired and released once the job gets completed.

17. A method as claimed in claim 11 wherein the position indicator flag is used to get the filled size of active global buffer.
18. A method as claimed in claim 11 wherein the selection flag provides information about the user selection value.
19. A method as claimed in claim 1 wherein one interface function is used to call in the debug message logging function.
20. A method as claimed in claim 1 wherein the interface function is used to check if the status flag is not equal to 0 and if the said flag is equal to 0 then returns.
21.A method as claimed in claim 1 wherein the interface function is used to assign position flag to some local variable, add input string length to that local variable and to check local variable length is not greater or equal to the size of global buffer.
22. A method as claimed in claim 1 wherein the interface function is used to check status flag where if the flag is 1 then the second global buffer is filled and if the flag is 2 then the first global buffer is filled from the input string.
23. A method as claimed in claim 1 wherein if the current filling buffer gets full then the interface function acquires the semaphore and send event to Network or Printer module.
24. A method as claimed in claim 1 wherein after sending event the interface function returns and for another call of debug print statement interface fills the global buffers.
25. A method as claimed in claim 1 wherein the network application or printer module gets the event and create data packet and after creating data packet

in case of network feature network application passes all required network configuration information to network card and then passes the data packet to network card to send the same to the network.
26. A method as claimed in claim 1 wherein printer module gets the event and
create data packet and after creating data packet is send to the printer to get
all debug messages through printout.
27. A method of getting debug message over network/printer substantially as
herein described particularly with reference to the accompanying drawings.
Dated this 30th day of December 2005

Documents:

1489-CHE-2004 AMENDED PAGES OF SPECIFICATION 10-09-2013.pdf

1489-CHE-2004 AMENDED CLAIMS 10-09-2013.pdf

1489-CHE-2004 EXAMINATION REPORT REPLY RECEIVED 10-09-2013.pdf

1489-CHE-2004 FORM-1 10-09-2013.pdf

1489-CHE-2004 FORM-13 10-09-2013.pdf

1489-CHE-2004 OTHER PATENT DOCUMENT 10-09-2013.pdf

1489-CHE-2004 OTHERS 10-09-2013.pdf

1489-CHE-2004 POWER OF ATTORNEY 10-09-2013.pdf

1489-che-2004-abstract.pdf

1489-che-2004-claims.pdf

1489-che-2004-correspondnece-others.pdf

1489-che-2004-description(complete).pdf

1489-che-2004-description(provisional).pdf

1489-che-2004-drawings.pdf

1489-che-2004-form 1.pdf

1489-che-2004-form 13.pdf

1489-che-2004-form 26.pdf

1489-che-2004-form 5.pdf


Patent Number 257244
Indian Patent Application Number 1489/CHE/2004
PG Journal Number 38/2013
Publication Date 20-Sep-2013
Grant Date 17-Sep-2013
Date of Filing 31-Dec-2004
Name of Patentee SAMSUNG INDIA SOFTWARE OPERATIONS PRIVATE LIMITED
Applicant Address BAGMANE LAKEVIEW,BLOCK B,NO.66/1,BAGMANE TECH PARK,C V RAMAN NAGAR,BYRASANDRA,BANGALORE-560093
Inventors:
# Inventor's Name Inventor's Address
1 RAJEEV JAIN BAGMANE LAKEVIEW, BLOCK 'B', NO. 66/1, BAGMANE TECH PARK, C V RAMAN NAGAR, BYRASANDRA, BANGALORE 560093
2 SAMAPTH KUMARA, BAGMANE LAKEVIEW, BLOCK 'B', NO. 66/1, BAGMANE TECH PARK, C V RAMAN NAGAR, BYRASANDRA, BANGALORE 560093
PCT International Classification Number G06F3/12
PCT International Application Number N/A
PCT International Filing date
PCT Conventions:
# PCT Application Number Date of Convention Priority Country
1 NA