Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timed out waiting for readiness from PN532 error #214

Open
DRnooberson opened this issue Dec 6, 2022 · 5 comments
Open

Timed out waiting for readiness from PN532 error #214

DRnooberson opened this issue Dec 6, 2022 · 5 comments

Comments

@DRnooberson
Copy link

DRnooberson commented Dec 6, 2022

Hello,

Lately I've been trying to install the provided code on a D1 mini with a PN532 board. In the past, I have been successful on breadboard but now that I want to use a more permanent package (using the 3d printed case) I am unable to flash it again.

Everytime I try to install the code I end up in an infinite loop showing this message:
ESP NFC error

Things I have tried:

  • Change D1 mini for another manufacturer
  • Change PN532 for another manufacturer
  • Re-do the wiring multiple time
  • Tried flashing using all 4 methods (Wirelessly, Computer running HA, Through the browser ESP Web tool, Manual install using ESPtool) all with same results.

Notes:
In the installation process, I can see that the D1 mini connects properly to the Wifi network so I don't think the problem would come from that part.
Since I has work in the past, could it be due to HA or ESPhome version being different? I am running the following versions:

  • Home Assistant Core 2022.11.4
  • ESPHome 2022.11.4

Any help would be greatly appreciated! Thank you :)

EDIT: Here's a picture of my setup
317830126_531641232187211_8536479654955064347_n

@adonno
Copy link
Owner

adonno commented Dec 10, 2022

may i Suggest you remove the LED and the buzzer and only try with the PN532 ?

@DRnooberson
Copy link
Author

DRnooberson commented Dec 13, 2022

may i Suggest you remove the LED and the buzzer and only try with the PN532 ?

Still not working sadly... Could it be due to the ESP version I am running? Have you had any chance flashing a board recently?

@unios0932
Copy link

@DRnooberson, have you solved this issue?
It looks I have the same issue.

I am trying to do a first start on ESPhome on HA but on the last part the API can't connect to HA.
The reason I see in verbose mode probably indicate problems with PN532 module
I have an issue with "Component pn532 took a long time for an operation".
On the other issue on ESPhome issues - #3281 PN532 over I2C stops responding after a while @mrkylegp said that "it is there is a problem with the module on a hardware/firmware level". Does that mean that the this specific PN532 hardware I have is faulty and I need to try with another version of this module or I need to do something else? I double checked but might be the problem with soldering?

Which version of ESPHome has the issue?

2023.4.4

What type of installation are you using?

On Raspberry Pi 4

Which version of Home Assistant has the issue?

Home Assistant 2023.5.2
Supervisor 2023.04.1
Operating System 10.1

Here is the log in a verbose mode:

