Laravel redirection problem with esp8266, the error thrown by the esp is: Exception (28)

0

I have a problem with the api that believes in laravel so that esp8266 can read me a rfid and send me their data so I can look for it with a select in the controller. but he sends me the Exception (28).

this is the route:

Route::post('/','TaskController@getAll')->name('taskApi')

and here I show you the controller:

public function getAll(request $request)
    {
        $CarId=$request->get('CardId');
        // return "success";
        $cliente = DB::table('cliente as c')
        ->select('c.id_cliente','c.nombre','c.apellido_paterno','c.apellido_materno','c.correo','c.telefono','c.huella','c.direccion','c.imagen','c.CardId','c.fotoanterior')
        ->where('c.CardId','=',$CarId)
        ->first();

        return view('clientes.show',["cliente"=>$cliente]);
    }

this is my arduino code:

void sendRfidLog(long cardId) {

  if(WiFi.status() == WL_CONNECTED) {
    HTTPClient http;
    String postData = "CardId=" + String(cardId);
    http.begin("http://ip/api");            
    http.addHeader("Content-Type", "application/x-www-form-urlencoded");  

    int httpCode = http.POST(postData); 
    String payload = http.getString();
    Serial.println(httpCode);
    Serial.println(payload);

    if(payload.equals("success")) {
     digitalWrite(SUCCESS_PIN, HIGH);
     Serial.println(postData);
    } else {
     digitalWrite(ERROR_PIN, HIGH);
     Serial.println(postData);
    }

    http.end();
  }
}

This is the error the arduino sends me: Exception (28): epc1=0x4000bf80 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont sp: 3fff1310 end: 3fff1540 offset: 01a0

stack>>> 3fff14b0: 3fff1510 3ffe908c 3fff029c 402036f7
3fff14c0: 3fff1510 0000002b 3ffe8f1e 3fff0518
3fff14d0: 3fff1510 3ffe908c 3fff029c 40203b81
3fff14e0: 3fffdad0 00000000 3fff029c 40203d08
3fff14f0: 3ffe8d4d 00000000 3fff04e4 40203e65
3fff1500: 3ffe8374 00000000 3fff04e4 40202284
3fff1510: 3fff1ec0 27000000 3fff1e98 00000000
3fff1520: 3fffdad0 00000000 3fff0511 40205d70
3fff1530: 00000000 00000000 3fff0520 4010011c
<<

I would appreciate yours help

laravel
api
arduino-esp8266
asked on Stack Overflow Jul 23, 2019 by Ivan Espinosa

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0