sh123 / esp32_loraprs

LoRa ESP32 KISS Bluetooth modem (for APRSDroid or aprs.fi iOS) + APRS-IS RX/TX iGate over WiFi + Digipeater + DV (with Codec2 Walkie-Talkie)
https://github.com/sh123/esp32_loraprs
GNU General Public License v3.0
186 stars 38 forks source link

'Radio start error: -13' and 'GPIO isr service is not installed, call gpio_install_isr_service() first' #44

Closed yooshky closed 1 year ago

yooshky commented 1 year ago

What is wrong? Errors:

  1. setupRig : Radio start error: -13
  2. gpio: gpio_isr_handler_remove(480): GPIO isr service is not installed, call gpio_install_isr_service() first

From console:

configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13864
load:0x40080400,len:3608
entry 0x400805f0
[INFO] printConfig : Current mode: NORMAL
[INFO] printConfig : Using TNC KISS and AX.25 mode
[INFO] printConfig : UsbSerialEnable: no
[INFO] setupRig : Initializing LoRa
[INFO] setupRig : Frequency: 434855000 Hz
[INFO] setupRig : Bandwidth: 125000 Hz
[INFO] setupRig : Spreading: 9
[INFO] setupRig : Coding rate: 7
[INFO] setupRig : Power: 30 dBm
[INFO] setupRig : Sync: 0x12
[INFO] setupRig : CRC: 1
[INFO] setupRig : Header: explicit
[INFO] setupRig : Speed: 1255 bps
[INFO] setupRig : TOA (compressed): 0.24 sec
[INFO] setupRig : TOA (uncompressed): 0.41 sec
[INFO] setupRig : Min level: -129.63 dBm
**[ERROR] setupRig : Radio start error: -13**
[INFO] setupRig : Using SX126X module
**E (103) gpio: gpio_isr_handler_remove(480): GPIO isr service is not installed, call gpio_install_isr_service() first**
[INFO] setupRig : LoRa initialized
[INFO] setupBt : BT init[INFO] rigTask : Radio task started
 loraprs
[INFO] setupBt : BT initialized
[TRACE] onSerialRx : � c0
[TRACE] onSerialRx :  0
[TRACE] onRigTxBegin : onRigTxBegin
[TRACE] onSerialRx : � 82
[...]

PINOUT:

//in pins_arduino.h
//TX = 1;
//RX = 3;
//SDA = 21;
//SCL = 22;
//SS    = 5;
//MOSI  = 23;
//MISO  = 19;
//SCK   = 18;

//in config.h:
#define CFG_LORA_PIN_SS         5
#define CFG_LORA_PIN_RST        14
#define CFG_LORA_PIN_A          33 //DIO1
#define CFG_LORA_PIN_B          39 //BUSY - SVN 
#define CFG_LORA_PIN_RXEN       2
#define CFG_LORA_PIN_TXEN       4
#define BUILTIN_LED             12

Board: AZ-Delivery (esp32-wroom-32), ESP32 Dev module (in Arduino IDE from Board Manager), Radio module: E22 400M30S

No errors while compiling:

C:\Users\does_not_matter\Documents\Arduino\esp32_loraprs\esp32_loraprs.ino:11:48: note: #pragma message: Using default built-in config
 #pragma message("Using default built-in config")
                                                ^
C:\Users\does_not_matter\Documents\Arduino\esp32_loraprs\esp32_loraprs.ino:16:45: note: #pragma message: Configured for client mode
 #pragma message("Configured for client mode")
                                             ^
C:\Users\does_not_matter\Documents\Arduino\esp32_loraprs\loraprs_service.cpp: In member function 'void LoraPrs::Service::setupRig(long int, long int, int, int, int, int, int, bool)':
C:\Users\does_not_matter\Documents\Arduino\esp32_loraprs\loraprs_service.cpp:226:35: note: #pragma message: Using SX126X
     #pragma message("Using SX126X")
sh123 commented 1 year ago

https://jgromes.github.io/RadioLib/group__status__codes.html

define | RADIOLIB_ERR_INVALID_OUTPUT_POWER   (-13)

These modules do not support 30dBm power, they support maximum 22dBm, power level is for module only, they have 10db amplifier, so you need to set power to -10dbm of required, in your case it will be 30-10=20.

https://github.com/jgromes/RadioLib/wiki/High-power-Radio-Modules-Guide

yooshky commented 1 year ago

OK, I see. I forgot the PA in the module. I changed the power to 20. Thanx.

Does this error matter? E (103) gpio: gpio_isr_handler_remove(480): GPIO isr service is not installed, call gpio_install_isr_service() first

sh123 commented 1 year ago

I think it is not fatal, more like freertos warning.

yooshky commented 1 year ago

I'm not sure. The effect is that it does not transmit and does not receive. I'm broken. Pin RXEN permanently high, TXEN is permanently low. LED flashes, KISS over BT works great,... RadioLib reports no problems. Only 'GPIO isr service is not installed, call gpio_install_isr_service() first'...

Pins def.:

//TX (1)                  <-> NC    (USB CONV ON BOARD AZ-Delivery?) [def. pins_arduino.h]
//RX (3)                  <-> NC    (USB CONV ON BOARD AZ-Delivery?) [def. pins_arduino.h]
//SDA (21)                <-> NC    [def. pins_arduino.h]
//SCL (22)                <-> NC    [def. pins_arduino.h]
//SS (5)                  <-> NSS   (E22 400M30S) [def. pins_arduino.h] <---------
//MOSI (23)               <-> MOSI  (E22 400M30S) [def. pins_arduino.h]          |
//MISO (19)               <-> MISO  (E22 400M30S) [def. pins_arduino.h]          |
//SCK (18)                <-> SCK   (E22 400M30S) [def. pins_arduino.h]          |
//CFG_LORA_PIN_SS (5)     <-> NSS   (E22 400M30S) [def. config.h] <--------------
//CFG_LORA_PIN_RST (14)   <-> NRST  (E22 400M30S) [def. config.h]
//CFG_LORA_PIN_A (16)     <-> DIO1  (E22 400M30S) [def. config.h]
//CFG_LORA_PIN_B (17)     <-> BUSY  (E22 400M30S) [def. config.h]
//CFG_LORA_PIN_RXEN (27)  <-> RXEN  (E22 400M30S) [def. config.h]
//CFG_LORA_PIN-TXEN (26)  <-> TXEN  (E22 400M30S) [def. config.h]
//BUILTIN_LED (25)        <-> Ext. LED [def. config.h]
//PTT_PIN (12)            <-> NC (disabled) [def. config.h]
//5v                      <-> VCC 2 pads (E22 400M30S) + capacitors 
//GND                     <-> GND 7 pads without ANT (E22 400M30S)

Arduino IDE - 2.0.3 ESP32 - Arduino IDE - 2.0.5 DebugLog lib - 0.6.5 RadioLib - 5.5.0 Arduino Timer - 2.3.1 CircularBuffer - 1.3.3

sh123 commented 1 year ago

I have the same message from FreeRTOS and it works fine. It is just consequence of clearDio1Action when it is not set. It just says that it tries to clear isr which is not installed.

I've added change to avoid this clear if it unset, but it won't help if it does not work. Need to make sure that pinouts are correct. Do you have CFG_LORA_PIN_RST correctly defined?

yooshky commented 1 year ago

GPIO14 ESP32 is connected to NRST pad in module E22 400M30S Pin permanently high. I added 100nF and 100uF VCC-GND capacitors too

config.h: #define CFG_LORA_PIN_RST 14

I'll check if the Radiolib examples work. This is my first time with the E22 module

yooshky commented 1 year ago

The examples from RadioLib works fine. My pinout is ok. The transmitter works when I manually set the TXN and RXN pins - digitalWrite(27, HIGH); digitalWrite(26, LOW); etc.; and automatically in RadioLib - radio.setRfSwitchPins(27, 26); I send my APRS position manually int state = radio.transmit("SP9xxx-5>SP9xxx,WIDE2-2:!50xx.xxN/019xx.xxE>TEST LORA /73"); I am received correctly. I haven't checked the interrupts yet, I had no time.

sh123 commented 1 year ago

If pinouts are correct and transmission does not work then I need more information, logs from console with TRACE level, information about your KISS client, is it APRSDroid?

yooshky commented 1 year ago

Yes, I was using APRSDroid in KISS mode over BT with TRACE logging level. Position set manually. Something like that:

[TRACE] onSerialRx : S 53
[TRACE] onSerialRx : P 50
[TRACE] onSerialRx : 9 39
[TRACE] onSerialRx : I 49
[TRACE] onSerialRx : N 4e
[TRACE] onSerialRx : Z 5a
[TRACE] onSerialRx : - 2d
[TRACE] onSerialRx : 4 34
[TRACE] onSerialRx : > 3e
[TRACE] onSerialRx : A 41
[TRACE] onSerialRx : P 50
[TRACE] onSerialRx : D 44
[TRACE] onSerialRx : R 52
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : 6 36
[TRACE] onSerialRx : , 2c
[TRACE] onSerialRx : W 57
[TRACE] onSerialRx : I 49
[TRACE] onSerialRx : D 44
[TRACE] onSerialRx : E 45
[TRACE] onSerialRx : 2 32
[TRACE] onSerialRx : - 2d
[TRACE] onSerialRx : 2 32
[TRACE] onSerialRx : : 3a
[TRACE] onSerialRx : = 3d
[TRACE] onSerialRx : 5 35
[TRACE] onSerialRx : 0 30
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : 7 37
[TRACE] onSerialRx : . 2e
[TRACE] onSerialRx : 5 35
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : N 4e
[TRACE] onSerialRx : / 2f
[TRACE] onSerialRx : 0 30
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : 9 39
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : 0 30
[TRACE] onSerialRx : . 2e
[TRACE] onSerialRx : 8 38
[TRACE] onSerialRx : 4 34
[TRACE] onSerialRx : E 45
[TRACE] onSerialRx : > 3e
[TRACE] onSerialRx :   20
[TRACE] onSerialRx : 
 a
[TRACE] onSerialRx : S 53
[TRACE] onSerialRx : P 50
[TRACE] onSerialRx : 9 39
[TRACE] onSerialRx : I 49
[TRACE] onSerialRx : N 4e
[TRACE] onSerialRx : Z 5a
[TRACE] onSerialRx : - 2d
[TRACE] onSerialRx : 4 34
[TRACE] onSerialRx : > 3e
[TRACE] onSerialRx : A 41
[TRACE] onSerialRx : P 50
[TRACE] onSerialRx : D 44
[TRACE] onSerialRx : R 52
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : 6 36
[TRACE] onSerialRx : , 2c
[TRACE] onSerialRx : W 57
[TRACE] onSerialRx : I 49
[TRACE] onSerialRx : D 44
[TRACE] onSerialRx : E 45
[TRACE] onSerialRx : 2 32
[TRACE] onSerialRx : - 2d
[TRACE] onSerialRx : 2 32
[TRACE] onSerialRx : : 3a
[TRACE] onSerialRx : = 3d
[TRACE] onSerialRx : 5 35
[TRACE] onSerialRx : 0 30
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : 7 37
[TRACE] onSerialRx : . 2e
[TRACE] onSerialRx : 5 35
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : N 4e
[TRACE] onSerialRx : / 2f
[TRACE] onSerialRx : 0 30
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : 9 39
[TRACE] onSerialRx : 1 31
[TRACE] onSerialRx : 0 30
[TRACE] onSerialRx : . 2e
[TRACE] onSerialRx : 8 38
[TRACE] onSerialRx : 4 34
[TRACE] onSerialRx : E 45
[TRACE] onSerialRx : > 3e
[TRACE] onSerialRx :   20
[TRACE] onSerialRx : 
 a

Nothing more after sending position in APRSDroid. The waterfall on my RSP1 is empty. Pin RXEN permanently HIGH, TXEN permanently LOW. This is a fragment of old logs that I left in the console. I'll do it again later and post the logs.

sh123 commented 1 year ago

Is it text based mode or ax.25? I see raw text, if you are using text based packets in APRSDroid you need to set corresponding config key CFG_TEXT_PACKETS to true, it cannot automatically distinguish between ax.25 and text packets. It works either as ax.25 modem or as text based modem compatible with other non-ax.25 trackers with their "proprietary" protocol prefixed with '<', 0xff, 0x01 bytes.

yooshky commented 1 year ago

Indeed, text. I've tried different formats. I'll check again soon.

yooshky commented 1 year ago

It works! That's the reason #define CFG_TEXT_PACKETS true Otherwise the APRSDroid does not work.

The receiver works great. But such frames are sent:

2022-12-11 10:44:03 CET: INZ-4>APDR16,WIDE2-2,QA1M3,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:45:34 CET: INZ-4>APDR16,WIDE2-2,QA1M2,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:47:19 CET: INZ-4>APDR16,WIDE2-2,QA1M2,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:49:04 CET: INZ-4>APDR16,WIDE2-2,QA1M3,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:50:48 CET: INZ-4>APDR16,WIDE2-2,QA1M3,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:52:33 CET: INZ-4>APDR16,WIDE2-2,QA1M2,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:54:18 CET: INZ-4>APDR16,WIDE2-2,QA1M2,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:56:03 CET: INZ-4>APDR16,WIDE2-2,Q00L9,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 11:01:27 CET: INZ-4>APDR16,WIDE2-2,Q1492,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 11:02:25 CET: INZ-4>APDR16,WIDE2-2,Q1491,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 11:02:39 CET: INZ-4>APDR16,WIDE2-2,Q1392,qAR,SP9QLJ-3:=5017.54N/01910.83E>

https://aprs.fi/?c=raw&call=INZ-4

My correct sign: SP9INZ. Same thing happens when i sending from RadioLib example radio.transmit("SP9INZ-4>APDR16,WIDE2-2:!5017.51N/01910.84E>"); The command radio.transmit(" SP9INZ-4>APDR16,WIDE2-2:!5017.51N/01910.84E>"); (4 extra spaces before the sign) gives the correct effect.

Thank you very much for your time

sh123 commented 1 year ago

CFG_TEXT_PACKETS true enables text based mode, which is compatible with https://github.com/lora-aprs/, they use proprietary protocol with 3 bytes prefix. To utilize it APRSDroid should use TNC2 text based mode. Myself I use only ax.25, because all open source tools use it and AFSK APRS making it compatible with them, this way it is possible to use modem in USB KISS or TCPIP KISS mode with raspberry and use AX.25 tools from linux.

yooshky commented 1 year ago

I have APRSDroid in TNC2 mode right now. Otherwise don't working.

sh123 commented 1 year ago

If you set CFG_TEXT_PACKETS to false and use TNC KISS mode on APRSDroid then you need to receive it on the tracker which supports AX.25.

yooshky commented 1 year ago

With this setting, ESP32 does not forward received data to APRSDroid (KISS). Sent data from APRSDroid in KISS mode are not decoded by gates and repeaters. I guess that's where my problem lies. APRSDroid and ESP32_lora don't understand each other (AX.25 and ASCII?)

[TRACE] onRigTxBegin : onRigTxBegin<\n>
[TRACE] onSerialRx : ‚ 82<\n>
[TRACE] onRigTx : ‚ 82<\n>
[TRACE] onSerialRx :   a0<\n>
[TRACE] onRigTx :   a0<\n>
[TRACE] onSerialRx : ˆ 88<\n>
[TRACE] onRigTx : ˆ 88<\n>
[TRACE] onSerialRx : ¤ a4<\n>
[TRACE] onRigTx : ¤ a4<\n>
[TRACE] onSerialRx : b 62<\n>
[TRACE] onRigTx : b 62<\n>
[TRACE] onSerialRx : l 6c<\n>
[TRACE] onRigTx : l 6c<\n>
[TRACE] onSerialRx : Ĺ• e0<\n>
[TRACE] onRigTx : Ĺ• e0<\n>
[TRACE] onSerialRx : ¦ a6<\n>
[TRACE] onRigTx : ¦ a6<\n>
[TRACE] onSerialRx :   a0<\n>
[TRACE] onRigTx :   a0<\n>
[TRACE] onSerialRx : r 72<\n>
[TRACE] onRigTx : r 72<\n>
[TRACE] onSerialRx : ’ 92<\n>
[TRACE] onRigTx : ’ 92<\n>
[TRACE] onSerialRx : Ĺ› 9c<\n>
[TRACE] onRigTx : Ĺ› 9c<\n>
[TRACE] onSerialRx : ´ b4<\n>
[TRACE] onRigTx : ´ b4<\n>
[TRACE] onSerialRx : h 68<\n>
[TRACE] onRigTx : h 68<\n>
[TRACE] onSerialRx : ® ae<\n>
[TRACE] onRigTx : ® ae<\n>
[TRACE] onSerialRx : ’ 92<\n>
[TRACE] onRigTx : ’ 92<\n>
[TRACE] onSerialRx : ˆ 88<\n>
[TRACE] onRigTx : ˆ 88<\n>
[TRACE] onSerialRx : Ĺ  8a<\n>
[TRACE] onRigTx : Ĺ  8a<\n>
[TRACE] onSerialRx : d 64<\n>
[TRACE] onRigTx : d 64<\n>
[TRACE] onSerialRx : @ 40<\n>
[TRACE] onRigTx : @ 40<\n>
[TRACE] onSerialRx : e 65<\n>
[TRACE] onRigTx : e 65<\n>
[TRACE] onSerialRx : <3> 3<\n>
[TRACE] onRigTx : <3> 3<\n>
[TRACE] onSerialRx : Ä‘ f0<\n>
[TRACE] onRigTx : Ä‘ f0<\n>
[TRACE] onSerialRx : = 3d<\n>
[TRACE] onRigTx : = 3d<\n>
[TRACE] onSerialRx : 5 35<\n>
[TRACE] onRigTx : 5 35<\n>
[TRACE] onSerialRx : 0 30<\n>
[TRACE] onRigTx : 0 30<\n>
[TRACE] onSerialRx : 1 31<\n>
[TRACE] onRigTx : 1 31<\n>
[TRACE] onSerialRx : 7 37<\n>
[TRACE] onRigTx : 7 37<\n>
[TRACE] onSerialRx : . 2e<\n>
[TRACE] onRigTx : . 2e<\n>
[TRACE] onSerialRx : 5 35<\n>
[TRACE] onRigTx : 5 35<\n>
[TRACE] onSerialRx : 3 33<\n>
[TRACE] onRigTx : 3 33<\n>
[TRACE] onSerialRx : N 4e<\n>
[TRACE] onRigTx : N 4e<\n>
[TRACE] onSerialRx : / 2f<\n>
[TRACE] onRigTx : / 2f<\n>
[TRACE] onSerialRx : 0 30<\n>
[TRACE] onRigTx : 0 30<\n>
[TRACE] onSerialRx : 1 31<\n>
[TRACE] onRigTx : 1 31<\n>
[TRACE] onSerialRx : 9 39<\n>
[TRACE] onRigTx : 9 39<\n>
[TRACE] onSerialRx : 1 31<\n>
[TRACE] onRigTx : 1 31<\n>
[TRACE] onSerialRx : 0 30<\n>
[TRACE] onRigTx : 0 30<\n>
[TRACE] onSerialRx : . 2e<\n>
[TRACE] onRigTx : . 2e<\n>
[TRACE] onSerialRx : 9 39<\n>
[TRACE] onRigTx : 9 39<\n>
[TRACE] onSerialRx : 1 31<\n>
[TRACE] onRigTx : 1 31<\n>
[TRACE] onSerialRx : E 45<\n>
[TRACE] onRigTx : E 45<\n>
[TRACE] onSerialRx : > 3e<\n>
[TRACE] onRigTx : > 3e<\n>[
[TRACE] onSerialRx :   20<\n>
[TRACE] onRigTx :   20<\n>
[TRACE] onSerialRx : Ĺ” c0<\n>
[TRACE] onRigTxEnd : onRigTxEnd 44<\n>
[TRACE] onRigTaskTxPacket : onRigTaskTxPacket 44<\n>
[TRACE] onRigTaskRxPacket : onRigTaskRxPacket 93<\n>
yooshky commented 1 year ago

At this point there is probably no chance to use APRSDroid with your software. Thank you very much for your help and time and support.

sh123 commented 1 year ago

Which gates are you using? Are they ax.25 gates or lora-aprs gates? If you want to use ax.25 gate then you need to use TNC (KISS) mode in APRSDroid and set CFG_TEXT_PACKETS to false, if you want to use lora-aprs gate then you need to use TNC2 mode in APRSDroid and set CFG_TEXT_PACKETS to true. If you are using some gate, which is nor ax.25 neither lora-aprs, then you need to use firmware, which has protocol compatible with your gate or I need to add support for this protocol into this firmware. There is no common standard. So far, it is AX.25 for VHF AFSK APRS, this project is using the same format, but over LoRa, so it should be compatible with AX.25 Linux stack and tools to some degree.

yooshky commented 1 year ago

There are a lot of LoRa APRS gateways and repeaters in my area (https://aprs.fi/#!mt=roadmap&z=11&lat=50.2928&lng=19.1805). I have no problem with the SX127x chips. All software works for me. However, I wanted a tracker on the E22 400M30S due to more power.

yooshky commented 1 year ago

When i set CFG_TEXT_PACKETS to true and TNC2 in APRSDroid the effect is like this:

2022-12-11 10:44:03 CET: INZ-4>APDR16,WIDE2-2,QA1M3,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:45:34 CET: INZ-4>APDR16,WIDE2-2,QA1M2,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:47:19 CET: INZ-4>APDR16,WIDE2-2,QA1M2,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:49:04 CET: INZ-4>APDR16,WIDE2-2,QA1M3,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:50:48 CET: INZ-4>APDR16,WIDE2-2,QA1M3,qAR,SP9QLJ-3:=5017.53N/01910.74E>
2022-12-11 10:52:33 CET: INZ-4>APDR16,WIDE2-2,QA1M2,qAR,SP9QLJ-3:=5017.53N/01910.74E>

cuts off my sign (SP9INZ). Software in my area and throughout Europe is compatible with https://github.com/lora-aprs/LoRa_APRS_iGate I use this for SX1278 (e.g. RFM9x).

Also works: https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS,

sh123 commented 1 year ago

Are they based on https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS? I think it is text based TNC2 and does not use 3 bytes prefix, I'll add one flag to support that, so it will work in TNC2

sh123 commented 1 year ago

Added change, pull from master, by default it will work without 3 byte prefix, if this interoperability is needed then there is a key CFG_TEXT_PACKETS_PREFIX which needs to be set to true, but default it is false.

yooshky commented 1 year ago

Still cuts sign 2022-12-11 17:40:38 CET: INZ-4>APDR16,WIDE2-2,qAR,SQ9IWE-2:=5017.52N/01910.84E> https://aprs.fi/#!call=a%2FINZ-4&timerange=3600&tail=3600 Raw text via LoRa:

int state = radio.transmit("SP9INZ-5>SP9INZ,WIDE1-1,WIDE2-2:!5017.51N/01910.84E>TEST, LORA 1W tracker /73"); 

gives the same effect.

This:

int state = radio.transmit("    SP9INZ-5>SP9INZ,WIDE1-1,WIDE2-2:!5017.51N/01910.84E>TEST, LORA 1W tracker /73"); 

causes the frame to be received correctly.

sh123 commented 1 year ago

https://github.com/oe3cjb/TTGO-T-Beam-LoRa-APRS/blob/master/lib/BG_RF95/BG_RF95.cpp

// Skip the 4 headers that are at the beginning of the rxBuf
    if (*len > _bufLen-BG_RF95_HEADER_LEN)
        *len = _bufLen-(BG_RF95_HEADER_LEN-1);

Ok, so it drops 4 bytes at the beginning... I'll add that

yooshky commented 1 year ago

Receiving the work is nice image

sh123 commented 1 year ago

Started working without 4 byte cut?

yooshky commented 1 year ago

No, in a moment

sh123 commented 1 year ago

I've added change, need to set CFG_TEXT_PACKETS_4 to true then it will add 4 bytes and drop 4 byte when receiving.

yooshky commented 1 year ago

APRSDroid received frames well: Image

yooshky commented 1 year ago

Still cuts off my sign (3 first bytes) and in received frames too (1 first byte)

2022-12-11 17:47:32 CET: INZ-4>APDR16,WIDE2-2,qAR,SQ9IWE-2:=5017.52N/01910.84E> 
2022-12-11 17:49:17 CET: INZ-4>APDR16,WIDE2-2,Q1491,qAR,SP9QLJ-3:=5017.52N/01910.84E>
2022-12-11 17:49:17 CET: INZ-4>APDR16,WIDE2-2,qAR,SQ9IWE-2:=5017.52N/01910.84E> 
2022-12-11 17:50:55 CET: INZ-4>APDR16,WIDE2-2,QA4M6,qAR,SP9QLJ-2:=5017.52N/01910.84E>

config:

#define CFG_TEXT_PACKETS      true   // enable aprs text packets instead of binary for interoperability with other projects (disables KISS + AX.25!)
#define CFG_TEXT_PACKETS_3    false   // true - enable aprs-lora 3 byte prefix '<', 0xff, 0x01
#define CFG_TEXT_PACKETS_4    true   // true - enable oe3cjb 4 byte prefix

APRSDroid screen: Image

yooshky commented 1 year ago

Do not drop anything in the received frames. It was good

sh123 commented 1 year ago

Then just set CFG_TEXT_PACKETS_4 to false

yooshky commented 1 year ago

Then just set CFG_TEXT_PACKETS_4 to false Image

sh123 commented 1 year ago

From the '<' prefix it looks like you need to set CFG_TEXT_PACKETS_3 to true instead.

yooshky commented 1 year ago

It does not add bytes in sent frames

sh123 commented 1 year ago

You want to add bytes to sent frames, but not drop for received? I do not understand this protocol.

yooshky commented 1 year ago

You want to add bytes to sent frames, but not drop for received? I do not understand this protocol.

Yes, 3 bytes. Image

sh123 commented 1 year ago

try from master commented out prefix drop

yooshky commented 1 year ago

Now it adds bytes to received, not add to sent

Image

sh123 commented 1 year ago

So, it should add 4 bytes into sent, but drop 3 in received?

yooshky commented 1 year ago

Should add 3 bytes to sent but drop 0 to received :)

sh123 commented 1 year ago

It was like that with latest change

yooshky commented 1 year ago

Unfortunately it does not work. It's the other way around, Does not add bytes to the sent frames, there are additional 3 bytes in the received ones. Look: Image

yooshky commented 1 year ago
#define CFG_TEXT_PACKETS_3    false
#define CFG_TEXT_PACKETS_4    true 

effect:
Image

#define CFG_TEXT_PACKETS_3    true 
#define CFG_TEXT_PACKETS_4    true 

effect: Image

#define CFG_TEXT_PACKETS_3    true
#define CFG_TEXT_PACKETS_4    false 

effect: Image

#define CFG_TEXT_PACKETS_3    false
#define CFG_TEXT_PACKETS_4    false 

effect: Image

Green - sent by me Blue/gray - received

yooshky commented 1 year ago

First attempts: Image

I wrote a short program - GPS (UART) + NMEA parser and sending via RadioLib. Unfortunately, I still can't use your software.

sh123 commented 1 year ago

Hi, please provide more information about your setup and software. Which tracker is used when you are trying to send and receive to this tracker and which software is used on the iGate.

yooshky commented 1 year ago

Gateways in my area use this: https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS and/or this: https://github.com/dl9sau/TTGO-T-Beam-LoRa-APRS as TNC.

In my other projects I use: https://github.com/lora-aprs/LoRa_APRS_iGate and https://github.com/lora-aprs/LoRa_APRS_Tracker. I have no compatibility issues.

When I send via LoRa, the text "SP9INZ-5>TEST,WIDE2-2...." via radio.transmit() from RadioLib, they receive with the first 3 bytes truncated: "INZ-5>TEST....".

The same happens when I send from APRSDroid through your TNC software (TNC2).

When I send via LoRa, the text etc. "123SP9INZ-5>TEST,WIDE2-2...." via radio.transmit() from RadioLib, they receive corectly (without "123"). Iin my working simple tracker i add unsigned char byte_tab[] = { 0x3c, 0xff, 0x01 }; and it works too.

You should insert 3 bytes in frames going out via LoRa. Do not change anything in received.

Sorry for my English. It's not my native language

sh123 commented 1 year ago

If you set CFG_TEXT_PACKETS and CFG_TEXT_PACKETS_3 to true it appends 0x3c, 0xff, 0x01 and expects these 3 bytes when receiving. This feature was there since beginning.

yooshky commented 1 year ago

Then it works like this: image

See this screenshot? Do not add bytes in data received via LoRa.

sh123 commented 1 year ago

I do not add 3 bytes, I drop 3 bytes if they are equal to '<', 0xff, 0x01 in received packet and when these flags above are set to true, do you have packet dump from console when receiving?