INFO Successfully compiled program.
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting.....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: cc:50:e3:05:7b:81
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00000000 to 0x00094fff...
Compressed 607712 bytes to 415159...
Wrote 607712 bytes (415159 compressed) at 0x00000000 in 9.8 seconds (effective 497.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[21:36:41]\x90��nn$`���nr\x8e\x92\x92nrr\x92`�p\xf2n\x82�r\x8c��b��bn\xc2n�b\xc4\xf2nn'�l`�\x90��nn$`���nr\x8e\x92\x92nr�l`��r\x92\x92nr�l`�\x9c�l$$�l`�\xfc\x82n\x92`�
[21:36:41]SDK:2.2.2-dev(38a443e)/Core:3.0.2=30002000/lwIP:STABLE-2_1_2_RELEASE/glue:1.2-48-g7421258/BearSSL:6105635
[21:36:41][I][logger:259]: Log initialized
[21:36:41][C][ota:469]: There have been 0 suspected unsuccessful boot attempts.
[21:36:41][I][app:029]: Running through setup()...
[21:36:41][V][app:030]: Sorting components by setup priority...
[21:36:41][I][i2c.arduino:183]: Performing I2C bus recovery
[21:36:41][D][template.switch:049]:   Restored state OFF
[21:36:41][D][switch:016]: 'TagReader Buzzer Enabled' Turning OFF.
[21:36:41][D][switch:055]: 'TagReader Buzzer Enabled': Sending state OFF
[21:36:41][D][template.switch:049]:   Restored state OFF
[21:36:41][D][switch:016]: 'TagReader LED enabled' Turning OFF.
[21:36:41][D][switch:055]: 'TagReader LED enabled': Sending state OFF
[21:36:41][C][esp8266_pwm:017]: Setting up ESP8266 PWM Output...
[21:36:41][C][light:035]: Setting up light 'TagReader LED'...
[21:36:41][D][light:035]: 'TagReader LED' Setting:
[21:36:41][D][light:040]:   Color mode: RGB
[21:36:41][D][light:084]:   Transition length: 1.0s
[21:36:41][C][pn532:018]: Setting up PN532...
[21:36:41][V][pn532:249]: Reading ACK...
[21:36:41][V][pn532:260]: ACK valid: YES
[21:36:41][V][pn532_i2c:043]: Reading response
[21:36:41][V][pn532:265]: Sending NACK for retransmit
[21:36:41][V][pn532_i2c:049]: Reading response of length 5
[21:36:41][D][pn532:036]: Found chip PN532
[21:36:41][D][pn532:037]: Firmware ver. 1.6
[21:36:41][V][pn532:249]: Reading ACK...
[21:36:41][V][pn532:260]: ACK valid: YES
[21:36:41][V][pn532_i2c:043]: Reading response
[21:36:41][V][pn532:265]: Sending NACK for retransmit
[21:36:41][V][pn532_i2c:049]: Reading response of length 1
[21:36:41][V][pn532:249]: Reading ACK...
[21:36:41][V][pn532:260]: ACK valid: YES
[21:36:41][V][pn532_i2c:043]: Reading response
[21:36:41][V][pn532:265]: Sending NACK for retransmit
[21:36:41][V][pn532_i2c:049]: Reading response of length 1
[21:36:41][V][pn532:271]: Turning RF field OFF
[21:36:41][V][pn532:249]: Reading ACK...
[21:36:41][V][pn532:260]: ACK valid: YES
[21:36:41][D][binary_sensor:034]: 'TagReader Status': Sending initial state OFF
[21:36:41][V][text_sensor:013]: 'TagReader ESPHome Version': Received new state 2023.4.4
[21:36:41][D][text_sensor:064]: 'TagReader ESPHome Version': Sending state '2023.4.4'
[21:36:41][C][wifi:038]: Setting up WiFi...
[21:36:41][C][wifi:039]:   Local MAC: CC:50:E3:05:7B:81
[21:36:41][V][wifi_esp8266:058]: Enabling STA.
[21:36:41]mode : sta(cc:50:e3:05:7b:81)
[21:36:41]add if0
[21:36:41][V][wifi_esp8266:534]: Event: Changed Mode old=OFF new=STA
[21:36:41]wifi evt: 8
[21:36:41]sleep disable
[21:36:41][D][wifi:387]: Starting scan...
[21:36:41][V][pn532:249]: Reading ACK...
[21:36:41][V][pn532:260]: ACK valid: YES
[21:36:41][V][pn532_i2c:043]: Reading response
[21:36:42][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:42][V][pn532:271]: Turning RF field OFF
[21:36:42][V][pn532:249]: Reading ACK...
[21:36:42][V][pn532:260]: ACK valid: YES
[21:36:42][V][pn532:249]: Reading ACK...
[21:36:42][V][pn532:260]: ACK valid: YES
[21:36:42][V][pn532_i2c:043]: Reading response
[21:36:42][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:42][V][pn532:271]: Turning RF field OFF
[21:36:42][V][pn532:249]: Reading ACK...
[21:36:42][V][pn532:260]: ACK valid: YES
[21:36:43][V][pn532:249]: Reading ACK...
[21:36:43][V][pn532:260]: ACK valid: YES
[21:36:43][V][pn532_i2c:043]: Reading response
[21:36:43][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:43][V][pn532:271]: Turning RF field OFF
[21:36:43][V][pn532:249]: Reading ACK...
[21:36:43][V][pn532:260]: ACK valid: YES
[21:36:44][V][pn532:249]: Reading ACK...
[21:36:44][V][pn532:260]: ACK valid: YES
[21:36:44][V][pn532_i2c:043]: Reading response
[21:36:44][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:44][V][pn532:271]: Turning RF field OFF
[21:36:44][V][pn532:249]: Reading ACK...
[21:36:44][V][pn532:260]: ACK valid: YES
[21:36:45][V][pn532:249]: Reading ACK...
[21:36:45][V][pn532:260]: ACK valid: YES
[21:36:45][V][pn532_i2c:043]: Reading response
[21:36:45][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:45][V][pn532:271]: Turning RF field OFF
[21:36:45][V][pn532:249]: Reading ACK...
[21:36:45][V][pn532:260]: ACK valid: YES
[21:36:46][V][pn532:249]: Reading ACK...
[21:36:46][V][pn532:260]: ACK valid: YES
[21:36:46][V][pn532_i2c:043]: Reading response
[21:36:46][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:46][V][pn532:271]: Turning RF field OFF
[21:36:46][V][pn532:249]: Reading ACK...
[21:36:46][V][pn532:260]: ACK valid: YES
[21:36:47][V][pn532:249]: Reading ACK...
[21:36:47][V][pn532:260]: ACK valid: YES
[21:36:47][V][pn532_i2c:043]: Reading response
[21:36:47][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:47][V][pn532:271]: Turning RF field OFF
[21:36:47][V][pn532:249]: Reading ACK...
[21:36:47][V][pn532:260]: ACK valid: YES
[21:36:48]scandone
[21:36:48][D][wifi:402]: Found networks:
[21:36:48][I][wifi:445]: - 'WIFI1' (2C:21:24:4F:A4:24) [redacted]▂▄▆█
[21:36:48][D][wifi:447]:     Channel: 8
[21:36:48][D][wifi:448]:     RSSI: -24 dB
[21:36:48][D][wifi:450]: - 'WIFI2'[redacted] (1E:61:B4:4F:A4:54) [redacted]▂▄▆█
[21:36:48][D][wifi:450]: - '01:06:20:20:14:06'[redacted] (DC:39:6F:F1:8C:EF) [redacted]▂▄▆█
[21:36:48][D][wifi:450]: - 'Orange-76474'[redacted] (08:B0:55:37:64:78) [redacted]▂▄▆█
[21:36:48][D][wifi:450]: - 'WIFI6-76474'[redacted] (0A:B0:55:37:64:79) [redacted]▂▄▆█
[21:36:48][D][wifi:450]: - 'WIFI3'[redacted] (98:52:4A:65:1A:F0) [redacted]▂▄▆█
[21:36:48][D][wifi:450]: - 'WIFI4'[redacted] (D8:33:B7:2A:44:56) [redacted]▂▄▆█
[21:36:48][D][wifi:450]: - 'WIFI5-c656f'[redacted] (0A:6A:0A:2C:65:74) [redacted]▂▄▆█
[21:36:48][I][wifi:258]: WiFi Connecting to 'WIFI1'...
[21:36:48][V][wifi:260]: Connection Params:
[21:36:48][V][wifi:261]:   SSID: 'WIFI1'
[21:36:48][V][wifi:264]:   BSSID: 1C:21:24:2F:A4:24
[21:36:48][V][wifi:284]:   Password: 'XXXXX'[redacted]
[21:36:48][V][wifi:289]:   Channel: 8
[21:36:48][V][wifi:298]:   Using DHCP IP
[21:36:48][V][wifi:300]:   Hidden: NO
[21:36:48][V][wifi_esp8266:492]: Event: Changed AuthMode old=OPEN new=WPA2 PSK
[21:36:48]wifi evt: 2
[21:36:48]scandone
[21:36:49]state: 0 -> 2 (b0)
[21:36:49][V][pn532:249]: Reading ACK...
[21:36:49][V][pn532:260]: ACK valid: YES
[21:36:49][V][pn532_i2c:043]: Reading response
[21:36:49][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:49][V][pn532:271]: Turning RF field OFF
[21:36:49][V][pn532:249]: Reading ACK...
[21:36:49][V][pn532:260]: ACK valid: YES
[21:36:49]state: 2 -> 3 (0)
[21:36:49]state: 3 -> 5 (10)
[21:36:49]add 0
[21:36:49]aid 1
[21:36:49]cnt 
[21:36:49]
[21:36:49]connected with WIFI1, channel 8
[21:36:49]dhcp client start...
[21:36:49][V][wifi_esp8266:468]: Event: Connected ssid='WIFI1' bssid=1C:21:24:2F:A4:24 channel=8
[21:36:49]wifi evt: 0
[21:36:49][V][pn532:249]: Reading ACK...
[21:36:49][V][pn532:260]: ACK valid: YES
[21:36:49][V][pn532_i2c:043]: Reading response
[21:36:49][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:49][V][pn532:271]: Turning RF field OFF
[21:36:49][V][pn532:249]: Reading ACK...
[21:36:49][V][pn532:260]: ACK valid: YES
[21:36:50][V][pn532:249]: Reading ACK...
[21:36:50][V][pn532:260]: ACK valid: YES
[21:36:50][V][pn532_i2c:043]: Reading response
[21:36:50][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:50][V][pn532:271]: Turning RF field OFF
[21:36:50][V][pn532:249]: Reading ACK...
[21:36:50][V][pn532:260]: ACK valid: YES
[21:36:51]ip:192.168.11.218,mask:255.255.255.0,gw:192.168.11.200
[21:36:51][V][wifi_esp8266:507]: Event: Got IP static_ip=192.168.11.218 gateway=192.168.11.200 netmask=255.255.255.0
[21:36:51]wifi evt: 3
[21:36:51][I][wifi:519]: WiFi Connected!
[21:36:51][C][wifi:363]:   Local MAC: CC:50:E3:05:7B:81
[21:36:51][C][wifi:364]:   SSID: 'WIFI1'[redacted]
[21:36:51][C][wifi:365]:   IP Address: 192.168.11.218
[21:36:51][C][wifi:366]:   BSSID: 1C:21:24:2F:A4:24[redacted]
[21:36:51][C][wifi:368]:   Hostname: 'tagreader-057b81'
[21:36:51][C][wifi:370]:   Signal strength: -31 dB ▂▄▆█
[21:36:51][V][wifi:372]:   Priority: 0.0
[21:36:51][C][wifi:374]:   Channel: 8
[21:36:51][C][wifi:375]:   Subnet: 255.255.255.0
[21:36:51][C][wifi:376]:   Gateway: 192.168.11.200
[21:36:51][C][wifi:377]:   DNS1: 192.168.11.200
[21:36:51][C][wifi:378]:   DNS2: 0.0.0.0
[21:36:51][D][wifi:528]: Disabling AP...
[21:36:51][C][ota:093]: Over-The-Air Updates:
[21:36:51][C][ota:094]:   Address: tagreader.local:8266
[21:36:51][C][api:025]: Setting up Home Assistant API server...
[21:36:51][I][app:062]: setup() finished successfully!
[21:36:51][V][text_sensor:013]: 'TagReader IP Address': Received new state 192.168.11.218
[21:36:51][D][text_sensor:064]: 'TagReader IP Address': Sending state '192.168.11.218'
[21:36:51][V][text_sensor:013]: 'TagReader Connected SSID': Received new state WIFI1
[21:36:51][D][text_sensor:064]: 'TagReader Connected SSID': Sending state 'WIFI1'
[21:36:51][I][app:102]: ESPHome version 2023.4.4 compiled on May  6 2023, 21:34:05
[21:36:51][I][app:104]: Project adonno.tag_reader version 1.4
[21:36:51][C][wifi:505]: WiFi:
[21:36:51][C][wifi:363]:   Local MAC: CC:50:E3:05:7B:81
[21:36:51][C][wifi:364]:   SSID: 'WIFI1'[redacted]
[21:36:51][C][wifi:365]:   IP Address: 192.168.11.218
[21:36:51][C][wifi:366]:   BSSID: 1C:21:24:2F:A4:24[redacted]
[21:36:51][C][wifi:368]:   Hostname: 'tagreader-057b81'
[21:36:51][C][wifi:370]:   Signal strength: -32 dB ▂▄▆█
[21:36:51][V][wifi:372]:   Priority: 0.0
[21:36:51][C][wifi:374]:   Channel: 8
[21:36:51][C][wifi:375]:   Subnet: 255.255.255.0
[21:36:51][C][wifi:376]:   Gateway: 192.168.11.200
[21:36:51][C][wifi:377]:   DNS1: 192.168.11.200
[21:36:51][C][wifi:378]:   DNS2: 0.0.0.0
[21:36:51][C][logger:294]: Logger:
[21:36:51][C][logger:295]:   Level: VERBOSE
[21:36:51][C][logger:296]:   Log Baud Rate: 115200
[21:36:51][C][logger:297]:   Hardware UART: UART0
[21:36:51][C][i2c.arduino:053]: I2C Bus:
[21:36:51][C][i2c.arduino:054]:   SDA Pin: GPIO4
[21:36:51][C][i2c.arduino:055]:   SCL Pin: GPIO5
[21:36:51][C][i2c.arduino:056]:   Frequency: 400000 Hz
[21:36:51][C][i2c.arduino:059]:   Recovery: bus successfully recovered
[21:36:51][C][template.switch:075]: Template Switch 'TagReader Buzzer Enabled'
[21:36:51][C][template.switch:077]:   Icon: 'mdi:volume-high'
[21:36:51][C][template.switch:097]:   Restore Mode: always OFF
[21:36:51][C][template.switch:060]:   Restore State: YES
[21:36:51][C][template.switch:061]:   Optimistic: YES
[21:36:51][V][pn532:249]: Reading ACK...
[21:36:51][V][pn532:260]: ACK valid: YES
[21:36:51][V][pn532_i2c:043]: Reading response
[21:36:51][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:51][V][pn532:271]: Turning RF field OFF
[21:36:51][V][pn532:249]: Reading ACK...
[21:36:51][V][pn532:260]: ACK valid: YES

[21:36:51][V][component:205]: Components should block for at most 20-30ms.
[21:36:51][C][template.switch:075]: Template Switch 'TagReader LED enabled'
[21:36:51][C][template.switch:077]:   Icon: 'mdi:alarm-light-outline'
[21:36:51][C][template.switch:097]:   Restore Mode: always OFF
[21:36:51][C][template.switch:060]:   Restore State: YES
[21:36:51][C][template.switch:061]:   Optimistic: YES
[21:36:51][C][esp8266_pwm:022]: ESP8266 PWM:
[21:36:51][C][esp8266_pwm:023]:   Pin: GPIO13
[21:36:51][C][esp8266_pwm:024]:   Frequency: 1000.0 Hz
[21:36:51][C][light:103]: Light 'TagReader LED'
[21:36:51][C][light:105]:   Default Transition Length: 1.0s
[21:36:51][C][light:106]:   Gamma Correct: 2.80
[21:36:52][C][restart.button:017]: Restart Button 'TagReader Restart'
[21:36:52][C][pn532:350]: PN532:
[21:36:52][C][pn532:362]:   Update Interval: 1.0s
[21:36:52][C][pn532_i2c:128]:   Address: 0x24
[21:36:52][C][status:034]: Status Binary Sensor 'TagReader Status'
[21:36:52][C][status:034]:   Device Class: 'connectivity'
[21:36:52][C][version.text_sensor:021]: Version Text Sensor 'TagReader ESPHome Version'
[21:36:52][C][version.text_sensor:021]:   Icon: 'mdi:new-box'
[21:36:52][V][version.text_sensor:021]:   Unique ID: 'cc50e3057b81-version'
[21:36:52][C][rtttl:018]: Rtttl
[21:36:52][C][captive_portal:088]: Captive Portal:
[21:36:52][C][mdns:108]: mDNS:
[21:36:52][C][mdns:109]:   Hostname: tagreader-057b81
[21:36:52][V][mdns:110]:   Services:
[21:36:52][V][mdns:112]:   - _esphomelib, _tcp, 6053
[21:36:52][V][mdns:114]:     TXT: version = 2023.4.4
[21:36:52][V][mdns:114]:     TXT: mac = cc50e3057b81
[21:36:52][V][mdns:114]:     TXT: platform = ESP8266
[21:36:52][V][mdns:114]:     TXT: board = d1_mini
[21:36:52][V][mdns:114]:     TXT: network = wifi
[21:36:52][V][mdns:114]:     TXT: project_name = adonno.tag_reader
[21:36:52][V][mdns:114]:     TXT: project_version = 1.4
[21:36:52][V][mdns:114]:     TXT: package_import_url = github://adonno/tagreader/tagreader.yaml
[21:36:52][C][ota:093]: Over-The-Air Updates:
[21:36:52][C][ota:094]:   Address: tagreader.local:8266
[21:36:52][C][api:138]: API Server:
[21:36:52][C][api:139]:   Address: tagreader.local:6053
[21:36:52][C][api:141]:   Using noise encryption: YES
[21:36:52][C][improv_serial:032]: Improv Serial:
[21:36:52][C][wifi_info:009]: WifiInfo IPAddress 'TagReader IP Address'
[21:36:52][C][wifi_info:009]:   Icon: 'mdi:wifi'
[21:36:52][V][wifi_info:009]:   Unique ID: 'cc50e3057b81-wifiinfo-ip'
[21:36:52][C][wifi_info:011]: WifiInfo SSID 'TagReader Connected SSID'
[21:36:52][C][wifi_info:011]:   Icon: 'mdi:wifi-strength-2'
[21:36:52][V][wifi_info:011]:   Unique ID: 'cc50e3057b81-wifiinfo-ssid'
[21:36:52][V][pn532:249]: Reading ACK...
[21:36:52][V][pn532:260]: ACK valid: YES
[21:36:52][V][pn532_i2c:043]: Reading response
[21:36:52][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:52][V][pn532:271]: Turning RF field OFF
[21:36:52][V][pn532:249]: Reading ACK...
[21:36:52][V][pn532:260]: ACK valid: YES
**[21:36:52][V][component:204]: Component pn532 took a long time for an operation (0.11 s).**
[21:36:52][V][component:205]: Components should block for at most 20-30ms.
[21:36:53][V][pn532:249]: Reading ACK...
[21:36:53][V][pn532:260]: ACK valid: YES
[21:36:53][V][pn532_i2c:043]: Reading response
[21:36:53][V][pn532_i2c:032]: Timed out waiting for readiness from PN532!
[21:36:53][V][pn532:271]: Turning RF field OFF
[21:36:53][V][pn532:249]: Reading ACK...
[21:36:53][V][pn532:260]: ACK valid: YES
...

In case on need for more logs I am ready to send here.

@adonno
Copy link
Owner

adonno commented May 7, 2023

would you mind having the logs less verbose and trying to scan a card ?
somtimes depdning on your HA configuration you wil have to add the tagreader manually

Settings --> devices & Services --> Add integration --> Esphome --> enter the ipaddress

@unios0932
Copy link

Finally it works! Last time I did that it didn't show all parameters of device but now it looks good.
On the other hand tagreader in esphome is still offline. Apart of that tagreader in HA still works. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants