Skip to content

Commit 4a0bad4

Browse files
committed
firmware: use the calculated size when reading the next chunk of an ota file
This commit fixes the size of the next ota file chunk to use the calculated one instead of the default one. This was causing a 'Data payload too large' transmit error (0x74) when transmitting the first ota packet in DigiMesh (fw versions 3004 and 3003). Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
1 parent 7558e87 commit 4a0bad4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

digi/xbee/firmware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def get_next_data_chunk(self):
289289
self._file = open(self._file_path, "rb")
290290
self._file.read(self._discard_size)
291291

292-
return self._file.read(_OTA_DEFAULT_BLOCK_SIZE)
292+
return self._file.read(self._chunk_size)
293293
except IOError as e:
294294
self.close_file()
295295
raise _ParsingOTAException(str(e))

0 commit comments

Comments
 (0)