[IGSTK-Developers] Loopback test

Patrick Cheng cheng at isis.georgetown.edu
Mon Mar 13 11:19:30 EST 2006


Hi David,

I guess the problem is from my RS232 female-female plug. The numbering 
of the pins is a little bit different. Now I figure it out and short the 
right pin 2&3. it passed the hyper terminal test.

I just ran a quick night test on it. and the 
igstkSerialCommunicationTest is still failing.

http://public.kitware.com/IGSTK/Sites/build02.isis/Win32-IGSTK-VS71-Debug-Loopback/20060313-0430-Nightly/Test.html

Patrick

David Gobbi wrote:
> Hi Luis,
> 
> The loopback that I have working on "beck" just has pins 2-3 shorted, it 
> doesn't have any of the handshaking pins connected like you have for 
> zion.  It works for me under both Linux and Windows.
> You really shouldn't be testing it by doing a "cat" to the /dev/ttyS0, 
> because the state of the device is unknown unless you previously set its 
> state using "tcsetattr".  It is much better to test it from within a 
> terminal program, or from within a C program where you have used 
> tcsetattr to put the serial port into a known state.  For instance, I 
> think you see the buffering on your serial port because your serial port 
> is set to "canonical" mode by default.  In canonical mode, it always 
> buffers until until it receives a newline (and I suspect that the 
> buffering you are seeing is on the input, not on the output -- the 
> output buffer is only used when characters are sent to the serial port 
> too fast for the baud rate to keep up).  The igstk::SerialCommunication 
> class turns off canonical mode, so that characters can be received 
> one-at-a-time instead of one line at a time.
> 
> Patrick: if you are using a Windows machine, then hyperterm is the right 
> way to test the loopback.  Luis is right that, if you aren't seeing 
> anything, you should try turning off flow control.  Also, to make sure 
> that commands are getting out to the serial port, you can unplug the 
> loopback and plug in an AURORA or POLARIS.  Then, if you do "INIT 
> "<carriage return> "BEEP 2"<carriage return> it should beep for you.  If 
> commands can get out to the AURORA but not back in through the loopback, 
> you know the loopback has problems.
> 
> On my side, I'll make another loopback with the extra pins connected so 
> that I can see what kind of different behavior it has compared to my 
> single-wire loopback.
> 
> - David
> 
> Luis Ibanez wrote:
>> Hi Patrick,
>>
>> Here is the wiring that I'm using in
>> the Loopback device installed in Zion:
>>
>> a)  1====4====6
>> b)  2====3
>> c)  7====8
>>
>> This looks the same as the one that you posted
>> in your email.
>>
>> In  Linux we tested the device by just opening
>> two terminals and doing:
>>
>>      a)   cat  /dev/ttyS0  (in one terminal)
>>      b)   ls -R  /  > /dev/ttyS0  (on the other terminal)
>>
>> You should see text appearing in the first terminal.
>>
>>
>> Notice that since the serial port is buffered, you may
>> not see any output if you just send a couple of words.
>> You may have to send more that some Kb of text to make
>> sure that the serial port buffer if flushed and you
>> actually see something in the other side.
>>
>> This being said. The IGSTK test is failing in Zion,
>> and we have never been able to connect to the Polaris
>> from the Linux machine.
>>
>> I just tested the same device on my Windows laptop,
>> using the Hyperterminal test that you posted, and it
>> works fine for me. That is, when the loopback device
>> is connected, I see the text that I'm typing, and
>> when the device is remove, I don't see the text that
>> I'm typing.
>>
>> Did you selected "Flow control" to "None"  ??
>>
>>
>>
>>    Luis
>>
>>
>>
>> ---------------------
>> Patrick Cheng wrote:
>>> Hi everyone,
>>>
>>> I just made a loopback device and plug it into the windows machine 
>>> here, and it turned out that the SerialCommunicationTest failed too.
>>> http://public.kitware.com/IGSTK/Sites/build02.isis/Win32-IGSTK-VS71-Debug-Loopback/20060310-0430-Nightly/Test.html 
>>>
>>>
>>> I followed the wiring instruction in the attached picture. and I try 
>>> to use a windows program to test if this loopback device is working.
>>>
>>> Start -> All Programs -> Accessories -> Communications -> Hyper Terminal
>>>
>>> I followed the test under this link:
>>> http://zone.ni.com/devzone/conceptd.nsf/webmain/D48BA43C59B60277862569EE000501FD 
>>>
>>>
>>> Quote, "You will see the terminal window as shown below. If your 
>>> serial port is working and the loopback cable is properly connected, 
>>> the text you type appears in the window. If you remove the cable and 
>>> type text, it should not appear in this window. If this test behaves 
>>> differently than described here, see the troubleshooting advice at 
>>> the end of this section. "
>>>
>>> I don't see the text when I am typing, so I guess the loopback is not 
>>> being set up correctly, I don't know if this is the same situation on 
>>> Zion-Loopback machine.
>>>
>>> Am I doing the wring right? or it's a contact miss problem?
>>>
>>> Patrick
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> IGSTK-Developers mailing list
>>> IGSTK-Developers at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>>
>> _______________________________________________
>> IGSTK-Developers mailing list
>> IGSTK-Developers at public.kitware.com
>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>>
> 
> 
> ------------------------------------------------------------------------
> 



More information about the IGSTK-Developers mailing list