JNSwanson / ESP-Home-iBoost

ESPHOME Marlec iboost integration
MIT License
20 stars 2 forks source link

Boot Loops at Radio Reset #20

Open Fayrewood opened 2 months ago

Fayrewood commented 2 months ago

Extracted from the closed issue where I had issues compiling (now resolved using esphome command line).

I am getting boot loops still and have tried 2x ESP32s and CC1101 modules and followed the wiring meticulously. The manufacturer has confirmed the pin outs are as printed on the board and I've checked continuity between the ESP and the module.

I have enabled verbose logging and the ESP32 boots fine up until it reports SPI OK (just before radio reset) and then it reboots.

Has anyone got a link to a reliable source for the CC1101 radio, as I have tried two variants and I'm not convinced that the pin outs documented are accurate, so I am not sure if I have fried them by following the supplied pin outs, which the manufacturer has subsequently said are different

Here's the ESP logs in case they help with identifying the root cause:

[14:13:56]SDK:2.2.2-dev(38a443e)/Core:3.1.2=30102000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-65-g06164fb/BearSSL:b024386
[14:13:56][I][logger:034]: Log initialized
[14:13:56][I][app:029]: Running through setup()...
[14:13:56][V][app:030]: Sorting components by setup priority...
[14:13:56][D][number:012]: 'iBoost Manual Boost Time': Sending state 15.000000
[14:13:56][C][wifi:047]: Setting up WiFi...
[14:13:56][C][wifi:060]: Starting WiFi...
[14:13:56][C][wifi:061]:   Local MAC: A0:20:A6:22:C6:A3
[14:13:56][V][wifi_esp8266:061]: Enabling STA.
[14:13:56]mode : sta(a0:20:a6:22:c6:a3)
add if0
[V][wifi_esp8266:556]: Event: Changed Mode old=OFF new=STA
[14:13:56]wifi evt: 8
nul mode, fpm auto sleep set:enalbe
sleep disable
[D][wifi:481]: Starting scan...
[14:13:56][W][component:157]: Component wifi set Warning flag: scanning for networks
[14:13:56]scandone
[D][wifi:496]: Found networks:
[14:13:56][I][wifi:539]: - 'Sunnydene2.4' [redacted]▂▄▆█
[14:13:56][D][wifi:541]:     Channel: 13
[14:13:56][D][wifi:542]:     RSSI: -65 dB
[14:13:56][I][wifi:539]: - 'Sunnydene2.4' [redacted]▂▄▆█
[14:13:56][D][wifi:541]:     Channel: 13
[14:13:56][D][wifi:542]:     RSSI: -65 dB
[14:13:56][I][wifi:539]: - 'Sunnydene2.4' [redacted]▂▄▆█
[14:13:56][D][wifi:541]:     Channel: 13
[14:13:56][D][wifi:542]:     RSSI: -73 dB
[14:13:56][I][wifi:539]: - 'Sunnydene2.4' [redacted]▂▄▆█
[14:13:56][D][wifi:541]:     Channel: 13
[14:13:56][D][wifi:542]:     RSSI: -76 dB
[14:13:56][I][wifi:539]: - 'Sunnydene2.4' [redacted]▂▄▆█
[14:13:56][D][wifi:541]:     Channel: 13
[14:13:56][D][wifi:542]:     RSSI: -83 dB
[14:13:56][D][wifi:544]: - [redacted] [redacted]▂▄▆█
[14:13:56][D][wifi:544]: - [redacted] [redacted]▂▄▆█
[14:13:56][D][wifi:544]: - [redacted] [redacted]▂▄▆█
[14:13:56][D][wifi:544]: - [redacted] [redacted]▂▄▆█
[14:13:56][I][wifi:312]: WiFi Connecting to 'Sunnydene2.4'...
[14:13:56][V][wifi:314]: Connection Params:
[14:13:56][V][wifi:315]:   SSID: 'Sunnydene2.4'
[14:13:56][V][wifi:318]:   BSSID: DC:39:6F:72:EF:05
[14:13:56][V][wifi:348]:   Password: [redacted]
[14:13:56][V][wifi:353]:   Channel: 13
[14:13:56][V][wifi:362]:   Using DHCP IP
[14:13:56][V][wifi:364]:   Hidden: NO
[14:13:56][V][wifi_esp8266:514]: Event: Changed AuthMode old=OPEN new=WPA2 PSK
[14:13:56]wifi evt: 2
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 7
cnt 

