Skip to content

Intermittent Scrambled data from Serial #605

Open
@57hydra

Description

@57hydra

Subject of the issue

For the most part, the LoRaSerial is perfect for my use case (since I need to just prototype as fast as possible). But something that I didn't realize until I started a continuous data stream is that sometimes the serial data comes in all scrambled. I originally thought this was an issue with my code implementation (termios usage written in C) to access the serial data but if I look at the data by setting the baud rate at the system level and use the sudo cat </dev/ttyX> command to see the incoming data, I see the same issue. After some time, the data seems to come in just fine with no issues.

I am honestly a bit new to this and I have a feeling that there is an obvious setting that I am missing/overlooking. I have tried changing a few settings but I seem to get the same behavior. Please let me know if there is something that you would like me to try out.

Screenshot 2024-04-11 at 3 03 48 PM
(From code implementation of reading Serial data)

Screenshot 2024-04-11 at 3 13 18 PM
(Displaying the received data using the cat command)

Your workbench/What settings are you using? This is normally a list of AT commands that we can run against a radio to put it into an identical configuration to replicate the issue.

I am using two LoRaSerial devices that use a USB-C port to connect to a computer. After experimenting with some of the settings, I reset everything back to factory default and only changed the radios to Multipoint Mode.

I'm including all of the settings below:

ATI
SparkFun LoRaSerial SAMD21 1W 915MHz v2.0

ATI2
2.0

ATR
AT-AirSpeed=0
AT-AutoTune=0
AT-Bandwidth=500.00
AT-ClientFindPartnerRetryInterval=3
AT-CodingRate=8
AT-DataScrambling=0
AT-EnableCRC16=1
AT-EncryptData=1
AT-EncryptionKey=
AT-FramesToYield=3
AT-FrequencyHop=1
AT-FrequencyMax=928.000
AT-FrequencyMin=902.000
AT-HeartBeatTimeout=5000
AT-MaxDwellTime=400
AT-MaxResends=0
AT-NetID=192
AT-NumberOfChannels=50
AT-OperatingMode=0
AT-OverHeadtime=10
AT-PreambleLength=8
AT-SelectLedUse=4
AT-Server=0 // (other radio has AT-Server=1)
AT-SpreadFactor=9
AT-SyncWord=18
AT-TrainingKey=
AT-TrainingTimeout=1
AT-TxPower=30
AT-TxToRxUsec=657
AT-VerifyRxNetID=1
OK

ATS
AT-CopySerial=0
AT-Echo=0
AT-FlowControl=0
AT-InvertCts=0
AT-InvertRts=0
AT-RTSOffBytes=32
AT-RTSOnBytes=256
AT-SerialDelay=50
AT-SerialSpeed=57600
AT-UsbSerialWait=0
OK

ATP
AT-CopyTriggers=0
AT-TriggerEnable_31-0=0
AT-TriggerEnable_63-32=0
AT-TriggerWidth=25
AT-TriggerWidthIsMultiplier=1

Steps to reproduce

Usually happens when you start the entire setup with the computer and the radios powering on at the same time.

Expected behavior

I'd like to send an ASCII string with a length that is always fixed like this every 1 second (which is definitely within the AirSpeed limits).
<R,1,0,13.9725684,-23.1726684,1,0,0,1>

Actual behavior

I instead receive mixed/scrambled data like this.

0,,1,0,13.97256<L,1,0,13.9725684,-206174<L,1,0,174<L,1,0,4<L,1,0,4<L,1,0,4<L,1,0,<R,1,0,13.9725684,-23.1726684,1,0,0,1>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions