Packets lost?

Hello!

I’ve got a pair of 3DR radios, v2.0 433Mhz.

I’m using it for stuff other than Mavlink, and I noticed that it looked like a bunch of bytes were dropped. I connected both modems to USB and ran a quick test

$ stty -F /dev/ttyUSB0 57600 raw
$ stty -F /dev/ttyUSB1 57600 raw
$ cat /dev/ttyUSB0 > received &
$ cat sample1 > /dev/ttyUSB1

(I’m running linux on my PC, BTW…)

which is supposed to send file ‘sample1’ over to modem on USB1 and record what modem on USB2 received in file ‘received’

File ‘sample1’ contains a test pattern

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
..... and so forth

what I receive looks like

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 010 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17  19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 251 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12  11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17  20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 278 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 9 20 21 22 23 24 25 26 27 28 29 30
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30
......etc

Settings on both modems are the same

ATI0
SiK 1.7 on HM-TRP
ATI1
1.7
ATI2
78
ATI3
67
ATI4
1
ATI5
S0: FORMAT=25
S1: SERIAL_SPEED=57
S2: AIR_SPEED=64
S3: NETID=26
S4: TXPOWER=20
S5: ECC=1
S6: MAVLINK=1
S7: OPPRESEND=1
S8: MIN_FREQ=414050
S9: MAX_FREQ=415790
S10: NUM_CHANNELS=10
S11: DUTY_CYCLE=100
S12: LBT_RSSI=0
S13: MANCHESTER=0
S14: RTSCTS=0
ATI6
silence_period: 362
tx_window_width: 6207
max_data_packet_length: 118
ATI7
L/R RSSI: 220/220  L/R noise: 37/34 pkts: 8113  txe=0 rxe=2 stx=0 srx=5270 ecc=0/0 temp=27 dco=0

And modems are lying next to each other.

I tried to play with frequencies, txpower, ecc, mavlink, but nothing changed.

When I run the same test on ftdi cable, everything is just fine.

Is this how it’s supposed to be or bad modems or am I missing something?

Many thanks!
Denis.

And a quick update :slight_smile:

I figured out that turning RTS/CTS handshake fixed the problem. However, RTS/CTS is only an option when both modems are connected by USB (as FTDI provides RTS/CTS feature) and I can’t use it in my device, because I only have TX/RX on it.

Later on I found this

in the manual (copter.ardupilot.com/wiki/common … m-and-px4/)

So I increased AIR_SPEED from 64 to 192, ran my test and everything was transmitted perfectly.

Now, if I get it correctly, by default (factory configuration) modems are configured with 56K baud rate, 64K air rate AND ECC, and so the question is, is that a feature and I’m missing something here again or it’s been set incorrectly and has to be changed?