In my application we would like to give a service engineer the possibility to temporarily log in the system with his own phone.
I see two options. One could be that, instead of the saved provisioning data, another storage area is assigned for the service engineer for his login. The other otion, which I see as probably easier, would be to save the end customer data in a temporary storage, and after the intervention of the service engineer save it back.
An added complication would be that it would be great if the service engineer could, in his login, use the netword SSID and password of the saved data. This last is not absolutely necessary as he could ask the end user for this data.
So my main question is, where are the provisioning data saved, and how large are they. Can they be easily saved temporarily?
ESP_Piyush, you already helped me enormously. I hope you could help me in this as well. Thanks in advance,
Ron
Access to provisioning eeprom
Re: Access to provisioning eeprom
Does the service engineer really need to change the network? If not, the user can just "share" the node (from the node details page) with the service engineer and when done, remove his/her access.
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: Access to provisioning eeprom
The problem is that the end user may not be at home.
I thought of the sharing idea, even in the sense that 1 special service phone would be made available to the engineer with shares of ALL end users in it. That could be set up when their system is installed. The problem I had with that was that I doubt there is an easy way for the service engineer to select the correct share.
That is way in my humble opinion the temporary saving and restoring idea might be easier.
I thought of the sharing idea, even in the sense that 1 special service phone would be made available to the engineer with shares of ALL end users in it. That could be set up when their system is installed. The problem I had with that was that I doubt there is an easy way for the service engineer to select the correct share.
That is way in my humble opinion the temporary saving and restoring idea might be easier.
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: Access to provisioning eeprom
Moreover the service engineer has additional settings available to him, that the end user has no acces to. So yes, a change is needed as well.
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: Access to provisioning eeprom
I still have this problem finding the wifi credentials and the stored phone link. I tried going through the source code, but that proves very time consuming.
I really hope someone could point me to the right direction. Even if it is just the wifi SSID and password. I found it is stored in a structure wifi_sta_config_t, but I can not access the sta variable. If I re-configure my system using the app it shows in the debug monitor the SSID and password, but I cannot find where this message is formed.
ANY help is enourmously appreciated!
I really hope someone could point me to the right direction. Even if it is just the wifi SSID and password. I found it is stored in a structure wifi_sta_config_t, but I can not access the sta variable. If I re-configure my system using the app it shows in the debug monitor the SSID and password, but I cannot find where this message is formed.
ANY help is enourmously appreciated!
Re: Access to provisioning eeprom
The Wi-Fi configuration itself is embedded much deeper into the underlying network provisioning component. The exact line can be found here. The same is also informed to the applications using NETWORK_PROV_WIFI_CRED_RECV which you can handle in your application code similar to the handling of other events here. Actual storage of Wi-Fi credentials goes even deeper, wherein the esp-idf's Wi-Fi API esp_wifi_set_config() uses underlying nvs layer to store the information. In other words, it would be possible, but hard to change this workflow. You can maintain a copy of the credentials by handling the event mentioned. However, your use case still wont get satisfied. If you expect the service Engineer to onboard the device, the user-node mapping of the previous user will anyways get removed and the device will get mapped to the service engineer instead.
-
ronbreukers
- Posts: 19
- Joined: Tue Dec 14, 2021 2:45 pm
Re: Access to provisioning eeprom
Thank you ESP_Piyush. This already helps me a lot. I can get a copy of the WIfi credentials, thus making it easier on the service engineer to log in, At the same time, I will just make it for the end user as easy as possible to re-login with his phone after the visit of the service engineer. I will just forget about saving all the data needed.
I found out it was not easy to dig into. You should become intimately familiar with the code, and given the complexity I would be astonished if I manage within 1 or 2 weeks.
Thanks for helping me out. I really appreciate it. GREAT service!
Ron
I found out it was not easy to dig into. You should become intimately familiar with the code, and given the complexity I would be astonished if I manage within 1 or 2 weeks.
Thanks for helping me out. I really appreciate it. GREAT service!
Ron
Who is online
Users browsing this forum: No registered users and 1 guest
