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

 找回密码
 立即注册
楼主: snowwolf725

[智能音箱] 拆解新买的小爱音箱Pro, 更新固化开机启动 SSH 教学

  [复制链接]

1

主题

22

帖子

68

积分

注册会员

Rank: 2

积分
68
金钱
46
HASS币
0
发表于 2020-1-14 00:16:09 | 显示全部楼层
赞一个
回复

使用道具 举报

0

主题

15

帖子

63

积分

注册会员

Rank: 2

积分
63
金钱
48
HASS币
0
发表于 2020-2-21 22:20:45 | 显示全部楼层
对linux一点都不会,好悲催,得慢慢学了
回复

使用道具 举报

7

主题

235

帖子

1373

积分

金牌会员

Rank: 6Rank: 6

积分
1373
金钱
1128
HASS币
20
发表于 2020-3-12 15:57:24 | 显示全部楼层
给帖主点赞。我的小爱已经成砖了,怪我当时太年轻
回复

使用道具 举报

0

主题

25

帖子

124

积分

注册会员

Rank: 2

积分
124
金钱
99
HASS币
0
发表于 2020-3-28 20:51:46 | 显示全部楼层
感谢提供。 谢谢
回复

使用道具 举报

1

主题

49

帖子

275

积分

中级会员

Rank: 3Rank: 3

积分
275
金钱
226
HASS币
0
发表于 2020-4-18 23:32:56 | 显示全部楼层
大神,求指导。小爱变砖,boot0和boot1都开不了机,下载固件,刷机有用吗?刷机只刷system0或system1区域数据吗?我感觉我的是data区域的数据损坏了。
小爱同学救砖刷机,求大神来指导思路
https://bbs.hassbian.com/thread-9687-1-1.html
(出处: 『瀚思彼岸』» 智能家居技术论坛)
回复

使用道具 举报

3

主题

55

帖子

978

积分

论坛技术达人

积分
978
金钱
918
HASS币
40
 楼主| 发表于 2020-4-24 21:12:56 | 显示全部楼层
本帖最后由 snowwolf725 于 2020-4-24 21:18 编辑
a53208 发表于 2020-4-18 23:32
大神,求指导。小爱变砖,boot0和boot1都开不了机,下载固件,刷机有用吗?刷机只刷system0或system1区域数 ...

既然你可以进入 failsafe mode 那就不难救回
开机时按 f 进入 failsafe mode ,
然後透过下面的操作连上 wifi
然後透过 wget 把固件下载到 /tmp
然後在利用 mtd write 将新的固件刷入这样就可以了
除了 system0, sytem1 还有 boot0, boot1
data 损坏的话可能要从别的小爱音箱利用 dd 备份出来然後用 dd 写入到坏的音箱内

BusyBox v1.27.2 () built-in shell (ash)

ash: can't access tty; job control turned off
  _____  _              __     __ __  ___  ___
 |     ||_| ___  ___   |  |   |  |  ||   ||  _|
 | | | || ||  _|| . |  |  |__ |-   -|| | || . |
 |_|_|_||_||___||___|  |_____||__|__||___||___|
------------------------------------------------

      ROM Type:release / Ver:1.58.13
------------------------------------------------
================= FAILSAFE MODE active ================
special commands:
* firstboot          reset settings to factory defaults
* mount_root     mount root-partition with config files

after mount_root:
* passwd                         change root's password
* /etc/config               directory with config files

for more help see:
http://wiki.openwrt.org/doc/howto/generic.failsafe
=======================================================

root@(none):/# /etc/init.d/wireless start
Failed to connect to ubus
mkdir: can't create directory '/data/wifi': Read-only file system
uci: Entry not found
cat: can't open '/data/wifi/config.txt': No such file or directory
[   23.105408@3] wlan: Loading MWLAN driver
[   23.106031@0] vendor=0x02DF device=0x9145 class=0 function=1
[   23.109710@0] SDIO: max_segs=1024 max_seg_size=131072
[   23.114343@0] rx_work=1 cpu_num=4
[   23.122111@2] Request firmware: mrvl/sdsd8977_combo_v2.bin
[   25.426355@0] WLAN FW is active
[   25.519154@3] get_channel when STA is not connected
[   25.521061@0] get_channel when AP is not started
[   25.525543@1] wlan: version = SD8977-16.84.9.p17-C4X16C544.P3-GPL-(FP84)
[   25.529996@1] wlan: Driver loaded successfully
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
uci: Entry not found
sh: missing ]
/etc/rc.common: line 1: lx06: not found
/etc/rc.common: line 1: lx06: not found
Failed to connect to ubus
[   27.806339@1] get_channel when STA is not connected
[   27.807155@1] get_channel when STA is not connected
[   27.813351@1] get_channel when STA is not connected
[   27.818972@3] get_channel when AP is not started
[   27.820619@3] get_channel when AP is not started
[   27.824630@3] wlan: Stoping AP
[   27.827512@3] wlan: AP stopped
Failed to connect to ubus
Failed to connect to ubus
touch: /data/dnsmasq.time: Read-only file system
chown: /data/dnsmasq.time: No such file or directory
Failed to connect to ubus
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
{ "name": "wireless", "script": "\/etc\/init.d\/wireless", "instances": { }, "triggers": [ ] }
Failed to connect to ubus
root@(none):/# ifconfig wlan0 hw ether be:a6:15:2d:7f:e7
root@(none):/# ifconfig wlan0 up
root@(none):/# vi /tmp/wpa_supplicant.conf
root@(none):/# wpa_supplicant -B -i wlan0 -c /tmp/wpa_supplicant.conf
[   74.144860@2] get_channel when STA is not connected
[   74.145478@0] get_channel when STA is not connected
[   74.149923@0] get_channel when STA is not connected
[   74.154208@0] get_channel when STA is not connected
[   74.159455@0] get_channel when STA is not connected
root@(none):/# [   74.290931@0] wlan: wlan0 START SCAN
[   76.412644@0] wlan: Connected to bssid b0:XX:XX:XX:XX:87 successfully

回复

使用道具 举报

1

主题

49

帖子

275

积分

中级会员

Rank: 3Rank: 3

积分
275
金钱
226
HASS币
0
发表于 2020-4-25 21:35:11 | 显示全部楼层
本帖最后由 a53208 于 2020-4-25 21:36 编辑
snowwolf725 发表于 2020-4-24 21:12
既然你可以进入 failsafe mode 那就不难救回
开机时按 f 进入 failsafe mode ,
然後透过下面的操作连上 w ...

感谢大神提供的新思路。我的小爱同学变砖了,WIFI好像开不起来。大神帮我分析一下是不是我哪里没弄对。
里面比较有疑问的几点:
1. 设置硬件地址的话,我是按你的地址来的,我查了指令,这个应该不是路由器的MAC地址吧?
ifconfig wlan0 hw ether be:a6:15:2d:7f:e7

2. 新建的wpa_supplicant.conf,我用的下面的格式,但是psk是加密后的密码,我目前不清楚怎么生成psk密码?我试了下未加密的密码。

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1

network={
        ssid="miwifi"
        scan_ssid=1
        psk=yuxuanye
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}
3. 我感觉我第一个开启WiFi就没成功,不知是否这样。

请大神指点迷津,谢谢!!!
跑码如下:

BusyBox v1.27.2 () built-in shell (ash)

ash: can't access tty; job control turned off
 _____  _              _____  ___    ___  _____ 
|     ||_| ___  ___   |   __||_  |  |_  ||  _  |
| | | || ||  _|| . |  |__   | _| |_ |  _||     |
|_|_|_||_||___||___|  |_____||_____||___||__|__|  
-------------------------------------------------
    Reboot (SNAPSHOT, 70-1-1)
-------------------------------------------------

================= FAILSAFE MODE active ================
special commands:
* firstboot          reset settings to factory defaults
* mount_root     mount root-partition with config files

after mount_root:
* passwd                         change root's password
* /etc/config               directory with config files

for more help see:
http://wiki.openwrt.org/doc/howto/generic.failsafe
=======================================================

