Welcome! Log In Create A New Profile

Advanced

Strange comms behavior

Posted by Joost 
Strange comms behavior
July 05, 2007 02:06AM
When testing my system (1 comms board & 4 UCB's), I have found something that baffles me. Wen running the (same) comms/UCB configuration under Ubuntu using the built-in COM port on my PC, everything works (Java host app, stepper exerciser etc). When running this under Ubuntu using a USB->serial converter, everything works as well. But when I plug this USB->serial converter in my laptop running XP, it does *not* work. The host application starts, but when starting the stepper exerciser, I get a lot of time out errors and CRC errors. Sometimes the stepper window pops up, sometimes it doesn't, or only after a bunch of errors. Moving the sliders does not result in any action on the UCB's.

AFAIK, this is not because of the java app/configuration, since that appears to be running fine, nor is it in the comms/USB boards, since they work. I have been wondering if there could be some other setting in XP, or a hardware difference in the laptop, that would cause this behavior. Anyone has some insight as to why this could be the case, or some suggestions on how to find the reason/cause for this?

Joost
Anonymous User
Re: Strange comms behavior
July 05, 2007 05:58AM
Yes in XP, I get the same send byte, time out for receiving byte. I traced out the physical wiring up to the Pic to the port on the comm board, all ok. I did hook the serial port of the XP computer to my laptop running Windows ME through a null modem cable. Three ASCII characters were being sent to hyper terminal screen over and over again. I'll do it again later and get you the hex value of these characters. The computer essentially polls and waits for the correct slave to respond. The slaves are 2, (stepper X) 3, (stepper Y) 4,(stepper Z, and 8,(extruder) The characters were a double horizontal line a T and a Q. The double horizontal line is in the extended ASCII character set
Anonymous User
Re: Strange comms behavior
July 05, 2007 08:45AM
I attached it to my other laptop and the characters are T, Q and a double vertical line. I consulted the ASCII chart and the following hex numbers are sent, 54, 51, B6
which is (T) 010101000, (Q) 01010001, (||) 10110110. This is what hyperterminal picked up
Anonymous User
Re: Strange comms behavior
July 05, 2007 09:23AM
SNAP docs are here:

[www.hth.com]

Seems to me the meaning of TQ|| is SYNC|HDB2|HDB1, more specifically 1 dest. addr. byte, 1 src. addr. byte, 0 prot. specific bytes, ACK, CMD, 8bit CRC, 6 data bytes. Very weird there is no more data after that, should be followed by a source address byte, a dest. address byte, 6 data bytes and 1 CRC byte.

--Blerik

Edited 2 time(s). Last edit at 07/05/2007 12:06PM by blerik.
Anonymous User
Re: Strange comms behavior
July 05, 2007 12:17PM
Yes I believe the info from the reprap program is wrong, since the comm links check and the firmware checks. I wrote what was displayed on hyper terminal, ASCII characters and I looked up the hex and binary values. It should talk to all nodes and listen for a response from each of them. I wasn't aware it is using CRC redundancy error correction, so where are these bytes!
Anonymous User
Re: Strange comms behavior
July 05, 2007 12:38PM
I noticed a wrong trailing 0 on the T, it should be 01010100 the syn byte in snap, where are the rest of the bytes? This really bytes!
Anonymous User
Re: Strange comms behavior
July 05, 2007 01:35PM
if HD2 is 01010001, 01 = one destination byte 01 = one address source byte
00= number of flag bytes, 01= Ack request(Tx)
if hd1 10110110 cmd is set 1, 011 8 bits crc, 0001 one data byte
I just read the snap protocol
Anonymous User
Re: Strange comms behavior
July 05, 2007 02:17PM
Have you checked the serial port settings on your PC? In Device Manager, if you go to the properties for your serial port, you should see the communications settings there - I think the correct setting should be 8-N-1 (it's written down somewhere in the RepRap construction instructions).
Anonymous User
Re: Strange comms behavior
July 05, 2007 02:31PM
[joost]
Grounding?

Your PC is naturally referenced to earth ground as I am assuming the system is.

Your laptop I am guessing is not and as such you have poor signal integrity. Is the ground reference on the RS232 connection connected (may also be modified by the converter, is the USB ground isolated from the RS232 ground?).

An interesting experiment would be to find a chassis screw on the laptop and use a wire to connect it to a ground on the reprap/strap system. (uh disclaimer if something blows up I aint responsible ... much).

Just a thought.

Edited 1 time(s). Last edit at 07/05/2007 03:23PM by d0ubled.
Anonymous User
Re: Strange comms behavior
July 05, 2007 03:06PM
Set to 8N1 no flow control and 19200 baud. if the grounds were fault, then no bytes would get through, since o is 15vdc above ground and 1 is 15vdc below ground
Anonymous User
Re: Strange comms behavior
July 05, 2007 06:13PM
I got my linux USB to RS232 and it recognizes it but it is still only sending out the three bytes that it did in windows XP. This has to be a software issue maybe?
Anonymous User
Re: Strange comms behavior
July 05, 2007 06:56PM
Just a thought, have you tried interposing a powered USB hub between your laptop and the USB to serial converter?

I have had several strange behaviors with laptops and USB that disapear once I added a powered hub. (I think it is because of some USBs ports sourcing 3.3 volts and others sourcing 5 volts or just having wimpy power).

Best,
Dan
Sorry, only registered users may post in this forum.

Click here to login