Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reboot Loop when enabling TX functionality #296

Open
Mane76 opened this issue May 18, 2023 · 33 comments
Open

Reboot Loop when enabling TX functionality #296

Mane76 opened this issue May 18, 2023 · 33 comments
Assignees
Labels
bug Something isn't working fixed Issue is fixed, waiting for feedback. question Further information is requested

Comments

@Mane76
Copy link

Mane76 commented May 18, 2023

Describe the bug
When enabling TX functionality of iGate the code compiles, but the esp32 is in an reboot loop. By changing the line lora_tx_enable to false everything works fine as before

To Reproduce
Steps to reproduce the behavior:

  1. Download code status 18.05.2023 from master branch
  2. adjust config file, wifi active, aprsis active, digi false, lora tx enable, ftp false, mqtt false, syslog true
  3. compile, upload to device, upload file system image

Expected behavior
start as usual

Screenshots
Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
[INFO][Main] LoRa APRS iGate by OE5BPA (Peter Buchegger)
[INFO][Main] Version: 23.06.0
[INFO][Main] Board TTGO_LORA32_V2 loaded.
[INFO][Main] Will start watchdog now...
[INFO][TaskManager] will setup all tasks...
[DEBUG][TaskManager] call setup for WifiTask
[INFO][WiFiEvent] WiFi Started
[DEBUG][WifiTask] Looking for AP: xxxx
[DEBUG][TaskManager] call setup for DisplayTask
[DEBUG][TaskManager] call setup for RadiolibTask
[DEBUG][TaskManager] call setup for RouterTask
[DEBUG][TaskManager] call setup for BeaconTask
[DEBUG][TaskManager] call setup for OTATask
[DEBUG][TaskManager] call setup for NTPTask
[DEBUG][TaskManager] call setup for AprsIsTask
[INFO][Main] setup done...
E (22408) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (22408) task_wdt: - loopTask (CPU 1)
E (22408) task_wdt: Tasks currently running:
E (22408) task_wdt: CPU 0: IDLE
E (22408) task_wdt: CPU 1: IDLE
E (22408) task_wdt: Aborting.

abort() was called at PC 0x400fb130 on core 0

Backtrace: 0x40083c1d:0x3ffbeccc |<-CORRUPTED

ELF file SHA256: d0eeed056324df7f

Rebooting...

Desktop (please complete the following information):

  • OS: Linux x64
  • PlatformIO Version: 1.77.0
  • Firmware Version:

Board name:
TTGO LORA32

Additional context
Add any other context about the problem here.

@Mane76 Mane76 added the bug Something isn't working label May 18, 2023
@peterus
Copy link
Member

peterus commented May 20, 2023

looks like something is taking to long and the wathdog is restarting the esp.

can you post your exact configuration? please remove your personal data (callsign, wifi settings, aprs-is passcode)

@peterus peterus added the question Further information is requested label May 20, 2023
@Mane76
Copy link
Author

Mane76 commented May 20, 2023

Here we are...
when I change the "tx_enable" in section "lora" to "false" everything is working fine.
The frequency 433.781 is the correction of the offset of "my" module to the "real" RX/TX frequency.
As I see in the preview the formatting gets lost.

{
"callsign": "xxx",
"network": {
"DHCP": true,
"static": {
"ip": "192.168.0.100",
"subnet": "255.255.255.0",
"gateway": "192.168.0.1",
"dns1": "192.168.0.1",
"dns2": "192.168.0.2"
},
"hostname": {
"overwrite": false,
"name": "xxx"
}
},
"wifi": {
"active": true,
"AP": [
{
"SSID": "xxx",
"password": "xxx"
}
]
},
"beacon": {
"message": "LoRa iGate v23.17.1m",
"position": {
"latitude": xxx,
"longitude": xxx
},
"use_gps": false,
"timeout": 15
},
"aprs_is": {
"active": true,
"passcode": "xxx",
"server": "germany.aprs2.net",
"port": 14580,
"filter": "r/xxx/xxx/50 -t/tpo"
},
"digi": {
"active": false,
"beacon": false
},
"lora": {
"frequency_rx": 433781000,
"gain_rx": 0,
"frequency_tx": 433781000,
"power": 20,
"spreading_factor": 12,
"signal_bandwidth": 125000,
"coding_rate4": 5,
"tx_enable": true
},
"display": {
"always_on": false,
"timeout": 10,
"overwrite_pin": 0,
"turn180": true
},
"ftp": {
"active": false,
"user": [
{
"name": "ftp",
"password": "ftp"
}
]
},
"mqtt": {
"active": false,
"server": "",
"port": 1883,
"name": "",
"password": "",
"topic": "LoraAPRS/Data",
"will_active": false,
"will_topic": "LoraAPRS/State",
"will_message": "offline",
"birth_message": "online"
},
"syslog": {
"active": true,
"server": "xxx",
"port": 514
},
"ntp_server": "pool.ntp.org"
}

@ploeffler
Copy link

ploeffler commented May 20, 2023 via email

@pinkolin
Copy link

pinkolin commented May 24, 2023

I have similar issue maybe with same board? Backtrace only when TX enabled, in RX mode, ok:

`[INFO][WiFiEvent] WiFi IPv4: 192.168.88.31
[INFO][WiFiEvent] WiFi Gateway: 192.168.88.1
[INFO][WiFiEvent] WiFi DNS1: 8.8.8.8
[INFO][WiFiEvent] WiFi DNS2: 1.1.1.1
[INFO][WiFiEvent] WiFi Hostname: OK1PNK-10
[DEBUG][WifiTask] WiFi IP address: 192.168.88.31

assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas")

Backtrace: 0x40083d95:0x3ffb1f90 0x4008e151:0x3ffb1fb0 0x40093ead:0x3ffb1fd0 0x40084282:0x3ffb2100 0x40093edd:0x3ffb2120 0x40166655:0x3ffb2140 0x400d7cf9:0x3ffb2160 0x400d8463:0x3ffb2180 0x40182062:0x3ffb2230 0x400d3302:0x3ffb2250 0x400f255d:0x3ffb2290

ELF file SHA256: a003e5a76581958a

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
E (314) psram: PSRAM ID read error: 0xffffffff
[INFO][Main] LoRa APRS iGate by OE5BPA (Peter Buchegger)
[INFO][Main] Version: 23.06.0
[INFO][Main] Board TTGO_LORA32_V2 loaded.
[INFO][Main] Will start watchdog now...
[INFO][TaskManager] will setup all tasks...
[DEBUG][TaskManager] call setup for WifiTask
[INFO][WiFiEvent] WiFi Started`

@ohanssen
Copy link

ohanssen commented Jun 2, 2023

I have the same issue with a LoRa32 board.

@peterus peterus mentioned this issue Jun 4, 2023
@peterus
Copy link
Member

peterus commented Jun 4, 2023

issue was reproduced, fix is in: #303

@peterus
Copy link
Member

peterus commented Jun 4, 2023

@ohanssen @pinkolin @Mane76 please report back if TX is now working for you! will create based on the feedback a new release. Thank you very much!

@peterus peterus added the fixed Issue is fixed, waiting for feedback. label Jun 4, 2023
@Mane76
Copy link
Author

Mane76 commented Jun 4, 2023

reboot loop is solved BUT

when "tx_enable": true no RX of tracker is possible
when "tx_enable": false a RX of tracker is possible

when "tx_enable": true everything which passes the filter set in section aprs-is is TXd

'73, Mane

@peterus
Copy link
Member

peterus commented Jun 5, 2023

@Mane76 I just tried to reproduce your issue, but couldn't. can you please retry again (delete flash first, than upload config and than firmware upload with monitoring)?
thanks!

@peterus
Copy link
Member

peterus commented Jun 5, 2023

@Mane76 are you using different frequencies for RX und TX? possible fix would be: #304

@Mane76
Copy link
Author

Mane76 commented Jun 5, 2023

@peterus, no, same frequencies for RX and TX.
I just cloned the repo fresh from github, same behaviour.

See serial output attached, 1st boot shows some corrupntess, then it reboots and starts up, independent if tx_enable" is true or false.
If false - RX works, if true - RX does not work.

Reconnecting to /dev/ttyACM0 ... Connected!
[INFO][WiFiEvent] WiFi Started
[DEBUG][WifiTask] Looking for AP: xxx
[DEBUG][TaskManager] call setup for DisplayTask
[DEBUG][TaskManager] call setup for RadiolibTask
[DEBUG][TaskManager] call setup for RouterTask
[DEBUG][TaskManager] call setup for BeaconTask
[DEBUG][TaskManager] call setup for OTATask
[DEBUG][TaskManager] call setup for NTPTask
[DEBUG][TaskManager] call setup for AprsIsTask
[INFO][Main] setup done...
E (22409) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (22409) task_wdt: - loopTask (CPU 1)
E (22409) task_wdt: Tasks currently running:
E (22409) task_wdt: CPU 0: IDLE
E (22409) task_wdt: CPU 1: IDLE
E (22409) task_wdt: Aborting.

abort() was called at PC 0x400fb184 on core 0

Backtrace: 0x40083c1d:0x3ffbeccc |<-CORRUPTED

ELF file SHA256: d42c675df63b5cd3

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
[INFO][Main] LoRa APRS iGate by OE5BPA (Peter Buchegger)
[INFO][Main] Version: 23.06.0
[INFO][Main] Board TTGO_LORA32_V2 loaded.
[INFO][Main] Will start watchdog now...
[INFO][TaskManager] will setup all tasks...
[DEBUG][TaskManager] call setup for WifiTask
[INFO][WiFiEvent] WiFi Started
[DEBUG][WifiTask] Looking for AP: xxxx
[DEBUG][TaskManager] call setup for DisplayTask
[DEBUG][TaskManager] call setup for RadiolibTask
[DEBUG][TaskManager] call setup for RouterTask
[DEBUG][TaskManager] call setup for BeaconTask
[DEBUG][TaskManager] call setup for OTATask
[DEBUG][TaskManager] call setup for NTPTask
[DEBUG][TaskManager] call setup for AprsIsTask
[INFO][Main] setup done...
[INFO][WiFiEvent] WiFi Connected
[INFO][WiFiEvent] WiFi MAC: xxxx
[INFO][WiFiEvent] WiFi IPv4: xxxx
[INFO][WiFiEvent] WiFi Gateway: xxxx
[INFO][WiFiEvent] WiFi DNS1: xxxx
[INFO][WiFiEvent] WiFi DNS2: 0.0.0.0
[INFO][WiFiEvent] WiFi Hostname: xxxx
[DEBUG][WifiTask] WiFi IP address: xxxx
[INFO][Main] System connected after a restart to the network, syslog server set
[INFO][BeaconTask] [00:00:09] xxxx>APLG01:=xxxxNLxxxxE&LoRa iGate
[INFO][NTPTask] Current time: 17:34:53
[INFO][AprsIsTask] connecting to APRS-IS server: germany.aprs2.net on port: 14580, with filter: '�1�?'
[INFO][AprsIsTask] Connected to APRS-IS server!

@peterus
Copy link
Member

peterus commented Jun 5, 2023

@Mane76 can you post your config again that i can try to reproduce your issue. the first boot looks very strange to me. in the second boot i can not see that something should be sent.

@Mane76
Copy link
Author

Mane76 commented Jun 5, 2023

