[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


We are using minicom to communicate a device through the...

<< Back to general questions

Question by Jagan
Submitted on 3/12/2004
Related FAQ: N/A
Rating: Not yet rated Rate this question: Vote
We are using minicom to communicate a device through the serial port.
Our application uses Tcl.Tk and Expect commands which spawns minicom and do the work of sending and receiving data through the seiral port.
Here we receive some control characters along with data which is not of readable format .We are in need of intrepeting those control charctersinto readable format. Here is the sample data what we receive:


We read data from the buffer.We handle those data by placing directly to the Textbox in a window and writing those data to a file directly reading it from the buffer.

Data placed in Textbox looks like:

\x1b[?25l\x1b[0m\x0f\x1b[7m - CONSOLE - MANAGER MODE -\x1b[?25l\x1b[0mMain Menu\x1b[0m\x0f Status and Counters...

x1b[0m\x0f\x1b[4mC\x1b\[0m\x0f --- along with other readable charcters too


Data that been written to the file read from the buffer looks like:

14:32:00.120 m^H^[[?25h^[[24;29He^H^[[?25h^[[24;30Hn^H^[[?25h^[[24;3 u^H^[[?25h^[[24;32H
14:32:00.147 ^[[23;80H ^[[24; ^[[24;32H
14:32:00.543 ^[[K^[[?25h^[[1; ^[[24; ^[[1; ^[[H^[[2J^[[24; ^[[H^[[2J^[[24; ^[[1; HP^[[24; ^[[1; HP ProCurve Switch 5308XL^[[24; ^[[2; ^[[K========================================^[[24; ^[[2;4 ========================================^[[2;80H^[[24; ^[[2;27H- CONSOLE - MANAGER MODE -^[[24; ^[[?25l^[[23;
14:32:00.587 ^[[K^[[23; ^[[K^[[3; ^[[K^[[3;36HMain Menu^[[4; ^[[K
14:32:00.998 ^[[K^[[5;4H1. Status and Counters...^[[6; ^[[K^[[6;4H2. Switch Configuration...^[[7; ^[[K^[[7;4H3. Console Passwords...^[[8; ^[[K^[[8;4H4. Event Log^[[9; ^[[K^[[9;4H5. Command Line
(CLI)^[[10; ^[[K^[[10;4H6. Reboot Switch^[[11; ^[[K^[[11;4H7. Download OS^[[12; ^[[K^[[12;4H8. Run Setup^[[13; ^[[K^[[13;4H0. Logout^[[14; ^[[K
14:32:01.007 ^[[K
14:32:01.021 ^[[K
14:32:01.037 ^[[K
14:32:01.048 ^[[K
14:32:01.057 ^[[K
14:32:01.080 ^[[K
14:32:01.089 ^[[K
@


Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to general questions


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.