Code is running on an ESP32
private Sub DataAvailable 'if parsePacket() <> 0
Dim recipient As Int = lora.read()
Log("recipient = ",recipient)
Dim senders As Byte = lora.read() '// Sender address
Log("senders = ",senders)
Dim incomingMsgId As Byte = lora.read() '// incoming msg ID
Log("incomingMsgId = ",incomingMsgId)
Dim incomingLength As Byte = lora.read() '// incoming msg length
Log("incomingLength = ",incomingLength)
Dim incoming() As Byte
Do While (lora.available() <> 0)
Log("lora.read = ",lora.read())
incoming = JoinBytes(Array(lora.read(),Array(incoming)))
Loop
Log(incoming)
End Sub
B4R Logs
********************* PROGRAM STARTING ****************
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode
IO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
AppStart
recipient = 187
senders = 255
incomingMsgId = 0
incomingLength = 47
lora.read = 65
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400d0ff5 PS : 0x00060930 A0 : 0x800d17a0 A1 : 0x3ffb1ea0
A2 : 0x3ffb81cc A3 : 0x3ffb1f00 A4 : 0x3ffc00f4 A5 : 0x00000000
A6 : 0x3ffc00f8 A7 : 0x00000053 A8 : 0x00000008 A9 : 0x00000000
A10 : 0x3ffb81d4 A11 : 0x00000018 A12 : 0x00000001 A13 : 0x00000008
A14 : 0x00000000 A15 : 0xfffffff8 SAR : 0x0000001b EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000057 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
Backtrace: 0x400d0ff5:0x3ffb1ea0 0x400d179d:0x3ffb1ec0 0x400d1892:0x3ffb1f30 0x400d165e:0x3ffb1f50 0x400d16a7:0x3ffb1f70 0x400d191e:0x3ffb1f90 0x400d2b01:0x3ffb1fb0 0x40088215:0x3ffb1fd0
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode
IO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
AppStart
when i comment this line
'incoming = JoinBytes(Array(lora.read(),Array(incoming)))
ESP32 logs
********************* PROGRAM STARTING ****************
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode
IO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
AppStart
recipient = 187
senders = 255
incomingMsgId = 0
incomingLength = 47
lora.read = 65
lora.read = 83
lora.read = 69
lora.read = 55
lora.read = 94
lora.read = 53
lora.read = 48
lora.read = 54
lora.read = 48
lora.read = 51
lora.read = 48
lora.read = 51
lora.read = 48
lora.read = 55
lora.read = 49
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 46
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 49
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 46
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48
lora.read = 94
lora.read = 48