connected with Sunnydene2.4, channel 13
dhcp client start...
[V][wifi_esp8266:490]: Event: Connected ssid='Sunnydene2.4' bssid=DC:39:6F:72:EF:05 channel=13
[14:13:56]wifi evt: 0
ip:192.168.1.33,mask:255.255.255.0,gw:192.168.1.1
[V][wifi_esp8266:529]: Event: Got IP static_ip=192.168.1.33 gateway=192.168.1.1 netmask=255.255.255.0
[14:13:56]wifi evt: 3
[I][wifi:616]: WiFi Connected!
[14:13:56][C][wifi:427]:   Local MAC: A0:20:A6:22:C6:A3
[14:13:56][C][wifi:432]:   SSID: [redacted]
[14:13:56][C][wifi:435]:   IP Address: 192.168.1.33
[14:13:56][C][wifi:438]:   BSSID: [redacted]
[14:13:56][C][wifi:440]:   Hostname: 'iboost32'
[14:13:56][C][wifi:442]:   Signal strength: -69 dB ▂▄▆█
[14:13:56][V][wifi:444]:   Priority: 0.0
[14:13:56][C][wifi:446]:   Channel: 13
[14:13:56][C][wifi:447]:   Subnet: 255.255.255.0
[14:13:56][C][wifi:448]:   Gateway: 192.168.1.1
[14:13:56][C][wifi:449]:   DNS1: 192.168.1.1
[14:13:56][C][wifi:450]:   DNS2: 0.0.0.0
[14:13:56][D][wifi:625]: Disabling AP...
[14:13:56][C][api:025]: Setting up Home Assistant API server...
[14:13:56]SPI OK
[14:13:56][W][iBoost:113]: SPI OK
[14:13:56]
--------------- CUT HERE FOR EXCEPTION DECODER ---------------

[14:13:56]Soft WDT reset
[14:13:56]
[14:13:56]Exception (4):
[14:13:56]epc1=0x40100765 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
[14:13:56]
[14:13:56]>>>stack>>>
[14:13:56]
[14:13:56]ctx: cont
[14:13:56]sp: 3ffffcf0 end: 3fffffd0 offset: 0160
[14:13:56]3ffffe50:  40201094 3ffefc18 3ffefa7c 4020109e  
[14:13:56]3ffffe60:  00000000 3ffefc18 3ffefa7c 40211b76  
[14:13:56]3ffffe70:  3fff164c 00000008 3ffef960 402102bd  
[14:13:56]3ffffe80:  00000006 00000006 3fff20fc 40100d36  
[14:13:56]3ffffe90:  00000102 00000014 00000005 3fff1cdc  
[14:13:56]3ffffea0:  3fff1bf4 00000020 3fff151c 3fff1cdc  
[14:13:56]3ffffeb0:  3fff1bf4 3ffefa88 3fffff64 40213918  
[14:13:56]3ffffec0:  00000000 feefeffe feefeffe feefeffe  
[14:13:56]3ffffed0:  40227188 00000000 7fc00000 00000000  
[14:13:56]3ffffee0:  3fff1b14 3fff1b18 3fff1b18 00000000  
[14:13:56]3ffffef0:  3ffffef8 0000000d 78656c41 65646e61  
[14:13:56]3fffff00:  61334272 00000072 00000000 00000000  
[14:13:56]3fffff10:  00000000 00000000 00000000 00000000  
[14:13:56]3fffff20:  00000000 00000000 00000000 40227188  
[14:13:56]3fffff30:  00000000 7fc00000 00000000 3fff15f4  
[14:13:56]3fffff40:  3fff15f8 3fff15f8 40227150 00000000  
[14:13:56]3fffff50:  7fc00000 00000000 3fff1acc 3fff1aec  
[14:13:56]3fffff60:  3fff1aec 3fff1524 3fff1528 3fff1528  
[14:13:56]3fffff70:  a5a5a500 3fffff84 00000001 feefeffe  
[14:13:56]3fffff80:  feefeffe 3fff1ddc feefeffe feefeffe  
[14:13:56]3fffff90:  3fff1d24 00000000 3fff1bbc feefeffe  
[14:13:56]3fffffa0:  feefeffe feefeffe feefeffe 3ffefe28  
[14:13:56]3fffffb0:  3fffdad0 00000000 3ffefdfc 40222430  
[14:13:56]3fffffc0:  feefeffe feefeffe 3fffdab0 40100465  
[14:13:56]<<<stack<<<
[14:13:56]
--------------- CUT HERE FOR EXCEPTION DECODER ---------------