{
"callsign": "xxxx",
"network": {
"DHCP": true,
"static": {
"ip": "192.168.0.100",
"subnet": "255.255.255.0",
"gateway": "192.168.0.1",
"dns1": "192.168.0.1",
"dns2": "192.168.0.2"
},
"hostname": {
"overwrite": false,
"name": "xxxx"
}
},
"wifi": {
"active": true,
"AP": [
{
"SSID": "xxxx",
"password": "xxxx"
}
]
},
"beacon": {
"message": "LoRa iGate",
"position": {
"latitude": xxxx,
"longitude": xxxx
},
"use_gps": false,
"timeout": 15
},
"aprs_is": {
"active": true,
"passcode": "xxxx",
"server": "germany.aprs2.net",
"port": 14580,
"filter": "t/m/CALLSIGN-12/30"
},
"digi": {
"active": false,
"beacon": false
},
"lora": {
"frequency_rx": 433781000,
"gain_rx": 0,
"frequency_tx": 433781000,
"power": 20,
"spreading_factor": 12,
"signal_bandwidth": 125000,
"coding_rate4": 5,
"tx_enable": true
},
"display": {
"always_on": false,
"timeout": 10,
"overwrite_pin": 0,
"turn180": true
},
"ftp": {
"active": false,
"user": [
{
"name": "ftp",
"password": "ftp"
}
]
},
"mqtt": {
"active": false,
"server": "",
"port": 1883,
"name": "",
"password": "",
"topic": "LoraAPRS/Data",
"will_active": false,
"will_topic": "LoraAPRS/State",
"will_message": "offline",
"birth_message": "online"
},
"syslog": {
"active": true,
"server": "xxxx",
"port": 514
},
"ntp_server": "pool.ntp.org"
}

@peterus
Copy link
Member

peterus commented Jun 5, 2023

I am very sorry, but I can't reproduce your issue here on my system.

this is my config:

{
	"callsign": "OE5BPA-77",
	"network": {
		"DHCP": true,
		"static": {
			"ip": "192.168.0.100",
			"subnet": "255.255.255.0",
			"gateway": "192.168.0.1",
			"dns1": "192.168.0.1",
			"dns2": "192.168.0.2"
		},
		"hostname": {
			"overwrite": false,
			"name": "NOCALL-10"
		}
	},
	"wifi": {
		"active": true,
		"AP": [
			{
				"SSID": "****",
				"password": "****"
			}
		]
	},
	"beacon": {
		"message": "LoRa iGATE & Digi, Info: github.com/lora-aprs/LoRa_APRS_iGate",
		"position": {
			"latitude": ****,
			"longitude": ****
		},
		"use_gps": false,
		"timeout": 2
	},
	"aprs_is": {
		"active": true,
		"passcode": "****",
		"server": "euro.aprs2.net",
		"port": 14580,
		"filter": "t/m/CALLSIGN-12/30"
	},
	"digi": {
		"active": true,
		"beacon": true
	},
	"lora": {
		"frequency_rx": 433775000,
		"gain_rx": 0,
		"frequency_tx": 433775000,
		"power": 20,
		"spreading_factor": 12,
		"signal_bandwidth": 125000,
		"coding_rate4": 5,
		"tx_enable": true
	},
	"display": {
		"always_on": true,
		"timeout": 10,
		"overwrite_pin": 0,
		"turn180": true
	},
	"ftp": {
		"active": false,
		"user": [
			{
				"name": "ftp",
				"password": "ftp"
			}
		]
	},
	"mqtt": {
		"active": false,
		"server": "",
		"port": 1883,
		"name": "",
		"password": "",
		"topic": "LoraAPRS/Data",
		"will_active": false,
		"will_topic": "LoraAPRS/State",
		"will_message": "offline",
		"birth_message": "online"
	},
	"syslog": {
		"active": true,
		"server": "192.168.123.123",
		"port": 514
	},
	"ntp_server": "pool.ntp.org"
}

please use this steps for further debugging:

  1. in vs code press on the left side the PlatformIO symbol (ant symbol)
  2. in PROJECT TASKS open lora_board_debug (you will get a very verbose log output)
  3. press in Platform on Erase Flash and wait until done
  4. press in Platform on Upload Filesystem Image and wait until done
  5. press in General on Upload and Monitor and wait until you will see a log output.

in the log, you will get the first boot (board finding) and than the second boot (normal operation), please post both bootups here.
please post also a link to your board. have you tried it on another board? - could be a hardware issue.

@Mane76
Copy link
Author

Mane76 commented Jun 5, 2023

By checking your config I found that you have in digi section the lines "active" and "beacon" set to true.
Can this cause the difference ? In my config these are set to false.

Debug I can provide tomorrow.

@peterus
Copy link
Member

peterus commented Jun 5, 2023

@Mane76 good found! have not seen this difference! Will need to check this, but i think most probably this is the issue 👍 will check tomorrow 👍

@ohanssen
Copy link

ohanssen commented Jun 5, 2023

