Code: Select all
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x40100000, len 29188, room 16
tail 4
chksum 0x3e
load 0x3ffe8000, len 2928, room 4
tail 12
chksum 0x2c
ho 0 tail 12 room 4
load 0x3ffe8b70, len 3832, room 12
tail 12
chksum 0x86
csum 0x86
rf cal sector: 1019
freq trace enable 0
rf[112] : 00
rf[113] : 00
rf[114] : 01
w_flash
SDK ver: 2.1.0(116b762) compiled @ May 5 2017 16:08:55
phy ver: 1134_0, pp ver: 10.2
SDK version:2.1.0(116b762)
IOT VERSION = v1.0.5t45772(a)
reset reason: 6
LIGHT PARAM: R: -1
LIGHT PARAM: G: -1
LIGHT PARAM: B: -1
LIGHT PARAM: CW: -1
LIGHT PARAM: WW: -1
LIGHT PARAM: P: 1000
malloc:1
prd:1000 r : 22222 g: 22222 b: 22222 cw: 22222 ww: 22222
free:0
PWM version : 00000003
mode : sta(ec:fa:bc:12:4a:ca) + softAP(ee:fa:bc:12:4a:ca)
add if0
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
finish
add 1
aid 1
station: 00:04:4b:79:7b:f4 join, AID = 1
len:299
A_dat:152,tot:152,lenght:152
We have a POST request.
copied token to esp_param and saved in flash memory
webserver's 192.168.4.2:43710 disconnect
scandone
switch to channel 10
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 6
cnt
connected with AtHome, channel 10
dhcp client start...
ip:192.168.0.146,mask:255.255.255.0,gw:192.168.0.1
host_name = espressif_light_demo
server_name = _espLight._tcp.local
user_esp_platform_dns_found 115.29.202.58
user_esp_platform_connect
user_esp_platform_connect_cb
station: 00:04:4b:79:7b:f4 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(ec:fa:bc:12:4a:ca)
{"nonce": 664128725,"path": "/v1/device/activate/", "method": "POST", "body": {"encrypt_method": "PLAIN", "token": "1fb59f9fa88d23c38157c0dccff11934b24e4e20", "bssid": "ec:fa:bc:12:4a:ca","rom_version":"v1.0.5t45772(a)"}, "meta": {"Authorization": "token 856b9375b02934fb56def0e6f5066de6e304f193"}}
user_esp_platform_sent_cb
user_esp_platform_recv_cb {"status": 500, "message": "internal server error"}
please check device is activated.
{"nonce": 1195372557,"path": "/v1/device/activate/", "method": "POST", "body": {"encrypt_method": "PLAIN", "token": "1fb59f9fa88d23c38157c0dccff11934b24e4e20", "bssid": "ec:fa:bc:12:4a:ca","rom_version":"v1.0.5t45772(a)"}, "meta": {"Authorization": "token 856b9375b02934fb56def0e6f5066de6e304f193"}}
user_esp_platform_sent_cb
user_esp_platform_recv_cb {"status": 500, "message": "internal server error"}
The unit then cycles this command continuously returning the same error. In the above I can confirm that the master key is correct.
Separately I sent from a client a curl command to activate the device my_light_iot to make sure it can be activated.
Code: Select all
curl -X POST -H "Authorization: token 856b9375b02934fb56def0e6f5066de6e304f193" -d '{"encrypt_method":"PLAIN", "bssid":"ec:fa:bc:12:4a:ca","token":"1fb59f9fa88d23c38157c0dccff11934b24e4e20"}' https://iot.espressif.com/v1/device/activate/
{"device": {"id": 13755, "created": "2018-03-01T08:17:11Z", "updated": "2018-03-02T19:19:32Z", "visibly": 1, "ptype": 45772, "product_id": 278, "productbatch_id": 0, "name": "my_light_iot", "description": "", "serial": "e4f6bd78", "bssid": "ec:fa:bc:12:4a:ca", "is_private": 0, "is_frozen": 0, "status": 1, "metadata": "", "key_id": 71682, "location": "", "last_push": "0001-01-01T00:00:00Z", "last_pull": "0001-01-01T00:00:00Z", "last_active": "0001-01-01T00:00:00Z", "last_activated_at": "2018-03-02T19:19:32Z", "activate_status": 1, "activated_at": "2018-03-02T19:19:32Z", "rom_version": "", "latest_rom_version": ""}, "key": {"id": 71682, "created": "2018-03-01T08:17:11Z", "updated": "2018-03-01T08:17:11Z", "visibly": 1, "authorized_user_id": 0, "name": "master", "scope": 3, "user_id": 58717, "product_id": 0, "device_id": 13755, "datastream_tmpl_id": 0, "datastream_id": 0, "access_methods": "*", "source_ip": "*", "token": "856b9375b02934fb56def0e6f5066de6e304f193", "level": 0, "is_master_key": 1, "is_owner_key": 0, "activate_status": 1, "expired_at": "2118-02-05T00:17:13Z"}, "status": 200, "token": {"id": 108181, "created": "2018-03-02T19:19:32Z", "updated": "2018-03-02T19:19:32Z", "visibly": 1, "name": "owner shared", "scope": 3, "user_id": 58717, "product_id": 0, "device_id": 13755, "datastream_tmpl_id": 0, "datastream_id": 0, "access_methods": "*", "source_ip": "*", "token": "1fb59f9fa88d23c38157c0dccff11934b24e4e20", "is_owner_key": 1, "activate_status": 1, "expired_at": "2118-02-06T19:19:32Z", "generated_at": "0001-01-01T00:00:00Z", "token_expired_at": "2018-03-02T19:29:32Z", "delete_after_used": 0, "revoke_prekeys_if_ownerkey": 1}}
The activation was successful and I confirmed the activation by visiting the device at my account at iot.espressif.com. I have run out of ideas on what the problem is. Any help will be appreciated.