Errors communicating with notecard

I am having some issues with communications between my ESP32 and the notecard. The app is connecting to the notecard on a notecarrier A. The protocol is serial not I2C. Notes are created ok and sent to the notehub. The issue seems to be in receiving a note from notehub vi the ATTN pin signal. The program recognizes the interupt and processes the incoming note, but when data is being sent the following happens.

[ERROR] invalid JSON {io}: c":“EAB3
[WARN] retrying… corrupt response
[INFO] {“req”:“card.attn”,“mode”:“rearm”,“crc”:“000E:1721C88C”}
[WARN] retrying… CRC error
[INFO] {“req”:“note.add”,“file”:“twilio.qo”,“sync”:true,“body”:{“body”:“Current temp: 21.0\n”,“From”:”+16476997934",“To”:“+14167070434”},“crc”:“000E:2CF32D5C”}
[INFO] {“total”:1}
sending sms
Current temp: 21.0
[ERROR] timeout: transaction incomplete {io}
[WARN] retrying… transaction failure
[INFO] {“req”:“card.attn”,“mode”:“rearm”,“crc”:“000E:1721C88C”}
[WARN] retrying… CRC error
[INFO] {“req”:“card.attn”,“mode”:“rearm”,“crc”:“000E:1721C88C”}
[WARN] retrying… CRC error
[INFO] {“req”:“card.attn”,“mode”:“rearm”,“crc”:“000E:1721C88C”}
[WARN] retrying… CRC error
[INFO] {“req”:“card.attn”,“mode”:“rearm”,“crc”:“000E:1721C88C”}
[WARN] retrying… CRC error
[ERROR] {“err”:“CRC error {io}”,“src”:“note-c”}

The odd issue is that the note does get sent successfully out to the notehub.

Any ideas what is happening? The notecard is on the latest firmware

So it looks like the problem is that within the espnow receive function the I created, I was calling the function that used the received data to create the msg to notehub. When I moved the calling of the sending of the note out of the espnow receive function and processed after the function completed, everything worked fine. This function that handles the received espnow data seemed to be fine sending notes within the function when the creation of the note was not driven by an interrupt from receiving a notehub note.

2 Likes