lloydroc / ebyte-sx1276

EByte E32 for the Raspberry Pi on Linux
Apache License 2.0
20 stars 5 forks source link

Observed Error Rate when Sending Files #10

Open lloydroc opened 3 years ago

lloydroc commented 3 years ago

Sending a file from one e32 to another the received file seems to always be missing bytes at multiples of the E32_TX_BUF_BYTES=58. I'm not truly convinced it's always multiples of 58 but it seems that way. I have a couple of counter examples. Swagging about 99.7% of the data arrives so the error rate is not that bad. This is with version 1.7. I have a decent antenna and the two are about 50ft away in a single family house where one is on the main floor and the other in the basement. One is on a Pi4 and the other on a Pi3.

Scenario

Transmit a file from one and receive on the other then compare the received file to the transmitted file.

Settings

e32 -s
Version Raw Value:        0x00000000
Frequency:                0 MHz
Version:                  0
Features:                 0x00
Settings Raw Value:       0xc000011a1744
Power Down Save:          Save parameters on power down
Address:                  0x0001
Parity:                   8N1
UART Baud Rate:           9600 bps
Air Data Rate:            2400 bps
Channel:                  23
Frequency                 433 MHz
Transmission Mode:        Fixed
IO Drive:                 TXD and AUX push-pull output, RXD pull-up input
Wireless Wakeup Time:     250 ms
Forward Error Correction: on
TX Power:                 30 dBm

Transmit Side

e32 --in-file random4.txt #transmit a file

Receive Side

e32 --out-file random4.txt.rx

File

The file contains random characters ending with newlines. There are 58 total characters - including the newline. It looks like this:

$ head -n 4 random4.txt
xgrJHpAmjvcBktdguAmqlihDwkwdBpjcwsDhHqlcDnv.yr.eJkngluKHw
kKbzfehqzgjHrepwzohIedEhiKsCydlI.muKitmAAotJkIsBbrw.mmKva
gbzjetajF.rlbJDhhqrHAfAdtyiFmDxtEiCJuDKdsfglbJtieCbEHuIee
IBqxlBftqGF.CJhIbsJD.JHsCxlijqeddnsgaysiij..KexExktmfeEzt
$  stat random4.txt
  File: random4.txt
  Size: 580000      Blocks: 1136       IO Block: 4096   regular file
Device: b302h/45826d    Inode: 2223        Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/      pi)   Gid: ( 1000/      pi)
Access: 2021-06-29 11:24:45.651370358 -0600
Modify: 2021-06-29 11:24:45.711369777 -0600
Change: 2021-06-29 11:24:45.711369777 -0600
 Birth: -
$ wc -l random4.txt
10000 random4.txt

Comparison Results

When I look at the difference we see the following:

$ ls -l random4.txt*
-rw-r--r-- 1 pi pi 580000 Jun 29 11:24 random4.txt
-rw-r--r-- 1 pi pi 578433 Jun 29 16:01 random4.txt.rx

File random4.txt

