『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 10451|回复: 9

重温老高帖子,sonoff刷机

[复制链接]

6

主题

60

帖子

454

积分

中级会员

Rank: 3Rank: 3

积分
454
金钱
389
HASS币
20
发表于 2018-3-10 19:08:13 | 显示全部楼层 |阅读模式
本帖最后由 ilikehassbian 于 2018-3-10 19:10 编辑

       最近,看到了老高的帖子,入手了七个sonoff basic,打算自己刷机,结果发现老高的帖子对于现在的sonoff不适用了,按老高的方法刷机后,sonoff一直不连WiFi,而且没反应。于是自己折腾了一下,最后在github上找到了解决方案,废话不多说,正文开始:
       首先,下载arduino1.8.5版本,链接:https://downloads.arduino.cc/arduino-1.8.5-windows.zip,按照老高视频上的方法搭建,链接:http://v.youku.com/v_show/id_XMT ... ~5~A&f=28493253&o=1   
       注意,注意,注意,安装esp8266的开发板时,需要选择2.4.1版本的,安装之后flashmode要变为DOUT,flashsize要变为1M(no SPIFFS),其余参数不要变。切记不能改成1M(64k)!!!
       然后,下载ino文件与库文件,链接:https://pan.baidu.com/s/1KZEln_kk8ZjRu087--D0Bw         按照注释改参数
       最后,点击验证,再点上传就可以了。
       小白个人经验,大神勿喷,完全基于老高教程,感谢老高!请勿用于商业用途!!!

评分

参与人数 1金钱 +10 收起 理由
+ 10 谢谢分享!

查看全部评分

回复

使用道具 举报

123

主题

4661

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16410
金钱
11664
HASS币
45
发表于 2018-3-10 20:25:00 | 显示全部楼层
谢谢分享,论坛里有解决方法的,不过好在你网上找到了。
回复

使用道具 举报

34

主题

335

帖子

1848

积分

金牌会员

Rank: 6Rank: 6

积分
1848
金钱
1513
HASS币
0
发表于 2018-3-13 21:35:58 来自手机 | 显示全部楼层
感谢分享
回复

使用道具 举报

2

主题

38

帖子

754

积分

高级会员

Rank: 4

积分
754
金钱
716
HASS币
0
发表于 2018-4-17 12:20:42 | 显示全部楼层
这个要怎么分辨出是新的sonoff?
回复

使用道具 举报

6

主题

292

帖子

2098

积分

金牌会员

Rank: 6Rank: 6

积分
2098
金钱
1806
HASS币
0
QQ
发表于 2018-8-5 00:13:35 | 显示全部楼层
Arduino:1.6.8 (Windows 7), 开发板:"Generic ESP8266 Module, 80 MHz, Flash, ck, 26 MHz, 40MHz, DOUT, 1M (no SPIFFS), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

WARNING: Spurious .github folder in 'Adafruit SGP30 Sensor' library
WARNING: Spurious .github folder in 'IRremoteESP8266' library
sonoff:35: error: no matching function for call to 'PubSubClient:ubSubClient(WiFiClient&, const char [14], int)'

C:\Users\Administrator\Desktop\鏅鸿兘瀹跺眳(1)\sonoff\sonoff.ino:35:59: note: candidates are:

In file included from C:\Users\Administrator\Desktop\鏅鸿兘瀹跺眳(1)\sonoff\sonoff.ino:2:0:

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:118:4: note: PubSubClient:ubSubClient(const char*, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&, Stream&)

    PubSubClient(const char*, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:118:4: note:   candidate expects 5 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:117:4: note: PubSubClient:ubSubClient(const char*, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&)

    PubSubClient(const char*, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:117:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:116:4: note: PubSubClient:ubSubClient(const char*, uint16_t, Client&, Stream&)

    PubSubClient(const char*, uint16_t, Client& client, Stream&);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:116:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:115:4: note: PubSubClient:ubSubClient(const char*, uint16_t, Client&)

    PubSubClient(const char*, uint16_t, Client& client);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:115:4: note:   no known conversion for argument 1 from 'WiFiClient' to 'const char*'

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:114:4: note: PubSubClient:ubSubClient(uint8_t*, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&, Stream&)

    PubSubClient(uint8_t *, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:114:4: note:   candidate expects 5 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:113:4: note: PubSubClient:ubSubClient(uint8_t*, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&)

    PubSubClient(uint8_t *, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:113:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:112:4: note: PubSubClient:ubSubClient(uint8_t*, uint16_t, Client&, Stream&)

    PubSubClient(uint8_t *, uint16_t, Client& client, Stream&);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:112:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:111:4: note: PubSubClient:ubSubClient(uint8_t*, uint16_t, Client&)

    PubSubClient(uint8_t *, uint16_t, Client& client);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:111:4: note:   no known conversion for argument 1 from 'WiFiClient' to 'uint8_t* {aka unsigned char*}'

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:110:4: note: PubSubClient:ubSubClient(IPAddress, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&, Stream&)

    PubSubClient(IPAddress, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client, Stream&);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:110:4: note:   candidate expects 5 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:109:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, std::function<void(char*, unsigned char*, unsigned int)>, Client&)

    PubSubClient(IPAddress, uint16_t, MQTT_CALLBACK_SIGNATURE,Client& client);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:109:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:108:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, Client&, Stream&)

    PubSubClient(IPAddress, uint16_t, Client& client, Stream&);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:108:4: note:   candidate expects 4 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:107:4: note: PubSubClient::PubSubClient(IPAddress, uint16_t, Client&)

    PubSubClient(IPAddress, uint16_t, Client& client);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:107:4: note:   no known conversion for argument 1 from 'WiFiClient' to 'IPAddress'

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:106:4: note: PubSubClient::PubSubClient(Client&)

    PubSubClient(Client& client);

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:106:4: note:   candidate expects 1 argument, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:105:4: note: PubSubClient::PubSubClient()

    PubSubClient();

    ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:105:4: note:   candidate expects 0 arguments, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:85:7: note: PubSubClient::PubSubClient(const PubSubClient&)

class PubSubClient {

       ^

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:85:7: note:   candidate expects 1 argument, 3 provided

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:85:7: note: PubSubClient::PubSubClient(PubSubClient&&)

C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09\src/PubSubClient.h:85:7: note:   candidate expects 1 argument, 3 provided

sonoff:38: error: 'MQTT' does not name a type

sonoff:38: error: expected unqualified-id before '&' token

sonoff:38: error: expected ')' before '&' token

sonoff:38: error: expected initializer before 'pub'

"ubSubClient.h" 对应多个库
已使用: C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\PubSubClient-2.6.09
未使用:C:\Users\Administrator\Desktop\arduino-PR-4376-BUILD-479\portable\sketchbook\libraries\pubsubclient-master
exit status 1
no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&, const char [14], int)'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
回复

使用道具 举报

1

主题

73

帖子

523

积分

高级会员

Rank: 4

积分
523
金钱
450
HASS币
0
发表于 2019-1-8 14:35:49 | 显示全部楼层
标记一下
回复

使用道具 举报

8

主题

59

帖子

389

积分

论坛分享达人

积分
389
金钱
325
HASS币
20
发表于 2019-1-25 15:20:34 | 显示全部楼层
今天买了两个
回复

使用道具 举报

4

主题

150

帖子

592

积分

高级会员

Rank: 4

积分
592
金钱
442
HASS币
0
发表于 2020-3-30 11:06:16 | 显示全部楼层
感谢分享
回复

使用道具 举报

0

主题

15

帖子

192

积分

注册会员

Rank: 2

积分
192
金钱
177
HASS币
0
发表于 2020-8-28 17:07:22 | 显示全部楼层
好东西,谢谢分享
回复

使用道具 举报

0

主题

16

帖子

795

积分

高级会员

Rank: 4

积分
795
金钱
779
HASS币
0
发表于 2020-8-28 17:31:30 | 显示全部楼层
感谢分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 09:28 , Processed in 0.085987 second(s), 33 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表