Closed OrenLederman closed 7 years ago
After some more testing:
It appears to somehow happen when there are too many badges in range (>28).
Also, somehow we are getting more than 28 results in a scan from the badge... something that is not supposed to happen since MAX_SCAN_RESULTS = 28
Seems to be fixed in the latest firmware update
See log below (Note - in this version of the hub we use the last chunk's data to determine the last timestamp. Need to change this as a temporary fix)
2016-10-09 13:55:59,170 - INFO - Requesting device H0HBQ2TD1R from server... 2016-10-09 13:55:59,196 - INFO - [D6:B8:C6:BA:9B:2B] Connecting to D6:B8:C6:BA:9B:2B 2016-10-09 13:56:01,000 - INFO - [D6:B8:C6:BA:9B:2B] Connected 2016-10-09 13:56:01,001 - INFO - [D6:B8:C6:BA:9B:2B] Starting audio recording 2016-10-09 13:56:01,139 - INFO - [D6:B8:C6:BA:9B:2B] Got time ack 2016-10-09 13:56:01,140 - INFO - [D6:B8:C6:BA:9B:2B] Badge datetime was: 1476035761,23 2016-10-09 13:56:01,140 - INFO - [D6:B8:C6:BA:9B:2B] Starting proximity scans 2016-10-09 13:56:01,349 - INFO - [D6:B8:C6:BA:9B:2B] Got time ack 2016-10-09 13:56:01,349 - INFO - [D6:B8:C6:BA:9B:2B] Badge datetime was: 1476035761,225 2016-10-09 13:56:01,349 - INFO - [D6:B8:C6:BA:9B:2B] Requesting data since 1476035721 603 2016-10-09 13:56:04,640 - ERROR - [D6:B8:C6:BA:9B:2B] failed pulling data 2016-10-09 13:56:04,640 - ERROR - [D6:B8:C6:BA:9B:2B] 1 2016-10-09 13:56:04,641 - ERROR - [D6:B8:C6:BA:9B:2B] Device disconnected 2016-10-09 13:56:04,641 - INFO - [D6:B8:C6:BA:9B:2B] Disconnecting from D6:B8:C6:BA:9B:2B 2016-10-09 13:56:04,641 - INFO - Errors pulling data. Saving data is anything was received 2016-10-09 13:56:04,641 - INFO - Chunks received: 7 2016-10-09 13:56:04,641 - INFO - saving chunks to file 2016-10-09 13:56:04,641 - DEBUG - Chunk timestamp: 1476035721.603, Voltage: 2.875, Delay: 50, Samples in chunk: 114 2016-10-09 13:56:04,642 - DEBUG - Chunk timestamp: 1476035727.303, Voltage: 2.875, Delay: 50, Samples in chunk: 114 2016-10-09 13:56:04,642 - DEBUG - Chunk timestamp: 1476035733.003, Voltage: 2.875, Delay: 50, Samples in chunk: 114 2016-10-09 13:56:04,642 - DEBUG - Chunk timestamp: 1476035738.703, Voltage: 2.875, Delay: 50, Samples in chunk: 114 2016-10-09 13:56:04,643 - DEBUG - Chunk timestamp: 1476035744.403, Voltage: 2.875, Delay: 50, Samples in chunk: 114 2016-10-09 13:56:04,643 - DEBUG - Chunk timestamp: 1476035345.388, Voltage: 2.893, Delay: 50, Samples in chunk: 114 2016-10-09 13:56:04,643 - DEBUG - Chunk timestamp: 1475973397.361, Voltage: 2.780, Delay: 50, Samples in chunk: 114 2016-10-09 13:56:04,643 - INFO - done writing 2016-10-09 13:56:04,643 - DEBUG - Setting last badge audio timestamp to 1475973397 361 Traceback (most recent call last): File "./badge_hub.py", line 331, in
pull_devices(mgr, args.start_recording)
File "./badge_hub.py", line 229, in pull_devices
dialogue(b, activate_audio, activate_proximity)
File "./badge_hub.py", line 125, in dialogue
bdg.set_audio_ts(last_chunk.ts, last_chunk.fract)
File "/home/orenled/Documents/OpenBadge/src/nRF_hub/badge.py", line 302, in set_audio_ts
raise ValueError('Trying to update last_audio_ts with old value')
ValueError: Trying to update last_audio_ts with old value