$ diff random4.txt random4.txt.rx
21d20
< hGGjwClcoh.qxrhGn.wfn.qsvHgIuHfCzED.sacy.abwkagxDuCds.nFE
681d679
< BaddinHBtDIdyxGFrbamzmqDjwvrl.tE.wH.Bsyh.lcxIAplthpetGADo
1899d1896
< .dyj.dJniqlmebytdsneFrF.wwlfjfkiaAr.DnmEvpIsqs.lDkqmBhlcv
2393d2389
< ExGJIfdn.CtFze.JJHlu.vmytEtxcteyI.tCIpHFJeouinpJgAp.auwtk
2700d2695
< joIdBGHHlonJ.thwnjwfDzIzc.kmKzffF.asxHdAaio.tvwGwe.mvyDpx
2879d2873
< GdcFCdDnEsA.bjFzzdI.g.aywbpGFIKp.FhrICxqgjoik.zBGls.bkpxl
3283d3276
< sACdAjFt.naiJ.GHqAhIb.r.JgyxntoxgJsyejJJoJekHKdbocJpbfmCl
3369d3361
< rqCdsrAkqDA.FEDbAKkpKabvvfmheIvwljzvtdxJGbIxFxqjttzhtsDGp
3730d3721
< tafGm.xFrc.wgdtBwodD.fiCHtdaEBpjBvHFlqoClnkrqvK.J.uzKCoEh
3865d3855
< ipbuatBjBEpAqHyethGBCEHzyxhaAIJIbCociIdBqsoGm..F.vsrlddBs
3993d3982
< eml.q.qbuAbcefoEtdrfEaqtIgoHcvbgHfebemJq.KtJHHAfCJcsBsDwy
4051d4039
< .GxczznpFkhKcq.FE.tbndIv.mJhe.oJwD.hodo.nwHhEF.mvkoInahee
4116d4103
< EjE.cfKxcGdKqGlKzyBE.AzhpmB.leIInqyhwvEynImDAxAdafzEFd..p
4149d4135
< akdsGyGkmzCxi.JfzGiecEwxszuDEtcwD.annGxAkljsaKyADGwFoegzv
4296d4281
< EuheiFxoFEFmxtkzKoGrDGcrfzwffEEJc.GlDprm.arutB.qIwzxoBHtm
4666d4650
< BnevvClmm.cCGo.CKBn.bBBr.pfzwpIbu.oHAzgEwikpojdcKjbDCvgAC
4806d4789
< AfJ.aCnzebum.ddoxEyqvK.aKFkCv..hJIeKojvkcHwcDriehGuCulvqI
5756d5738
< K.hBg.ynv.EBukfzCuIx.GrwvfqaxhymfG.dwpqdf.xsjCdDa.mEEwfet
5928d5909
< DqhdjCyomHitsujwIzikxIKwaylurG..i.IrAsxFlykEemeE.ebn..BEn
6092d6072
< sJnDfw.HusxeCoq.mlAfv.fBf..ebHhlunGAJEtpaJlCbCznFeseIpF.h
6484d6463
< w.yDhw.FvqhxeGazGEKfmujGIc.GBEyktbFAxCr.KquGiusHkg.os.gfb
6529d6507
< nKkEKkHrjq.cHBfdasjJ.shbIlwxsyIFu.wihhAqqxsjdqmdIo.FG.yAj
7339d7316
< DBbrIhGunE.eJwketJtxDrGiI.IEmArcnll.kKtxAitnEwjjruy..i.G.
7528d7504
< .q.BAHdbyaafgq.goHxjokyqo.jIDC.CeDqxoly.lqKjHHh.sFjGHziho
7534d7509
< kf.DqgcuquCHirJpthtknhcHmwjKEK.abKDjIGvcejKnsFu.EGad.dCdr
7620d7594
< .fBGyCCosnuBguHb.jtbbpCzrCg.pCwhHc.sEuyjzeKFqvyhEdbFtviCj
7829d7802
< qn.ibc.EwegJKcJrFhqrqHwnDhEydirtnoBgjqDFmJsbEgsnnAEvumAjt
9878c9851
< CBnEGfnDHyApIcjhIqcAJCtqChwzBvjhao.GllneBatvcuDCCxoqdHGxG
---
> BnEGfnDHyApIcjhIqcAJCtqChwzBvjhao.GllneBatvcuDCCxoqdHGxG

File random3.txt

Same idea as random4.txt. It is missing 116 bytes which is 58*2.

$ ls -l random3.txt*
-rw-r--r-- 1 pi pi 32000 Jun 29 08:21 random3.txt
-rw-r--r-- 1 pi pi 31884 Jun 29 11:20 random3.txt.rx
$ diff random3.txt random3.txt.rx
48,49c48
< z.FBhelb.lniBotxvdiB.d.CIaasgsG
< xspkztwAszGsng.CBGKgG..uH.mdJFB
---
> z.FBB
51,53c50
< fAkAmqDjGjgJJHCqhnAuwADduC.qpwy
< uaA.fItoACnwxgcGohkIDKpyqewzlKb
< x.Bvcvai.uvneCpCcwEKdAluJhImkEn
---
> fAkAmqDjGjgJJHCqhnAuwADdEKdAluJhImkEn
$