I see the same here. The reboot problem is fixed but the RX doesnt work if TX is enabled. Digi section "active" and "beacon" are set to false.

@peterus
Copy link
Member

peterus commented Jun 8, 2023

i refactored the RadioLib Task, added the newest version of RadioLib and now it is working as expected (on my side at least). please try the latest master again and give feedback! thanks!

changes: #305

@peterus peterus self-assigned this Jun 8, 2023
@ohanssen
Copy link

ohanssen commented Jun 8, 2023

Still the same on my side: If TX is enabled, RX seems to be disabled.

@peterus
Copy link
Member

peterus commented Jun 9, 2023

@ohanssen did you follow this steps: #296 (comment)
the configuration file changed! best is to create a completely new one.

@beppelpo
Copy link

beppelpo commented Jun 9, 2023

I too had the "Reboot Loop when enabling TX functionality" problem.
With the new version of the master the firmware no longer goes into a loop and the transmission to 433.775 works perfectly. TNX Peter.
Beppe i3lpo

@peterus
Copy link
Member

peterus commented Jun 9, 2023

@beppelpo can you check if RX is still possible when TX is active? thanks!

@Mane76
Copy link
Author

Mane76 commented Jun 9, 2023

i refactored the RadioLib Task, added the newest version of RadioLib and now it is working as expected (on my side at least). please try the latest master again and give feedback! thanks!

changes: #305

unfortunately same behaviour. When tx_enable: true NO RX is possible, wenn set to false RX is possible.

I also checked the serial output in debug environment, no difference if tx_enable is set to true or false.

@beppelpo
Copy link

beppelpo commented Jun 9, 2023

@beppelpo can you check if RX is still possible when TX is active? thanks!

Unfortunately there is no LoRa station in the area, I was hoping to spread this technique among local OMs. But I have another identical board with the TinyGS console. Then I try to install this iGate and see if the two devices listen to each other. I'll keep you posted on developments. Good evening.
Beppe i3lpo

@peterus
Copy link
Member

peterus commented Jun 9, 2023

Phu... slowly I am giving up on this topic as on my side everything is working correctly and I have no idea anymore.

So...

  1. please send me some pictures of the hardware which you are using.
  2. I need a a config file, and the log output.
  3. Further please make sure that you are using the latest mainline version - in the next minute version 23.23.99 is published.

@beppelpo
Copy link

beppelpo commented Jun 9, 2023

Well, I've installed an identical copy of iGate on another identical LILYGO card. I only changed id on the second one (i3lpo-9) . Both receive and transmit (tx true), in the video made on -9 then you see the msg received from -10. Only question that "Type: error.data "....
Beppe i3lpo

Uploading video5771553211001343426.mp4…

@peterus
Copy link
Member

peterus commented Jun 9, 2023

@beppelpo:
Type: error can be ignored, this „bug“ is well known and just on the display/logging.

can you post the logs from the serial monitor too? to make sure? can you activate the beacon mode (send_on_hf: true) on one board just to be sure? thanks!

@Mane76
Copy link
Author

Mane76 commented Jun 9, 2023

Just tested, same behaviour. See pic from device attached.
Can you provide a email adress for debug log ? A lot of pages...
20230609_185604a

@beppelpo
Copy link

beppelpo commented Jun 9, 2023

send_on_hf: true in both tabs, I'll see if I can send the log, I'm not very practical!

@peterus
Copy link
Member

peterus commented Jun 9, 2023

@Mane76 I think your issue is now at this point something different than the original issue described here.

can you comment all lines which are responsible for the watchdog?
like in LoRa_APRS_iGate.cpp line 94 - 101, 154, 163, 184.

I think your esp needs more time to connect to your wifi and than the watchdog is kicking in.

@Mane76
Copy link
Author

Mane76 commented Jun 10, 2023

commented watchdog lines, unfortunately no effect on RX problem

@beppelpo
Copy link

Cattura

I don't know if this img is enough, I can't activate the output to file. I'm sorry but I'm really a sucker with VSCode. Beppe i3lpo

@beppelpo
Copy link

sucker = duffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue is fixed, waiting for feedback. question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants