示例:esp-idfexamplesprovisioningwifi_prov_mgrCode:
Select all
D:ProjectUJespesp-idftoolsesp_prov>python esp_prov.py --transport softap --ssid ble --passphrase 1357924680 --sec_ver 1 --pop abcd1234 --custom_data 12345678Connec
ting to 192.168.4.1:80==== Starting Session ======== Session Established ======== Sending Custom data to esp32 ====Traceback (most recent call last): File "esp_prov.py", line 440, in if not custom_data(obj_transport, obj_security, args.custom_data): File "esp_prov.py", line 191, in custom_data message = prov.custom_data_request(sec, custom_data) File "D:ProjectUJespesp-idftoolsesp_provprovcustom_prov.py", line 51, in custom_data_request enc_cmd = security_ctx.encrypt_data(data) File "D:ProjectUJespesp-idftoolsesp_provsecuritysecurity1.py", line 170, in encrypt_data return self.cipher.update(data) File "C:UsersxuetaoAppDataLocalProgramsPythonPython37libsite-packagescryptographyhazmatprimitivesciphersbase.py", line 154, in update return self._ctx.update(data) File "C:UsersxuetaoAppDataLocalProgramsPythonPython37libsite-packagescryptographyhazmatbackendsopensslciphers.py", line 124, in update n = self.update_into(data, buf) File "C:UsersxuetaoAppDataLocalProgramsPythonPython37libsite-packagescryptographyhazmatbackendsopensslciphers.py", line 139, in update_into baseinbuf = self._backend._ffi.from_buffer(data)TypeError: from_buffer() cannot return the address of a unicode object
模块端输出Code:
Select all
I (2750327) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.2W (2750877) wifi:idx:4 (ifx:1, 98:3b:8f:0e:b9:7e), tid:0, ssn:61, winSize:64I (2763807) protocomm_httpd: Creating new session: 57W (2764837) protocomm_httpd: Closing session as socket 57 was closed
1、请这个问题怎么解决呢?
2、app "espsoftap"如何使用自定义数据。
3、想知道,模块端,esp_prov.py,app关于自定数据如何使用。