This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC1312R1: Failed in OAD with python script oad_write_bin.py using offchip image both in server and client

Part Number: LAUNCHXL-CC1312R1

Hi all,

I am trying the OffChip example OAD Server and OAD Client on 2 boards, on which one is acting as concentrator oad server and other is oad client. Followed Readme file in the ti/simplelink_cc13xx_cc26xx_sdk_6_10_00_29/examples/rtos/CC1312R1_LAUNCHXL/easylink/rfWsnConcentratorOadServer/README.md .  All seems good. I am getting the serial messages as mentioned in Readme file on serial port through putty.

But after running python script, you can see the debugging messages which I try to print. Python is blocking on Ser.read as the server is not responding. 

$ python3 oad_write_bin.py /dev/ttyACM0 rfWsnNodeExtFlashOadClient_CC1312R1_LAUNCHXL_app_v2.bin 
opening file:
<_io.BufferedReader name='rfWsnNodeExtFlashOadClient_CC1312R1_LAUNCHXL_app_v2.bin'>
file size: 72940
sending header
sending blocks
reading block num
72940
b'\x00\x00'
writing block num
b'\x00\x00'
reading block num


b''

b''
Traceback (most recent call last):
  File "oad_write_bin.py", line 107, in <module>
    blockNum = blockCntByte1.encode('hex') | (blockCntByte2.encode('hex') << 8)
AttributeError: 'bytes' object has no attribute 'encode'

  • Hi Jyothi,

    I believe this issue is because the python script was written for Python 2, and it is incompatible with Python 3. So you need to either use Python 2 or modify the script to work with python 3.

    Regards,
    Nikolaj