Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RainMaker WiFI provisioning #42

Closed
2 of 3 tasks
martinberlin opened this issue Jul 5, 2021 · 4 comments · Fixed by #44
Closed
2 of 3 tasks

Add RainMaker WiFI provisioning #42

martinberlin opened this issue Jul 5, 2021 · 4 comments · Fixed by #44
Assignees
Labels
enhancement New feature or request

Comments

@martinberlin
Copy link
Owner

martinberlin commented Jul 5, 2021

Following examples of https://github.com/espressif/esp-rainmaker add WiFi provisioning in one branch.

It would be the Espressif alternative to send your WiFi credentials to your devices using Android and Iphone devices.

  • Add all RainMaker required libraries
  • Do a vector _buffer tests ( test/vector )
  • Add some documentation
@martinberlin
Copy link
Owner Author

martinberlin commented Jul 5, 2021

Note provisioning starts to work. But there is still an error in the provisioning process:

I (31038) app_wifi: Connected with IP Address:192.168.12.150
I (31038) esp_netif_handlers: sta ip: 192.168.12.150, mask: 255.255.255.0, gw: 192.168.12.1
I (31048) wifi_prov_mgr: STA Got IP
I (31048) app_wifi: Provisioning successful
I (31058) esp_mqtt_glue: Connecting to a1p72mufdu6064-ats.iot.us-east-1.amazonaws.com
I (31058) esp_mqtt_glue: Waiting for MQTT connection. This may take time.
E (34778) BT_SMP: smp_encrypt_data failed unable to allocate buffer

E (34778) BT_BTC: btc_gatts_cb_param_copy_req 2 no mem

I (40028) app_wifi: Disconnected. Connecting to the AP again...
E (40038) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x2880
E (40038) wifi_prov_mgr: STA Disconnected
I (40038) esp-tls-mbedtls: Certificate verified.
E (40038) wifi_prov_mgr: Disconnect reason : 200
E (40048) esp-tls: Failed to open new connection
E (40048) wifi:sta is connecting, return error
E (40058) TRANSPORT_BASE: Failed to open a new connection
E (40068) MQTT_CLIENT: Error transport connect
E (40068) esp_mqtt_glue: MQTT_EVENT_ERROR
W (40078) esp_mqtt_glue: MQTT Disconnected. Will try reconnecting in a while...

So it connects to WiFi but it does not get listed in the App as a device. The issue is that BLE needs RAM:
Gdew027w3 display(io); // Works

With more than 400*300 pixels display buffer an ESP32 without PSRAM it won't work. The WiFi is provisioned but the App stays in a "hanged state" if it does not complete the full process.

TODO:

@martinberlin
Copy link
Owner Author

martinberlin commented Jul 14, 2021

This was merged into this branch.
Vector continuation branch: https://github.com/martinberlin/cale-idf/tree/test/vector

@martinberlin
Copy link
Owner Author

This tickets needs more testing before closing it. Must say that I already shipped some devices built with this branch and it worked pretty good.
But it needs more documentation and also #50 should be implemented otherwise it works until someone decides to change their WiFi credentials and then it just keeps on hooked to the old WiFi.

@martinberlin
Copy link
Owner Author

Let’s reopen this after Espressif launches Rainmaker as a component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant