Code: Select all
D:\Project\UJ\esp\esp-idf\tools\esp_prov>python esp_prov.py --transport softap --ssid ble --passphrase 1357924680 --sec_ver 1 --pop abcd1234 --custom_data 12345678
Connecting 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 <module>
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:\Project\UJ\esp\esp-idf\tools\esp_prov\prov\custom_prov.py", line 51, in custom_data_request
enc_cmd = security_ctx.encrypt_data(data)
File "D:\Project\UJ\esp\esp-idf\tools\esp_prov\security\security1.py", line 170, in encrypt_data
return self.cipher.update(data)
File "C:\Users\xuetao\AppData\Local\Programs\Python\Python37\lib\site-packages\cryptography\hazmat\primitives\ciphers\base.py", line 154, in update
return self._ctx.update(data)
File "C:\Users\xuetao\AppData\Local\Programs\Python\Python37\lib\site-packages\cryptography\hazmat\backends\openssl\ciphers.py", line 124, in update
n = self.update_into(data, buf)
File "C:\Users\xuetao\AppData\Local\Programs\Python\Python37\lib\site-packages\cryptography\hazmat\backends\openssl\ciphers.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.2
W (2750877) wifi:<ba-add>idx:4 (ifx:1, 98:3b:8f:0e:b9:7e), tid:0, ssn:61, winSize:64
I (2763807) protocomm_httpd: Creating new session: 57
W (2764837) protocomm_httpd: Closing session as socket 57 was closed
2、app "espsoftap"如何使用自定义数据。
3、想知道,模块端,esp_prov.py,app关于自定数据如何使用。