Web.post chunks have unreliable behavior

Following up on a previous discussion, I’ve returned to trying to figure out how things are looking with the newest firmware 3.4.1.15128.

I’m frequently encountering situations where the fragmented post starts with work, but then returns a somewhat unexpected error. This error usually occurs, but not always. When it does occur, it’s not always on the same fragment.

INFO:root:Card is already in mode continuous with response {'secure': True, 'mode': 'continuous', 'host': 'a.notefile.net', 'product': 'XXXX', 'device': 'XXXX'}
INFO:root:Checking connection {'connected': True, 'status': 'connected (session open) {connected}'}
INFO:root:setting CARD_REQUEST_SEGMENT_DELAY_MS from 250 to 50
DEBUG:root:sending web.post fragment of length 8192 at offset 0
DEBUG:root:web.post response {'total': 1}
DEBUG:root:sending web.post fragment of length 8192 at offset 8192
DEBUG:root:web.post response {'total': 2}
DEBUG:root:sending web.post fragment of length 8192 at offset 16384
DEBUG:root:web.post response {'total': 1}
DEBUG:root:sending web.post fragment of length 8192 at offset 24576
DEBUG:root:web.post response {'total': 2}
DEBUG:root:sending web.post fragment of length 8192 at offset 32768
DEBUG:root:web.post response {'err': 'cannot interpret JSON: invalid token {io}'}

In some cases, after setting the card to continuous mode, it will take minutes to establish a connection. In other cases the card will just stay in the connected {connected-closed} state for a long time.

INFO:root:Checking sync status {'status': 'connected {connected-closed}', 'bytes_sent': 591, 'bytes_received': 225, 'time': 1663550970, 'sync': True, 'completed': 38, 'duration': 41}

I’m happy to help run diagnostics or tests if there are thoughts on what might be causing this.

Hi @dirtdevil,

Looking back on previous correspondence, I’m curious if you’re using your WBNA Notecard with both MAIN and DIV antennas attached? It looks like connectivity was an issue previously, and I’m concerned that may be what is happening now. You could also try smaller packet sizes to see if that helps.

Another note that came up internally is that I2C on the Raspberry Pi is known to be unreliable due to an unfixable/unfixed Broadcom hardware bug in which “clock stretching” (a fundamental requirement of I2C) is broken. We are now recommending connecting over serial instead to the Notecard.

Thanks,
Rob