[14:13:56] ets Jan  8 2013,rst cause:2, boot mode:(3,6)
[14:13:56]
[14:13:56]load 0x4010f000, len 3424, room 16 
[14:13:56]tail 0
[14:13:56]chksum 0x2e
[14:13:56]load 0x3fff20b8, len 40, room 8 
[14:13:56]tail 0
[14:13:56]chksum 0x2b
[14:13:56]csum 0x2b
[14:13:56]v0006a7a0
[14:13:56]~ld
srchild commented 2 months ago

I can't comment on reliability of supplier in general. But I can say that I bought two from this seller last December, and they worked.

https://www.ebay.co.uk/str/cayin35

More recently I bought two more from this seller, and they worked.

https://www.ebay.co.uk/str/alimodule

I don't think either came with pinout definition, so I just assumed they matched the diagram here:

https://github.com/JNSwanson/ESP-Home-iBoost

Fayrewood commented 2 months ago

Thank you!

Something like this one OK and were the pins as per the board?

ebay link here

srchild commented 2 months ago

This one

cayin

and this one

alimodule

Fayrewood commented 2 months ago

This one

cayin

and this one

alimodule

Many thanks - I had been using the 433 boards which are supposedly tuneable to 868. I'll give these a whirl.

Could you confirm your pin outs used matched what I've found here when you get a moment please?

CC1101-868mhz-radio-module-pinout

srchild commented 2 months ago

I followed the labelling here which seems the same as your image except it has CLK in place of your SCLK

Fayrewood commented 2 months ago

Perfect, thank you!

I now see where I was going wrong, I think. I had one of those long thin 433/868 ones with a built in antenna, and not the square one shown in the docs. It seems so obvious now.

Thanks again! Peter


From: srchild @.> Sent: Wednesday, August 21, 2024 7:52:46 AM To: JNSwanson/ESP-Home-iBoost @.> Cc: Peter Miller (Fayrewood) @.>; Author @.> Subject: Re: [JNSwanson/ESP-Home-iBoost] Boot Loops at Radio Reset (Issue #20)

I followed the labelling herehttps://github.com/JNSwanson/ESP-Home-iBoost?tab=readme-ov-file#cc1101-module-pinout which seems the same as your image except it has CLK in place of your SCLK

— Reply to this email directly, view it on GitHubhttps://github.com/JNSwanson/ESP-Home-iBoost/issues/20#issuecomment-2301269895, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2HQD5LQVSU7JGUHYMHDPPTZSQ2L5AVCNFSM6AAAAABMZ5HSICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRGI3DSOBZGU. You are receiving this because you authored the thread.Message ID: @.***>

Fayrewood commented 2 months ago

### SUCCESS with the new board!

Thank you for your help @srchild . I've got poor reception, so now tweaking the frequency as per the instructions, but at least I'm up and running :)