Cannot write to on board CC1352P7 of BeaglePlay

Hello Experts,
I have installed the newest minimal image of Beagleplay OS successfully. Mine is a clean installation without extra software stack.

Then, I added this line to /boot/firmware/extlinux/extlinux.conf under label eMMC (default):
fdtoverlays /overlays/k3-am625-beagleplay-bcfserial-no-firmware.dtbo

and then shutdown my board.

I built my WiSUN border router firmware for CC1352P7-1 from within TI CCS. This worked well for a Launchpad + Rasp Pi.

I then, transmitted these firmware
ns_br_LP_CC1352P7_1_tirtos7_ticlang.hex ns_br_LP_CC1352P7_1_tirtos7_ticlang.out
ns_br_LP_CC1352P7_1_tirtos7_ticlang.map

into BeaglePlay through SSH.

I then began to write to the on board CC1352P7 but ttyS2 did not respond. Please showed me how to correct it.
debian@BeagleBone:~$ cc1352_flasher -q -p /dev/ttyS2
Opening port /dev/ttyS2, baud 500000
Connecting to target…
ERROR: Timeout waiting for ACK/NACK after ‘Synch (0x55 0x55)’

115200
lsof | grep /dev/ttyS2

I have NEVER used this and this is a guess, try adding a -v and see if it has a verbose mode. If it does your in luck. Also, I have not done anything with the cc1352.

Thank for your attention.

I issued lsof | grep /dev/ttyS2 and nothing returned from the prompt.

As to verbose mode, it became a mess:

debian@BeagleBone:~$ cc1352_flasher -v -b 115200 -p /dev/ttyS2
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/cc1352_flasher/cli.py", line 1306, in main
    conf['fname'] = args[0]
                    ~~~~^^^
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/cc1352_flasher/cli.py", line 1308, in main
    raise Exception('No file path given.')
Exception: No file path given.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/cc1352_flasher", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/cc1352_flasher/cli.py", line 1494, in main
    if QUIET >= 10:
       ^^^^^
UnboundLocalError: cannot access local variable 'QUIET' where it is not associated with a value

That is good, that cli command shows if the file is in use. Not being used by another process is good, it is available for your project.

Dig into this one and look into why it has no file path.
Find the file cli.py.

When working with python always source a venv, don’t work from the base installation.

On your dev box.

$sudo apt install python3-venv
$ python3 -m venv <use a naming convention that you remember like my-venv>

$source my-venv/bin/activate

Do ALL of your python related stuff in it. You will have to pip install the packages from inside of the venv. There is some more with that, this will get you started.

Python and other programming languages are very critical of versions that are installed, everything must be on the same “page” or you have issues. venv is very good tool for python devs.

1 Like

Your python skill is very useful.

After having created a virtual environment, there is no more warning.

Thanks for your guide. :handshake:

1 Like

which software image?

anything we can push upstream to help?

Hello Friend,
Mine is this

This simple command even failed

(cc1352_devel) debian@BeaglePlay:~$ cc1352_flasher --play
Traceback (most recent call last):
  File "/home/debian/cc1352_devel/bin/cc1352_flasher", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/debian/cc1352_devel/lib/python3.11/site-packages/cc1352_flasher/cli.py", line 1291, in main
    conf['append'] = should_append(args[0])
                                   ~~~~^^^
IndexError: list index out of range

Some other stuff that is very important and leverages venv.

pip freeze > requirements.txt

This will place a snap shot of all the python packages and correct versions at the top of the tree.

To recreate another identical venv and another machine or other, source the venv then run

pip install -r requirements.txt

The requirements can be cp into your fresh venv. I always keep it in the root of the git tree. So the project can be cloned, venv built and then sourced, now run install -r and your environment will be recreated with the same package versions.

To get out of the venv

deactivate

Try --help

You are missing a command line argument, if you don’t have a help file for reference then you will have to open up the file and modify it or add some debug code.

If they are running python3.11 your venv should be setup to run 3.11, out of the box ubuntu is still on 3.10.

python --version

to explicitly state version 3.11

python3.11 -m venv <name it meaningfully>
1 Like

BeaglePlay Debian OS 11.8 seems working out of box.