"Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)" error

zam_ii
Posts: 6
Joined: Sun Jan 14, 2018 12:17 am

"Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)" error

Postby zam_ii » Fri Jun 22, 2018 4:03 am

Hi,

I tried to connect to IoT platform from ESP32 through MQTT.
My code as below. There is no problem when I use Adafruit MQTT broker.
But I got a "Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)" error when tried to send MQTT to this IoT platform.

Is it due to the key is too long? Is there any solution?

Code: Select all

#include "WiFi.h"
#include "PubSubClient.h"

const char* ssid = "*****";
const char* password = "*****";
const char* mqtt_server = "mqtt.favoriot.com";
const char* username = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlsemFtYWxwcyIsInJlYWRfd3JpdGUiOnRydWUsImlhdCI6MTUyODQ0ODQwN30.7ChIJzlW0Ja7QGR_sO6T04yh3pCY9tEqPbf********";
const char* passkey = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlsemFtYWxwcyIsInJlYWRfd3JpdGUiOnRydWUsImlhdCI6MTUyODQ0ODQwN30.7ChIJzlW0Ja7QGR_sO6T04yh3pCY9tEqPbf********";
const char* topic = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImlsemFtYWxwcyIsInJlYWRfd3JpdGUiOnRydWUsImlhdCI6MTUyODQ0ODQwN30.7ChIJzlW0Ja7QGR_sO6T04yh3pCY9tEqPbf********/all";

WiFiClient espClient;
PubSubClient client(espClient);

void mqttconnect() {
  while (!client.connected()) {
    Serial.print("MQTT connecting ...");
    String clientId = "ESP32";
    if (client.connect(clientId.c_str(),username,passkey)) {
      Serial.println("connected");
    } else {
      Serial.print("failed, status code =");
      Serial.print(client.state());
      Serial.println("try again in 5 seconds");
      delay(5000);
    }
  }
}

void setup() {
  Serial.begin(115200);
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());

  client.setServer(mqtt_server, 1883);
}

void loop() {
  if (!client.connected()) {
    mqttconnect();
  }

   String json = "{\"device_developer_id\":\"deviceDefault@ilzamalps\",\"data\":{\"humidity\":\"80\",\"temperature\":\"30\"}}";
   client.publish(topic,json.c_str());

   delay(30000);
}

Code: Select all

Connecting to zamii@unifi
..
WiFi connected
IP address: 
192.168.0.148
MQTT connecting ...Guru Meditation Error: Core  1 panic'ed (InstrFetchProhibited)
. Exception was unhandled.
Register dump:
PC      : 0x00000000  PS      : 0x00060030  A0      : 0x800d21a8  A1      : 0x3ffd0ca0  
A2      : 0x3ffc3224  A3      : 0x3ffd0cac  A4      : 0x00000000  A5      : 0x00000155  
A6      : 0x00000003  A7      : 0x00000000  A8      : 0x800d2090  A9      : 0x00000002  
A10     : 0x3ffc32d4  A11     : 0x3ffc322a  A12     : 0x00000158  A13     : 0xfb792634  
A14     : 0xfb792634  A15     : 0x3ffc3b14  SAR     : 0x00000018  EXCCAUSE: 0x00000014  
EXCVADDR: 0x00000000  LBEG    : 0x400d210d  LEND    : 0x400d211c  LCOUNT  : 0x00000000  

Backtrace: 0x00000000:0x3ffd0ca0 0x400d21a5:0x3ffd0cd0 0x400d2266:0x3ffd0d10 0x400d13c8:0x3ffd0d40 0x400d14b3:0x3ffd0d70 0x4010cf50:0x3ffd0da0

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:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13076
entry 0x40078ad0

ajithcs
Posts: 3
Joined: Sat Jun 23, 2018 4:55 am

Re: "Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)" error

Postby ajithcs » Sat Jun 23, 2018 5:44 am

I tried your code and I test it to "test.mosquitto.org" without username and passkey

const char* mqtt_server = "test.mosquitto.org";
const char* topic = "temp/random";
if (client.connect(clientId.c_str())) {

and i got successfully connected.
Connecting to CONNECTSA
...........
WiFi connected
IP address:
192.168.0.103
MQTT connecting ...connected

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: "Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)" error

Postby ESP_Sprite » Sun Jun 24, 2018 2:07 am

Are you sure your power supply is adequate?

zam_ii
Posts: 6
Joined: Sun Jan 14, 2018 12:17 am

Re: "Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)" error

Postby zam_ii » Sun Jun 24, 2018 9:56 pm

ESP_Sprite wrote:Are you sure your power supply is adequate?
Same as me, tried using others mqtt broker, no problem.

As mentioned using other mqtt broker, connect this board to laptop using usb cable, no problem.

ajithcs
Posts: 3
Joined: Sat Jun 23, 2018 4:55 am

Re: "Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)" error

Postby ajithcs » Mon Jun 25, 2018 10:25 am

Post by ESP_Sprite » Sun Jun 24, 2018 7:37 am
Are you sure your power supply is adequate?

hi, thanks for the reply.
But no power supply issues.

zam_ii
Posts: 6
Joined: Sun Jan 14, 2018 12:17 am

Re: "Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)" error

Postby zam_ii » Mon Jun 25, 2018 3:12 pm

Please help, any idea?

Who is online

Users browsing this forum: Google [Bot] and 186 guests