root@(none):/# /etc/init.d/wireless start
Failed to connect to ubus
mkdir: can't create directory '/data/wifi': Read-only file system
cp: can't create '/data/wifi/nvram.txt': No such file or directory
ifconfig: SIOCSIFFLAGS: Operation not permitted
ifconfig: SIOCSIFFLAGS: Operation not permitted
[   11.289466@3] i2c i2c-1: [aml_i2c_xfer] error ret = -5 (-EIO)
[   11.289594@3] i2c i2c-1: token 1, master_no(1) 300K addr 0x3c
wl: wl driver adapter not found
wl: wl driver adapter not found
wl: wl driver adapter not found
uci: Entry not found
sh: missing ]
/etc/rc.common: line 1: s12a: not found
/etc/rc.common: line 1: s12a: not found
Failed to connect to ubus
Failed to connect to ubus
Failed to connect to ubus
touch: /data/dnsmasq.time: Read-only file system
chown: /data/dnsmasq.time: No such file or directory
Failed to connect to ubus
ifconfig: SIOCSIFFLAGS: Operation not permitted
{ "name": "wireless", "script": "\/etc\/init.d\/wireless", "instances": { }, "triggers": [ ] }
Failed to connect to ubus
root@(none):/# ifconfig wlan0 hw ether be:a6:15:2d:7f:e7
root@(none):/# ifconfig wlan0 up
ifconfig: SIOCSIFFLAGS: Operation not permitted
root@(none):/# vi /tmp/wpa_supplicant.conf
root@(none):/# wpa_supplicant -B -i wlan0 -c /tmp/wpa_supplicant.conf
root@(none):/# 

回复

使用道具 举报

3

主题

55

帖子

978

积分

论坛技术达人

积分
978
金钱
918
HASS币
40
 楼主| 发表于 2020-4-26 12:38:51 | 显示全部楼层
本帖最后由 snowwolf725 于 2020-4-26 13:01 编辑
a53208 发表于 2020-4-25 21:35
感谢大神提供的新思路。我的小爱同学变砖了,WIFI好像开不起来。大神帮我分析一下是不是我哪里没弄对。
里 ...
root@(none):/# ifconfig wlan0 up
ifconfig: SIOCSIFFLAGS: Operation not permitted


你这边这个错误表示缺少网卡的驱动文件,
导致网卡无法正确运行,
所以在 failsafe 中利用 wifi 下载档案这条路基本走不通了


[img]  

                               
登录/注册后可看大图
[/img]

如果你的是小爱 Pro 的话他有内置 micro USB 端口用於救砖,
只要把固件放在 U盘然後进入 UBoot 就可以利用 usb start 等指令挂载U盘救砖
https://blog.csdn.net/li_wen01/article/details/88780481

旧版的小爱音箱没有 micro usb (其实有不过要自己焊接)
所以就只能透过 realterm/超级终端 这类支援  Kermit 传输的软件
https://blog.csdn.net/sean_8180/article/details/86492488

将档案从电脑端传到小爱的内存,
然後再把内存的资料写到 NAND 进行刷机
https://bbs.hassbian.com/forum.php?mod=redirect&goto=findpost&ptid=9687&pid=321284
根据你这边的开机讯息可以得出小爱音箱的 NAND 地址布局为
Creating 6 MTD partitions on "A revision NAND 2Gib TC58BVG1S3HTA00 ":
0x000000800000-0x000001000000 : "tpl"
0x000001000000-0x000001800000 : "boot0"
0x000001800000-0x000002000000 : "boot1"
0x000002000000-0x000004000000 : "system0"
0x000004000000-0x000006000000 : "system1"
0x000006000000-0x000010000000 : "data"


开机时按 Ctrl+C 可以中断开机进入 UBoot
利用 loadb 从PC端下载固件到内存地址 0x1000000

这边假设是刷写 boot0 所以传输 boot0.bin

loadb 0x1000000
0x000001000000-0x000001800000 : "boot0"
0x000001800000 - 0x000001000000 = 0x800000
将内存地址 0x1000000开始的数据写入到 NAND 地址 0x1000000共写入 0x800000
nand write 1000000 1000000 800000
利用 loadb 从PC端下载固件到内存地址 0x1000000

这边假设是刷写 system0 所以传输 system0.img
loadb 0x1000000
0x000002000000-0x000004000000 : "system0"
0x000004000000 - 0x000002000000 = 0x2000000
将内存地址 0x1000000开始的数据写入到 NAND 地址 0x2000000共写入 0x2000000
nand write 1000000 2000000 2000000

=============
利用 loadb 从PC端下载固件到内存地址 0x1000000

这边假设是刷写 boot1 所以传输 boot1.bin

loadb 0x1000000
0x000001800000-0x000002000000 : "boot1"
0x000002000000 - 0x000001800000 = 0x800000
将内存地址 0x1000000开始的数据写入到 NAND 地址 0x000001800000共写入 0x800000
nand write 1000000 1800000 800000
利用 loadb 从PC端下载固件到内存地址 0x1000000

这边假设是刷写 system1 所以传输 system1.img
loadb 0x1000000
0x000004000000-0x000006000000 : "system1"
0x000006000000 - 0x000004000000 = 0x2000000
将内存地址 0x1000000开始的数据写入到 NAND 地址 0x4000000共写入 0x2000000
nand write 1000000 4000000 2000000

回复

使用道具 举报

3

主题

55

帖子

978

积分

论坛技术达人

积分
978
金钱
918
HASS币
40
 楼主| 发表于 2020-4-26 12:51:37 | 显示全部楼层
本帖最后由 snowwolf725 于 2020-4-26 12:56 编辑
1. 设置硬件地址的话,我是按你的地址来的,我查了指令,这个应该不是路由器的MAC地址吧?
ifconfig wlan0 hw ether be:a6:15:2d:7f:e7

这个是小爱音箱无线网卡的地址,

在 failsafe 模式下无法读取 /data/wifi/nvram.txt 中保存的网卡 mac 地址
所以会导致 mac 地址变为 00:00:00:00:00:00 这样的非法 mac 地址
需要手动修改网卡的 mac 地址

所以如果你要从别台小爱音箱备份 data 分区刷到你的音箱的话,

刷完后记得修改 /data/wifi 内的 mac 地址
以免发生同区网内两台音箱mac地址相同导致无法连网的问题

2. 新建的wpa_supplicant.conf,我用的下面的格式,但是psk是加密后的密码,我目前不清楚怎么生成psk密码?我试了下未加密的密码。

没那麽复杂psk直接就是明码的密码

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
  ssid="Test"
  psk="12345678"
  scan_ssid=1
  key_mgmt=WPA-PSK
}




==================
小爱音箱(S12A) 1.44.4固件地址:
https://bigota.miwifi.com/xiaoqiang/rom/s12a/mico_all_f86a5_1.44.4.bin

小爱音箱Pro (LX06) 1.58.13 固件下载地址:
https://bigota.miwifi.com/xiaoqiang/rom/lx06/mico_firmware_8b63c_1.58.13.bin

小爱音箱Pro (LX06) NAND 地址布局

    Creating 6 MTD partitions on "A revision NAND 1Gib TC58BVG0S3HTA00 ":
    0x000000800000-0x000001000000 : "tpl"
    0x000001000000-0x000001600000 : "boot0"
    0x000001600000-0x000001c00000 : "boot1"
    0x000001c00000-0x000004400000 : "system0"
    0x000004400000-0x000006c20000 : "system1"
    NAND bbt detect factory Bad block at 6000000
    0x000006c20000-0x000008000000 : "data"


回复

使用道具 举报

1

主题

49

帖子

275

积分

中级会员

Rank: 3Rank: 3

积分
275
金钱
226
HASS币
0
发表于 2020-4-26 13:17:18 | 显示全部楼层
snowwolf725 发表于 2020-4-26 12:38
你这边这个错误表示缺少网卡的驱动文件,
导致网卡无法正确运行,
所以在 failsafe 中利用 wifi 下载档 ...

感谢,能写的这么详细,为我们小白考虑!!
我之前根据开机信息把内存分布做成了个表格:

分区地址

分区地址


我之前考虑过大神你的思路,碰到以下几点困难:
第一个是备份文件没有,手上只有论坛里分享的固件包。
第二个是固件包的地址我不清楚怎么拆分成nand上分区地址,另外不清楚用固件包直接刷写地址内容需要不需要考虑文件系统。
第三个是我手上只有一台初代的小爱同学,和一台新的小爱音箱,备份的数据应该不能通用。

我之前的想法是把固件通过uboot写到nand上,现在我写到data分区了(kermit传输一次固件需要一个多小时),写了后,进入小爱同学,怎么把指定空间的内容识别成文件,并放到指定目录下?


另外请大神指点,固件里有没有data分区的数据,通过刷机能否覆盖data的数据?我现在boot0和boot1都能正常进入小爱同学,我个人猜测最大的可能性是data的数据坏了,不知道我的理解对不对?

最后再次感谢大神愿意花时间指点我们小白。现初代小爱出现我这种情况的人非常多,期待大神出手相救!!!

回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-24 09:37 , Processed in 1.216924 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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