CongducPham / LowCostLoRaGw

Low-cost LoRa IoT & gateway with SX12XX (SX1261/62/68; SX1272/76/77/78/79; SX1280/81), RaspberryPI and Arduino boards
703 stars 354 forks source link

messy code "ÿþ" before ping #282

Open ga405 opened 4 years ago

ga405 commented 4 years ago

^$ACK requested by 8 ^$rcv_time_ms:130261 --- rxlora. dst=1 type=0x18 src=8 seq=3 len=4 SNR=6 RSSIpkt=-58 BW=125 CR=4/5 SF=12 ^p1,24,8,3,4,6,-58 ^r125,5,12,433299 ^t2020-05-12T23:53:43.511188*2010201236 ÿþPing ^$downlink wait: 130261 ^$downlink check: 131161 Here's a pingpong test between arduino and loragw. As you can see, there's a messy code "ÿþ" before ping. And it always happens when I use function sprintf() to transfer string between arduino and loragw. So how can I avoid this? Have a good day!

CongducPham commented 4 years ago

I guess you are using the lora_gateway program in standalone mode, without post-processing right? These characters are the 2-byte prefix used to indicate to the higher-level (i.e. post-processing) that data come from the radio. They are removed by post-processing stage.