diff --git a/ltchiptool/soc/ln882h/util/ln882htool.py b/ltchiptool/soc/ln882h/util/ln882htool.py index 99f5381..8a08af6 100644 --- a/ltchiptool/soc/ln882h/util/ln882htool.py +++ b/ltchiptool/soc/ln882h/util/ln882htool.py @@ -208,7 +208,7 @@ def flash_write( # Convert stream to temporary file before sending with YMODEM with NamedTemporaryFile(delete=False) as f: - f.write(stream.getbuffer()) + f.write(stream.read()) self.command(f"upgrade", waitresp=False)