What does a ***** FRAMING ERROR ***** mean?
Keywords: FRAMING ERROR
Question:
What does a ***** FRAMING ERROR ***** mean? I'm using the Serial Communication Extender and get this error quite frequently. In my source code, it happens at a number of places in the code execution.BTW, I've tried using the serial byte format of 8N1 (which produces garbage on CompuServe) and 7N1 and 7E1 which generally produces good results - but I still get these framing errors - not all the time, but just SOME of the time.
Answer:
During Capture mode, we also monitor error bits from the serial interface, and if we see one of the error bits set, we write a comment to the capture file. You can check the error bits yourself if desired. (I never do...maybe I should)In any case a little background. When a byte is sent over the comm line it generally is sent as:
STARTBIT DATABIT 1 DATABIT 2 DATABIT 3 DATABIT 4 DATABIT 5 DATABIT 6 DATABIT 7 DATABIT 8 STOPBITFraming error means that someting that looked like a character arrived but that it was not formatted properly. No stop bit, incorrect number of data bits, etc etc. In general the problem is line noise. Get a better phone line (or ignore the problem). Be aware that a lot of line noice can occassionally show up as data errors.Only getting the problem some of the time is consistent with the line noise problem. Sometimes you get a good line and sometimes you do not. Sometimes s different modem helps.
PS#1 As I recall Compuserve is 7E1
PS#2 As I recall Compuserve is planning to drop support for the tty mode protocol so this script may become useless in the future.
FRAMING ERROR returned from COM4 when using pComOpen
Question:
I get a reported FRAMING ERROR but pGetlasterror reports 0 -- HELP?? There is nothing on COM4 and it's the last COM PORT on the machine, FRAMING ERROR is the proper result but I can't seem to capture it and terminate the program.Some insight..
COM1 is a valid COM Port and has a Serial Mouse attached
COM2 is a valid COM Port and is an internal modem
COM3 is NOT a valid COM port
COM4 is a valid COM Port and has nothing attachedpGetlasterror reports a (7: Invalid Port) under the initial senerio using ErrorMose(@OFF) for COM1 and COM3, and pGetlasterror report a (0: No Error) under the initial senerio using ErrorMose(@OFF) for COM2 and COM4.
In the code below - I get a WIL Extender Error:------ at the command port=pComOpen
How Does pComOpen determine the validity of a COM PORT?
BoxOpen("File Xfer Communications","Initializing") port=pComOpen(MyModemIsOn,0,9600,"8N1","RTSRTS") code=pGetLastError(1) Message("Open err msg",code) BoxText(port) Timedelay(3) if port == 0 BoxText("Comm Port selected not present") TimeDelay(4) BoxText("Set System Options to Proper Comm Port") TimeDelay(4) goto openerror endifSERIAL CAPTURE TXT FILE:Serial Port Capture pcomopen("COM4","0","9600","8N1","RTSRTS") OK = 5999986 pgetlasterror("1") OK = 0 : No error [[[ ***** FRAMING ERROR ***** ]]]Answer:
It's not clear what you are up to. Framing errors are associated with data transfer operations, and you seem to be looking for one before any data transfer is initiated.I think you want:
xx=pComInfo(port,5)to test for framing error.Try the ComInfo check above, or if that does not work, try reading a character.
- Not quite sure how the serial extender really tests for valid com ports. I think it asks Windows.
- The com software appears to be attempting to "read ahead" seeing data available at the port, but as yet unasked for by the application.
If you tried reading data then you might get an error. The pGetLastError is reporting on the pComOpen - and that succeeded.
User's Reply:
xx=pComInfo(port,5) to test for framing error identified the framing error and allowed my program to recognize that this was NOT a valid comm port even though the pcomopen returned no error.Thanks for the insight...
Article ID: W12572Filename: Framing Error with Serial Extender.txt