Guru meditation error



  • Insert Code Here```
    #boot.py
    from machine import UART
    import os
    uart = UART(0, baudrate=9600)
    os.dupterm(uart)
    
    
    
    # main.py
    from network import LoRa
    from network import WLAN
    import socket
    import time
    import machine
    WIFI_SSID  = "xxxxxx"
    WIFI_AUTH  = (WLAN.WPA2, 'yyyyyy')
    HOST = "aaaaaaa"
    lora = LoRa(mode=LoRa.LORA, frequency=868000000)
    lora1 = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
    lora1.setblocking(False)
    # connect to WiFi
    wifi = WLAN(mode=WLAN.STA)
    wifi.connect(WIFI_SSID, auth=WIFI_AUTH)
    while not wifi.isconnected():
        print("wfi not connected")
    
    def cloud(API_KEY,lat1,long1,aq1,gs1):
        data = "devicekey="+ API_KEY + "&f1=" + str(lat1) + "&f2=" + str(long1)+ "&f4=" + str(aq1)+ "&f5=" + str(gs1)
        s = socket.socket()
        ai = socket.getaddrinfo(HOST, 80)
        addr = ai[0][-1]
        s.connect(addr)
        #print(addr)
        s.send("GET /API/link?"+data+" HTTP/1.0\r\n")
        s.send("Host: " + HOST + "\r\n")
        s.send("Content-Length: " + str(len(data)) + "\r\n\r\n")
        s.write(data)
        print(s.read(1000))
        s.close()
    
    
    while True:
    
        recieved_data =lora1.recv(100)
        converted_data=str(recieved_data)
        print("recieved data is "+str(converted_data))
    
        if converted_data is 'b''':
            print ("NO DATA")
    
        else:
            print("Hello")
            Data = converted_data.split('@')
            print ("data is " +str(Data))
    
            firstindex = str(Data[0])
            print ("FIRST INDEX :"+firstindex)
    
            if firstindex != "b''":
                secondindex = str(Data[1])
                thirdindex = str(Data[2])
    
                Data1=secondindex.split(',')
                print (Data1)
    
                if Data1[0] == 'node_1':
                    deviceId = Data1[0]
                    lat =  Data1[1]
                    lon = Data1[2]
                    airquality = Data1[3]
                    carbon = Data1[4]
                    print ("device id is :   "+deviceId)
                    print ("lat is :   "+lat)
                    print ("lon :   "+lon)
                    print ("air quality is :   "+airquality)
                    print ("carbon content :   "+carbon)
                    API_KEY ="12345"
                  
                    try:
                        cloud(API_KEY,lat,lon, airquality, carbon)
                    except:
                        print("An exception occurred1")
    
        recieved_data = False
        time.sleep(5)
    
    
    since few days i am trying to solve this bug, but ...it remained same.
    i searched many forums, no one has given solution.
    
    i am posting the result i got in pymakr console:[0_1550734355441_mycode.doc](Uploading 100%) 
    
    recieved data is b'\xff\xff\x00\x00@node_1,0.000000,0.000000,18,21@5@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
    Hello
    Guru Meditation Error of type LoadProhibited occurred on core   0. Exception was unhandled.
    Register dump:
    PC      :  400e657d  PS      :  00060030  A0      :  800e4fe8  A1      :  3ffd4940
    A2      :  3030785c  A3      :  00000000  A4      :  00000db0  A5      :  3ffbd4ac
    A6      :  00000da6  A7      :  3ffb15d0  A8      :  800e657d  A9      :  3ffd4920
    A10     :  00000000  A11     :  00000000  A12     :  000000a0  A13     :  00000b22
    A14     :  00000000  A15     :  0000000a  SAR     :  0000001a  EXCCAUSE:  0000001c
    EXCVADDR:  00000004  LBEG    :  4000c2e0  LEND    :  4000c2f6  LCOUNT  :  00000000
    Rebooting...
    ets Jun  8 2016 00:22:57
    
    rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:QIO, clock div:2
    load:0x3fff9010,len:8
    load:0x3fff9018,len:312
    load:0x40078000,len:2352
    load:0x4009f000,len:1196
    entry 0x4009f2d8
    frc2_timer_task_hdl:3ffd2634, prio:22, stack:2048
    tcpip_task_hdlxxx : 3ffd7154, prio:18,stack:2048
    pp_task_hdl : 3ffdb3c4, prio:23, stack:8192
    mode : softAP(24:0a:c4:00:85:e7)
    dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)
    dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)
    MicroPython 8785822 on 2016-10-06; LoPy with ESP32
    
    
    Any solution for this exception
    and one more is there any firmware update available for expansion board v2.1A.
    
    can anyone suggest me. how to overcome there two erros.


  • Hello,

    Could you let us know what version of the firmware the effected LoPy is running so we can decode the error correctly.

    Any easy way to tell is to run the following:

    import os
    os.uname()
    

    thanks.


Log in to reply
 

Pycom on Twitter