Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Connecting to WIFI: Guru Meditation Error

    Scheduled Pinned Locked Moved LoPy
    1 Posts 1 Posters 240 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pyoneer
      last edited by

      Hi,

      i am currently trying to connect to a WPA2-Enterprise (eduroam) network as described here on a Lopy4 with Pysense Expansion board.
      This is my main.py file (no other files are used in this project):

      from network import WLAN
      from machine import SD
      import os
      import time
      
      sd = SD()
      os.mount(sd, '/sd')
      
      wlan = WLAN(mode=WLAN.STA)
      nets = wlan.scan()
      for net in nets:
          print(net.ssid)
          print(net.channel)
          if net.ssid == "eduroam" and wlan.channel() == net.channel:
              print('Wifi found. connecting.')
              wlan.connect(ssid='eduroam', auth=(WLAN.WPA2_ENT, '[username]', '[pw]'),
                           identity='[identy]', ca_certs='/sd/cert/ca.pem')
              break
      

      The device boots up and runs the script without error. However wlan.isconnected() will always return False.

      Then, after a couple of seconds the device crashes with the error message:

      >>> Guru Meditation Error: Core  0 panic'ed (LoadProhibited)
      . Exception was unhandled.
      Register dump:
      PC      : 0x40188721  PS      : 0x00060630  A0      : 0x801832fa  A1      : 0x3ffe39f0
      A2      : 0x3ffe3f9c  A3      : 0x00000001  A4      : 0x3fbc64a4  A5      : 0x00000001
      A6      : 0x3ffe3ac4  A7      : 0x00000001  A8      : 0x8018871d  A9      : 0x3ffe4988
      A10     : 0x00000000  A11     : 0x000000ff  A12     : 0x3ffe3f9c  A13     : 0x00000000
      A14     : 0x00000002  A15     : 0x00000005  SAR     : 0x00000018  EXCCAUSE: 0x0000001c
      EXCVADDR: 0x00000001  LBEG    : 0x40187509  LEND    : 0x4018750f  LCOUNT  : 0x00000000
      

      After a long sequence of printed core dumping the system will restart.

      The device is apparently setting up the connection in the background and will at some point fail. I investigated the Guru Meditation error (details here) and found that:

      LoadProhibited, StoreProhibited:

      This CPU exception happens when application attempts to read from or write to an invalid memory location. The address which was written/read is found in EXCVADDR register in the register dump. If this address is zero, it usually means that application attempted to dereference a NULL pointer. If this address is close to zero, it usually means that application attempted to access member of a structure, but the pointer to the structure was NULL. If this address is something else (garbage value, not in 0x3fxxxxxx - 0x6xxxxxxx range), it likely means that the pointer used to access the data was either not initialized or was corrupted.

      So apparently the application attempted to access member of a structure, but the pointer to the structure was NULL. That doesn't really help me, however.

      Is anybody facing the same problem or has some advice?

      Notes on the code:

      I am checking wlan.channel()==net.channel() as eduroam is available at least twice on different channels. The Lopy4 is set on channel 6 and I also find on instance of eduroam on this channel. I don't know if that is important as my problem persists and I can't connect to WIFI either way.

      The ca.pem file that I have stored on SD is the same that I am using on my Ubuntu Laptop to (successfully) connect to eduroam.

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • 1 / 1
      • First post
        Last post

      Pycom on Twitter

      Pycom