Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing cc2538-bsl require pyserial which I already have installed #124

Open
ionultd opened this issue May 28, 2022 · 3 comments
Open

Comments

@ionultd
Copy link

ionultd commented May 28, 2022

I execute: python cc2538-bsl.py -p COM20 -evw --bootloader-sonoff-usb CC1352P2_CC2652P_launchpad_coordinator_20211217.hex
and it says:
cc2538-bsl.py requires the Python serial library
Please install it with:
pip3 install pyserial

Already done:

PS E:\mydownloads\cc2538-bsl-master> pip3 install pyserial
Requirement already satisfied: pyserial in c:\users\shane.platformio\penv\lib\site-packages (3.5)

I am on windows 10 with Python 3.10.4

Any suggestion?

@JelmerT
Copy link
Owner

JelmerT commented May 29, 2022

could you try
python3 cc2538-bsl.py -p COM20 -evw --bootloader-sonoff-usb CC1352P2_CC2652P_launchpad_coordinator_20211217.hex

See if that works?

@justin4480
Copy link

Experiencing the same issue.. I've tried on two different linux computers and even tried using a python virtual environment.

It's odd as if I start a python environment from the command line I can manually import serial.

@justin4480
Copy link

justin4480 commented Oct 25, 2023

Actually found the issue...

I started with:

pip install pyserial intelhex python-magic

Successfully installed...

python cc2538-bsl.py -p /dev/ttyUSB0 -evw --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20230507.hex

[Errno 13] Permission denied: '/dev/ttyUSB0'

So I added sudo to get permission to /dev/ttyUSB0:

sudo python cc2538-bsl.py -p /dev/ttyUSB0 -evw --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20230507.hex

cc2538-bsl.py requires the Python serial library...

This issue as I understand it is that running sudo python filename.py is not using the same python environment as running python filename.py and the pip install commands were installing to the latter.

I resolved by pip installing as root, i.e.

sudo pip install pyserial intelhex python-magic

Successfully installed...

python cc2538-bsl.py -p /dev/ttyUSB0 -evw --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20230507.hex

... Verified

Although, I don't believe it good practice to pip install as root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants