nakhonthai / ESP32APRS_T-TWR

APRS Software project device support LILYGO T-TWR Plus.
GNU General Public License v3.0
90 stars 15 forks source link

ESP32APRS_T-TWR crashes when SQL level equal to zero. #14

Open om0wt opened 6 months ago

om0wt commented 6 months ago

I'm using latest firmware version (0.3 and 0.3b). Whe I select SQL Level equal to zero via webgui, (Radio tab) I experiece irregular T-TWR Plus crashes/reboots. The crashes doesn't occure when SQL Level equal to 1.

Crash example from PlatformIO monitor:

[ 78748][D][main.cpp:3666] taskNetwork(): INET: SR9NWJ>APU25N,TCPIP*,qAC,T2RADOM:<IGATE,MSG_CNT=0,LOC_CNT=1

[ 79817][D][AFSK.cpp:862] AFSK_Poll(): Audio dc_offset=1726 mVrms=313
[ 81511][D][main.cpp:3666] taskNetwork(): INET: UR7D-6>APMI04,TCPIP*,qAS,UR7DWW-1:@220156I4837.14N/02220.22E# UR7Dteam@gmail.com  50 MHz-24 GHZ contest

[ 91547][D][main.cpp:3666] taskNetwork(): INET: UR7D-6>APMI04,TCPIP*,qAS,UR7DWW-1:;UR0DVC   *220156z4836.70N/02220.50Er145.625 -0.6 t173.8 YSF

[ 96269][D][main.cpp:3666] taskNetwork(): INET: UR7D-6>APMI04,TCPIP*,qAS,UR7DWW-1:;UR0DUC   *220156z4837.05N/02220.45Er438.650 -7.6 DMR

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x42061608  PS      : 0x00060930  A0      : 0x8205d594  A1      : 0x3fcebf00  
A2      : 0x00b50090  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000  
A6      : 0x00060023  A7      : 0x00000003  A8      : 0x00000000  A9      : 0x3fcebed0  
A10     : 0x00000000  A11     : 0x3fcebf0c  A12     : 0x00000000  A13     : 0x7b450000  
A14     : 0x00000001  A15     : 0x3fcea0e0  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00b50090  LBEG    : 0x40056f5c  LEND    : 0x40056f72  LCOUNT  : 0xffffffff  

Backtrace: 0x42061605:0x3fcebf00 0x4205d591:0x3fcebf30 0x4205d663:0x3fcebf50 0x42061bfe:0x3fcebf70

  #0  0x42061605:0x3fcebf00 in uartAvailable at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:313
  #1  0x4205d591:0x3fcebf30 in HardwareSerial::available() at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:478
  #2  0x4205d663:0x3fcebf50 in serialEventRun() at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:123
  #3  0x42061bfe:0x3fcebf70 in loopTask(void*) at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:51 (discriminator 1)

ELF file SHA256: 8240bef067d3c163

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x42163bb6
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4
[   375][V][WiFiServer.h:42] WiFiServer(): WiFiServer::WiFiServer(port=80, ...)
[   375][V][WebServer.cpp:87] WebServer(): WebServer::Webserver(port=80)
[   402][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[   427][D][main.cpp:1993] setup(): Start ESP32IGate V0.3
[   428][D][main.cpp:1995] setup(): Total heap: 315204
[   428][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=8 scl=9 freq=400000
[   435][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[   442][D][main.cpp:1724] setupPower(): ->  getSysPowerDownVoltage:2600

[   453][D][main.cpp:1793] setupPower(): DCDC=======================================================================
[   457][D][main.cpp:1794] setupPower(): DC1  : +   Voltage:3300 mV 

[   464][D][main.cpp:1795] setupPower(): DC2  : -   Voltage:900 mV 

[   470][D][main.cpp:1796] setupPower(): DC3  : +   Voltage:3400 mV 

[   476][D][main.cpp:1797] setupPower(): DC4  : -   Voltage:1100 mV 

[   482][D][main.cpp:1798] setupPower(): DC5  : +   Voltage:3300 mV 

[   489][D][main.cpp:1799] setupPower(): ALDO=======================================================================
[   499][D][main.cpp:1800] setupPower(): ALDO1: +   Voltage:3300 mV

[   505][D][main.cpp:1801] setupPower(): ALDO2: +   Voltage:3300 mV

[   511][D][main.cpp:1802] setupPower(): ALDO3: +   Voltage:3300 mV

[   517][D][main.cpp:1803] setupPower(): ALDO4: +   Voltage:3300 mV

[   523][D][main.cpp:1804] setupPower(): BLDO=======================================================================
[   534][D][main.cpp:1805] setupPower(): BLDO1: +   Voltage:3300 mV

[   540][D][main.cpp:1806] setupPower(): BLDO2: +   Voltage:3300 mV

[   546][D][main.cpp:1807] setupPower(): ===========================================================================
[   557][D][main.cpp:1812] setupPower(): PowerKeyPressOffTime:
[   562][D][main.cpp:1816] setupPower(): 4 Second
[   567][D][main.cpp:1833] setupPower(): PowerKeyPressOnTime:
[   572][D][main.cpp:1837] setupPower(): 128 Ms
[   588][D][XPowersAXP2101.tpp:3033] setInterruptImpl(): DISABLE - HEX:0xffffffff 

[   591][D][XPowersAXP2101.tpp:3033] setInterruptImpl(): ENABLE - HEX:0x18fc00 

[   599][D][main.cpp:1911] setupPower(): Val = 22
[   602][D][main.cpp:1912] setupPower(): Setting Charge Target Current : 15383
[   609][D][main.cpp:1918] setupPower(): Setting Charge Target Voltage : 4200
[   618][W][sd_diskio.cpp:174] sdCommand(): no token received
[   721][W][sd_diskio.cpp:174] sdCommand(): no token received
[   821][W][sd_diskio.cpp:174] sdCommand(): no token received
[   921][E][sd_diskio.cpp:199] sdCommand(): Card Failed! cmd: 0x00
[   921][W][sd_diskio.cpp:516] ff_sd_initialize(): GO_IDLE_STATE failed
[   922][E][sd_diskio.cpp:802] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
[   931][W][sd_diskio.cpp:174] sdCommand(): no token received
[  1036][W][sd_diskio.cpp:174] sdCommand(): no token received
[  1136][W][sd_diskio.cpp:174] sdCommand(): no token received
[  1236][E][sd_diskio.cpp:199] sdCommand(): Card Failed! cmd: 0x00
[  1237][W][Wire.cpp:301] begin(): Bus already started in Master Mode.
[  2357][D][main.cpp:2057] setup(): EEPROM Check 87h=87h(1752Byte)

[  2357][D][main.cpp:1418] RF_MODULE(): RF Module SA868_UHF Init
[  3900][D][main.cpp:1489] RF_MODULE(): +DMOERROR

[  3942][D][main.cpp:1492] RF_MODULE(): +DMOCONNECT:0

[  3942][D][main.cpp:1495] RF_MODULE(): Write to SA868: AT+DMOSETGROUP=0,432.5000,432.5000,0000,0,0000

[  4032][D][main.cpp:1497] RF_MODULE(): +DMOSETGROUP:0

[  4080][D][main.cpp:1500] RF_MODULE(): +DMOSETTAIL:0

[  4137][D][main.cpp:1503] RF_MODULE(): +DMOSETFILTER:0

[  4193][D][main.cpp:1506] RF_MODULE(): +DMOSETVOLUME:0

[  4304][D][main.cpp:2113] setup(): Free heap: 277968
[  4304][D][main.cpp:2114] setup(): Total PSRAM: 8386215
[  4304][D][main.cpp:2115] setup(): Free PSRAM: 8242495
[  [4  30438]08[D]][D[A][FSmaKi.ncp.pc:p2p5:38]53 A2]F StK_asinkiNett(w)o: rkA(FS):K  soTfastwk aNree tIwonirtk iahlaisz bee
n start
[  4315][D][AFSK.cpp:228] AFSK_hw_init(): AFSK hardware Initialize
[  43[3 0 ]4[3D3]0[]A[FDS]K[.WcipFpi:G5e9n]e rciocn.tcipnpu:o1u03_5a]d c__eivneintt(C)a:l labdacc_kd(i)g:i _Ainrdituiianlo izEvee
t: 0 -[   W4I3FI32_R][EAD]D[YA
:K.cpp:70[[    44336677]][[VI]][[WWiiFFiiGMeunletrii.cc.pcpp:p8:43]4 0a]d d_AaPr(d)u:i n[oW_IeFvIe]n[tA_Pclbi(s)t:A dSdT]A  aSdtda rStSeIdD
   4368[ ][ 4D]36[8Wi][FiVG]e[nWeiFriiGc.enceprp:ic10.3cp5p]: 3_9ev2]en _taCardlluibanoc_ke(v)e: nAtr_cdub(in):o  AEvP enStt:ar 2te -d
]A_START
 co nti[ nu 437ou5s][_aDd]c[Wi_FiniGite(ne)r: icad.ccp_pd:i1gi0_35co] n_feviegn
C[ a l4l3ba79ck]([D)]:[ AAFrdSKui.cnpo p:Ev82en] t:co 1nt0 i-n uoAuP_sS_aTAdcRT_i
nitx(b8):3 
dc_di[ gi 4_c38on3t][roV]ll[WeriF
Ge[n  er43ic8.5c][ppI]:9[A7F]S sK.etc_pep:sp93_] icntonetrfinacuoe_usi_pa(d)c: _iConnitf(i)g: u[ri--ng( TSAGof AtADCP  DstMAat)ic- -]I Pa:d c19_p2.a1t6te8.rn4.[01,]. MatAStKe:n  2is5 5:.235
.[ 25 54.3093,] G[IW:] [1A9F2SK.1.c68pp.4:9.24]54 c
ntinu[o  us43_9a6dc][_iV]ni[tWi()Fi:G e[-ne-r(iTAc.G cpADp:C1 4DM3A]) s--e]t_ aesdp_ci_pntaettrefarnce[0_i].pc(h):an nSoelf tiAP:s  :1902
.[1  6844.40.2]1 [I| ][GaAFteSKwa.yc:pp 1:9952]. 1c68on.4t.in2u5o4u s| _aDHdcC_P inStitar()t::  [0.--0.(T0.AG0  A|D NC etDMmaAs)k--: ] 2a55dc._2p5a5.t2te55rn.[00
.u[ ni 4t 4i0s9] :0[V
[WiFiGe[n  er44ic10.c]p[pW]:1[e9sp03] 2-sehtal_e-tspim_eirn.tcer2fa2c6]e _tiipm(e):rA DtHtCacP hISentrvererru RpatnFlgea:g ()19: 2.ED16GE8. t4.im2e rto i 1nt92er.1ru68pt. 4i.1s 2n
ot supported! Setting to LEVEL...
[  4421][D][main.cpp:3054] taskAPRS(): Task APRS has been start
[ 10869][V][WiFiGeneric.cpp:383] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 2
[ 10869][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[ 10874][I][WiFiMulti.cpp:114] run(): [WIFI] scan done
[ 10878][I][WiFiMulti.cpp:119] run(): [WIFI] 2 networks found
[ 10884][D][WiFiMulti.cpp:149] run():  --->   0: [1][D4:CA:6D:18:F9:E5] xb83 (-77) *
[ 10891][D][WiFiMulti.cpp:151] run():        1: [5][54:B8:0A:09:47:50] zara (-78) *
[ 10898][I][WiFiMulti.cpp:160] run(): [WIFI] Connecting BSSID: D4:CA:6D:18:F9:E5 SSID: xb83 Channel: 1 (-77)
[ 10919][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
[ 11766][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: xb83, BSSID: d4:ca:6d:18:f9:e5, Channel: 1, Auth: WPA2_PSK
[ 11767][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 11779][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got New IP:192.168.1.134
[ 11781][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 11789][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.1.134, MASK: 255.255.255.0, GW: 192.168.1.1
[ 11799][I][WiFiMulti.cpp:174] run(): [WIFI] Connecting done.
[ 11804][D][WiFiMulti.cpp:175] run(): [WIFI] SSID: xb83
[ 11809][D][WiFiMulti.cpp:176] run(): [WIFI] IP: 192.168.1.134
[ 11814][D][WiFiMulti.cpp:177] run(): [WIFI] MAC: D4:CA:6D:18:F9:E5
[ 11820][D][WiFiMulti.cpp:178] run(): [WIFI] Channel: 1
[ 11825][D][main.cpp:3582] taskNetwork(): Wi-Fi CONNECTED!
[ 11831][D][main.cpp:3583] taskNetwork(): IP address: 192.168.1.134
[ 13842][D][main.cpp:3609] taskNetwork(): Contacting Time Server

[ 16845][D][main.cpp:3743] taskNetwork(): Ping GW to 192.168.1.1

[ 16846][I][ping.cpp:314] ping_start(): PING 192.168.1.1: 32 data bytes

[ 16848][D][ping.cpp:213] ping_recv(): 60 bytes from 14.233.3.130: icmp_seq=1 time=1.449 ms

[ 17857][D][ping.cpp:213] ping_recv(): 60 bytes from 14.233.3.130: icmp_seq=2 time=1.174 ms

[ 18860][D][ping.cpp:213] ping_recv(): 60 bytes from 14.233.3.130: icmp_seq=3 time=1.198 ms

[ 19861][I][ping.cpp:331] ping_start(): 3 packets transmitted, 3 packets received, 0.0% packet loss

[ 19861][I][ping.cpp:335] ping_start(): round-trip min/avg/max/stddev = 1.174/1.274/1.449/0.124 ms

[ 19868][D][main.cpp:3746] taskNetwork(): GW Success!!
....
[232828][D][main.cpp:3666] taskNetwork(): INET: SR9VJK-0>APBM1S,TCPIP*,qAS,DMR-PL:@220200z4925.06ND02053.73E&/A=003707SR9VJK 

[233644][D][main.cpp:3666] taskNetwork(): INET: SR9VJP-0>APBM1S,TCPIP*,qAS,DMR-PL:@220200z4921.84ND02057.13E&/A=002001SR9VJP 

[244615][D][AFSK.cpp:862] AFSK_Poll(): Audio dc_offset=1722 mVrms=303
[245009][D][main.cpp:3666] taskNetwork(): INET: OM3WYM-13>APRS,TCPIP*,qAC,T2CZECH:=4859.23N/02210.55E_.../...g...t040r...p...P...h94b09882

[245319][D][main.cpp:3666] taskNetwork(): INET: OM3WYM-13>APRS,TCPIP*,qAC,T2CZECH:T#062,057,499,000,000,000,00000000

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x42061608  PS      : 0x00060930  A0      : 0x8205d594  A1      : 0x3fcebf00  
A2      : 0x00d60085  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000  
A6      : 0x00060023  A7      : 0x00000003  A8      : 0x00000000  A9      : 0x3fcebed0  
A10     : 0x00000000  A11     : 0x3fcebf0c  A12     : 0x00000000  A13     : 0xd78a0000  
A14     : 0x00000001  A15     : 0x3fcea0e0  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00d60085  LBEG    : 0x40056f5c  LEND    : 0x40056f72  LCOUNT  : 0xffffffff  

Backtrace: 0x42061605:0x3fcebf00 0x4205d591:0x3fcebf30 0x4205d663:0x3fcebf50 0x42061bfe:0x3fcebf70

  #0  0x42061605:0x3fcebf00 in uartAvailable at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:313
  #1  0x4205d591:0x3fcebf30 in HardwareSerial::available() at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:478
  #2  0x4205d663:0x3fcebf50 in serialEventRun() at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:123
  #3  0x42061bfe:0x3fcebf70 in loopTask(void*) at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:51 (discriminator 1)

ELF file SHA256: 8240bef067d3c163

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x42163bb6
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4

ESP32APRS_T-TWR runs on T-TWR Plus (https://www.aliexpress.com/item/1005005734253889.html)

Has anybody else the same problem?

lyusupov commented 6 months ago

Has anybody else the same problem?

I do.

I use the ESP32APRS with T-TWR Plus and Diamond A144S5 antenna:

When SQL = 0 and APRS packets receive activity is in progress - the system crashes every 5-10 minutes.

nakhonthai commented 6 months ago

In use debug version to hardware serial most report from internet packet (flag INET: is receive from APRS-IS). Fix by IGATE filter m/0 or use release version.

om0wt commented 6 months ago

Hi,

What do you mean by this statement? The issue manifests as well even when I flash the release firmware from GitHub release page.

What do you mean by 'm/0' ? Does it mean I'm not going to receive any APRS packet?

Thanks,

Pavol, OM0WT

podgorskik commented 6 months ago

I have the same problem. SQL in SA818 does not work properly with APRS signal. SQL level "0" is a solution but T-TWR Plus restarts automatically every few minutes using such configuration.

nakhonthai commented 6 months ago

Hi, What do you mean by this statement? The issue manifests as well even when I flash the release firmware from GitHub release page. What do you mean by 'm/0' ? Does it mean I'm not going to receive any APRS packet? Thanks, Pavol, OM0WT

From your log,It reboots because of serial hardware. Because it is a debug version,it more report. Allows you to reduce importing data from the internet, by use filter m/0 it not receive packet from internet ,but can be received from normal RF.

nakhonthai commented 6 months ago

I have the same problem. SQL in SA818 does not work properly with APRS signal. SQL level "0" is a solution but T-TWR Plus restarts automatically every few minutes using such configuration. Be careful sending RF power HI, and test change filter receiving.

om0wt commented 6 months ago

@nakhonthai Sorry, but I don't understand your comments.

As I mentioned previously, ESP32 is rebooted constantly even when we use the release firmware version downloaded from (https://github.com/nakhonthai/ESP32APRS_T-TWR/releases/tag/V0.3). In case you want to use two-way iGate configuration, I don't see m/0 as a solution to this problem.

Pavol

om0wt commented 6 months ago

ESP32 crashes even when I disable INET2RF and I set m/0 :(.

nakhonthai commented 6 months ago

[245319][D][main.cpp:3666] taskNetwork(): INET: OM3WYM-13>APRS,TCPIP*,qAC,T2CZECH:T#062,057,499,000,000,000,00000000

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump: PC : 0x42061608 PS : 0x00060930 A0 : 0x8205d594 A1 : 0x3fcebf00
A2 : 0x00d60085 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00060023 A7 : 0x00000003 A8 : 0x00000000 A9 : 0x3fcebed0
A10 : 0x00000000 A11 : 0x3fcebf0c A12 : 0x00000000 A13 : 0xd78a0000
A14 : 0x00000001 A15 : 0x3fcea0e0 SAR : 0x0000000a EXCCAUSE: 0x0000001c
EXCVADDR: 0x00d60085 LBEG : 0x40056f5c LEND : 0x40056f72 LCOUNT : 0xffffffff

Backtrace: 0x42061605:0x3fcebf00 0x4205d591:0x3fcebf30 0x4205d663:0x3fcebf50 0x42061bfe:0x3fcebf70

0 0x42061605:0x3fcebf00 in uartAvailable at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:313

1 0x4205d591:0x3fcebf30 in HardwareSerial::available() at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:478

2 0x4205d663:0x3fcebf50 in serialEventRun() at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:123

3 0x42061bfe:0x3fcebf70 in loopTask(void*) at /Users/pavol/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:51 (discriminator 1)

From the crash log caused by excessive serial hardware reports. So I suggest you try turning off the filter by set m/0 and look log again.

om0wt commented 6 months ago

m/0 doesn't make a difference. As I have mentioned previously, the firmware release v0.3 donwloaded directly from github crashes in the same manner. Based on the crash string:

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

it seems to me, that the problem can stay in tasks assignment to CPU 0/1 of ESP32. My suspicion is that when we enable SQL 0, CPU 0 doesn't cope with the all data SA868 sends to be processed...

Pavol

nakhonthai commented 5 months ago

Core 1 is default task of serial uart.

lyusupov commented 2 months ago

I can confirm that after this commit https://github.com/nakhonthai/ESP32APRS_T-TWR/commit/0d690c9b45a6acb78f75c04733dc7e1777ddb2c6 the SQL=0 setting does no longer crash the system.

It makes sense to apply this safety check as well: https://github.com/nakhonthai/ESP32IGate/blob/master/lib/LibAPRS_ESP32/AX25.cpp#L92



image



image