Please help to setup Throughserial between 2 Arduino DUE #439
Replies: 4 comments 4 replies
-
|
@sublimethe looking at the pictures I think the problem is that your side A is programmed to send packets continuously with a delay between each packet of 200 microseconds. Side R is programmed to respond something to a packet, it does so immediately after receiving, and it collides with the next transmission of side A, the solution is to put a longer delay between each transmission of side A to give time to side R to respond. Your oscilloscope shows you two packet transmissions occurring at the same time, that is a textbook example of a packet collision. Remember to always wait on transmitter side for at least TS_RESPONSE_TIME_OUT (by default 45 milliseconds) between each transmission attempt. |
Beta Was this translation helpful? Give feedback.
-
|
I think the changes suggested above will solve your issue, let me know how it goes @sublimethe |
Beta Was this translation helpful? Give feedback.
-
|
@sublimethe what about this simple lib https://github.com/madsci1016/Arduino-EasyTransfer |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
I wired arduinos like this:
19(Tx1)---4.7kOhm---18(Rx1) (without resistor boards halt)
18(Rx1)---4.7kOhm---19(Tx1)
gnd---gnd
My test code is
Asking side (A):
Responding side (R):
What it does - the A side terminal print "Result 6" right after it starts. After few seconds the R terminal prints "Data sent: 208800� Result 666", next the A side terminal prints "result 666"
I think it should work like this: A sends "REQ", waits ASK(6) prints me 6 to terminal
Next R recieves REQ, forms random number send it to A, wait for ASK from A
What i see is A never sends ASK back to R, but it tells me that he see ASK from R after sending REQ to it.
I BOUGHT oscilloscope for this and this how it looks there.

Full signal
Zoom in

So i see on the signal that A (blue) sends data. Immediatly next R sends smth short back (is it ASK?) and then a long time after A sends exact same data again, like it never recieves ASK from R. And at the exact same time R starts to send those random numbers. Maybe i need to tune some throughserial default timers?
Please HELP me with this. I dont understand why it is not working. My only thought is that in TSDL-specification-v3.0.md the logic 0 is a "free" state of the line, but mine is ALWAYS is 1 after the library takes control under serial1.
With all respect kindly waiting for any thoughts. It is needed for me to build an electric system in my motorhome where i currently live, having no place else.
Beta Was this translation helpful? Give feedback.
All reactions