B4R Question Error i can't understand in wifi connect method

yaniv hanya

Active Member
Licensed User
i"m using the toturial of wifi server to connect to my esp proccesor.
the connection work's well, but i get an error message triying to parse the buffer that i send to the processor-
Dim ssid = "", password = "" As String

B4X:
Dim ssid = "", password  = "" As String
   
    If bc.IndexOf(Buffer, "GET") <> -1 Then
        If bc.IndexOf(Buffer, "/set") <> -1 Then  
            Dim i1 As Int = 0
            Dim i2 As Int = 0
            For Each b1() As Byte In bc.Split(Buffer, " ")
                If i1 = 1 Then
                    For Each b2() As Byte In bc.Split(b1, "/")

in line 7, i get this error-
"assert failed: xTaskRemoveFromEventList tasks.c:3656 (pxUnblockedTCB)" and the device reboot. "

i can't understand what the is the problem... but it dosen't parse the buffer i send.

do somebody understand what i do wrong?
 

candide

Active Member
Licensed User
i think, you can make a log of buffer first and you will what is your problem
B4X:
    Log("startB=",Buffer,"=endB")
 
Upvote 0

yaniv hanya

Active Member
Licensed User
I did insulate the Buffer, I also wrote it as direct Byte.

It looks like the problem is in the second bc.StringFromBytes(b2) line.



The first line-

ssid = bc.StringFromBytes(b2)

works, and gives the correct ssid.

The second line

password = bc.StringFromBytes(b2)

causses some kind of overflow and crash…

even if I put-

buffer = "/set/ssid/pass", I get the same crash.

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

Does somebody have any idea?
 
Upvote 0
Top