Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Not able to connect open wifi's

According to this doc we have to pass 0x00 as password if wifi has no password but it is not working. ESP32 is throwing this error and crashing "mgos_bt_svc_config_e Error saving config: STA password must be between 8 and 63 chars"

Comments

  • SergeySergey Dublin, Ireland

    Keep the password NULL for the open networks.

  • Hello @Sergey,

    Am I doing something wrong here?

    mgos_bt_svc_config_s 'wifi.sta.ssid' = 'praveena'
    [Nov 19 15:03:57.241] mgos_bt_svc_config_s 'wifi.sta.pass' = 'NULL'
    [Nov 19 15:03:58.021] mgos_bt_svc_config_s 'wifi.sta.enable' = true
    [Nov 19 15:03:58.026] mgos_bt_svc_config_e Error saving config: STA password must be between 8 and 63 chars
    [Nov 19 15:04:04.951] mgos_wifi_sta_connec WiFi STA: Connect timeout
    [Nov 19 15:04:04.957] Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
    [Nov 19 15:04:04.964] Core 0 register dump:
    [Nov 19 15:04:04.966] PC      : 0x40105571  PS      : 0x00060b30  A0      : 0x80105a5e  A1      : 0x3ffd11e0  
    [Nov 19 15:04:04.974] A2      : 0x00000000  A3      : 0x3ffd1210  A4      : 0x00000000  A5      : 0x3ffd1200  
    [Nov 19 15:04:04.982] A6      : 0x00000004  A7      : 0xff000000  A8      : 0x801053e6  A9      : 0x3ffd11e0  
    [Nov 19 15:04:04.990] A10     : 0x3ffba880  A11     : 0x3ffdfb50  A12     : 0x3f40d7ff  A13     : 0x3f4047d7  
    [Nov 19 15:04:04.997] A14     : 0x3f404dc4  A15     : 0x00000008  SAR     : 0x00000004  EXCCAUSE: 0x0000001c  
    [Nov 19 15:04:05.005] EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffd  
    [Nov 19 15:04:05.013] 
    [Nov 19 15:04:05.013] Backtrace: 0x40105571 0x40105a5b 0x40105b84 0x400e33ce 0x401bd46a 0x401be8da 0x401c05fc 0x401ce979 0x401ba17d 0x40082db7 0x40082f0e
    [Nov 19 15:04:05.025] --- BEGIN CORE DUMP ---
    [Nov 19 15:04:05.027] mos: catching core dump
    [Nov 19 15:04:07.873] ..
  • SergeySergey Dublin, Ireland
    edited November 19

    Yes you are. Do mos config-set wifi.sta.pass=""
    In your conf9.json, the setting for the wifi.sta.pass should be absent.

  • @Sergey I am so sorry. I am not able to understand it yet.
    You mean first I have to run mos config-set wifi.sta.pass="" this command and then run mos --port /dev/cu.SLAB_USBtoUART wifi praveena NULL

  • SergeySergey Dublin, Ireland
    edited November 19

    Your goal is to leave wifi.sta.pass as NULL (zero pointer), meaning, unset. Doing mos wifi praveena NULL is wrong, cause it sets the password to the string "NULL". The configuration command you should be using is mos config-set wifi.sta.ssid=praveena wifi.sta.pass="". Do not use mos wifi ...

  • @Sergey Thanks a lot. This works perfectly fine, but we send wifi details using BLE according to the above-mentioned doc but if I pass nothing in password field it is crashing.

    mgos_bt_svc_config_s 'wifi.sta.ssid' = 'praveena'
    [Nov 19 16:33:26.698] Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
    [Nov 19 16:33:26.705] Core 0 register dump:
    [Nov 19 16:33:26.707] PC      : 0x400014fd  PS      : 0x00060330  A0      : 0x800da514  A1      : 0x3ffd0cc0  
    [Nov 19 16:33:26.715] A2      : 0x00000000  A3      : 0xfffffffc  A4      : 0x000000ff  A5      : 0x0000ff00  
    [Nov 19 16:33:26.723] A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000000  A9      : 0x3ffd0c70  
    [Nov 19 16:33:26.731] A10     : 0x00000000  A11     : 0x3ffd1f69  A12     : 0x3ffd0f04  A13     : 0x3ffb6654  
    [Nov 19 16:33:26.739] A14     : 0x00000000  A15     : 0x00000001  SAR     : 0x00000008  EXCCAUSE: 0x0000001c  
    [Nov 19 16:33:26.747] EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  
    [Nov 19 16:33:26.754] 
    [Nov 19 16:33:26.755] Backtrace: 0x400014fd 0x400da511 0x400dbc36 0x400e49b1 0x400f599e 0x400f488f 0x40082f0e
    [Nov 19 16:33:26.762] --- BEGIN CORE DUMP ---
    [Nov 19 16:33:26.764] mos: catching core dump
  • SergeySergey Dublin, Ireland

    Please refer to docs. Debug the core. Do your homework, basically.

  • @Sergey I am getting issue after following the doc also. I am using the same BLE scanner app which is mentioned in the doc and entering 0x00 in the password value field and getting this issue - "STA password must be between 8 and 63 chars"

    esp32_bt_gatts_ev    WRITE 4f:9f:ac:ba:7e:ff cid 0 tid 0x00000002 h 44 off 0 len 8 need_rsp
    [Nov 20 12:52:25.260] mgos_bt_svc_config_e Value = 'OnePlus2'
    [Nov 20 12:52:25.267] esp32_bt_gatts_ev    RESPONSE st 0 ah 0
    [Nov 20 12:52:30.046] esp32_bt_gatts_ev    WRITE 4f:9f:ac:ba:7e:ff cid 0 tid 0x00000003 h 46 off 0 len 1 need_rsp
    [Nov 20 12:52:30.060] mgos_bt_svc_config_s 'wifi.sta.ssid' = 'OnePlus2'
    [Nov 20 12:52:30.067] esp32_bt_gatts_ev    RESPONSE st 0 ah 0
    [Nov 20 12:52:37.846] esp32_bt_gatts_ev    WRITE 4f:9f:ac:ba:7e:ff cid 0 tid 0x00000004 h 42 off 0 len 13 need_rsp
    [Nov 20 12:52:37.859] mgos_bt_svc_config_e Key = 'wifi.sta.pass'
    [Nov 20 12:52:37.865] esp32_bt_gatts_ev    RESPONSE st 0 ah 0
    [Nov 20 12:52:48.466] esp32_bt_gatts_ev    WRITE 4f:9f:ac:ba:7e:ff cid 0 tid 0x00000005 h 44 off 0 len 4 need_rsp
    [Nov 20 12:52:48.479] mgos_bt_svc_config_e Value = '0x00'
    [Nov 20 12:52:48.484] esp32_bt_gatts_ev    RESPONSE st 0 ah 0
    [Nov 20 12:52:52.186] esp32_bt_gatts_ev    WRITE 4f:9f:ac:ba:7e:ff cid 0 tid 0x00000006 h 46 off 0 len 1 need_rsp
    [Nov 20 12:52:52.201] mgos_bt_svc_config_s 'wifi.sta.pass' = '0x00'
    [Nov 20 12:52:52.208] esp32_bt_gatts_ev    RESPONSE st 0 ah 0
    [Nov 20 12:53:01.247] esp32_bt_gatts_ev    WRITE 4f:9f:ac:ba:7e:ff cid 0 tid 0x00000007 h 42 off 0 len 15 need_rsp
    [Nov 20 12:53:01.259] mgos_bt_svc_config_e Key = 'wifi.sta.enable'
    [Nov 20 12:53:01.264] esp32_bt_gatts_ev    RESPONSE st 0 ah 0
    [Nov 20 12:53:06.586] esp32_bt_gatts_ev    WRITE 4f:9f:ac:ba:7e:ff cid 0 tid 0x00000008 h 44 off 0 len 4 need_rsp
    [Nov 20 12:53:06.599] mgos_bt_svc_config_e Value = 'true'
    [Nov 20 12:53:06.604] esp32_bt_gatts_ev    RESPONSE st 0 ah 0
    [Nov 20 12:53:09.609] mqtt_handler         Send PINGREQ
    [Nov 20 12:53:09.664] mgos_mqtt_ev         MQTT event: 213
    [Nov 20 12:53:11.926] esp32_bt_gatts_ev    WRITE 4f:9f:ac:ba:7e:ff cid 0 tid 0x00000009 h 46 off 0 len 1 need_rsp
    [Nov 20 12:53:11.939] mgos_bt_svc_config_s 'wifi.sta.enable' = true
    [Nov 20 12:53:11.945] mgos_bt_svc_config_e Error saving config: STA password must be between 8 and 63 chars
    [Nov 20 12:53:11.955] esp32_bt_gatts_ev    RESPONSE st 0 ah 0
  • @Sergey Setting a null string value generates a crash dump

  • @praveenapoojary Don't enter anything as a value for wifi.sta.pass.
    The bt-service-config has been fixed and doesn't core dump anymore. Use the master version of it:

      - origin: https://github.com/mongoose-os-libs/bt-service-config
        version: master
    
Sign In or Register to comment.