itead / Sonoff_Devices_DIY_Tools

BSD 3-Clause "New" or "Revised" License
548 stars 168 forks source link

Doesn't work #125

Open tokamac opened 1 year ago

tokamac commented 1 year ago

"In 3.5.0, the device can be set as a AP and accessed with URL of http://10.10.7.1/"

No it can't.

tosiara commented 1 year ago

That page does not for me too, but I have found that you can send a POSt request with WIFI connection credentials:

curl -i -s -k -X $'POST' \
    -H $'accept: application/json' -H $'package-name: com.coolkit' -H $'cache-control: no-store' \
    -H $'Content-Type: application/json;charset=UTF-8' -H $'Content-Length: 78' \
    -H $'Host: 10.10.7.1' -H $'Connection: Keep-Alive' -H $'Accept-Encoding: gzip' \
    -H $'User-Agent: okhttp/3.12.12' \
    --data-binary $'{\"ssid\":\"mywifi\",\"password\":\"11111111\",\"serverName\":\"192.168.2.1\",\"port\":80}' \
    $'http://10.10.7.1/ap'

Response will be:

HTTP/1.1 200 OK
Content-Type: application/json
Connection: keep-alive
Content-Length: 11

{"error":0}

Either something changed and the docs are not up to date, or there is a bug in the firmware