-
Notifications
You must be signed in to change notification settings - Fork 15
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
Empirical maximum SPI speed result in a EINVAL #128
Comments
Hi, thanks for the detailed description of the issue you experience! Unfortunately, I do not remember why I set As I commented "empirical", I most likely increased the number until I experienced some issue.
"max_speed_hz = 500000" seems to work fine. I will capture the transmitted signal and check whether I can find any differences (which I do not expect). |
Thanks for your quick reply! |
Great, thank you! |
Tracked by PR #129 |
released in v3.0.0: https://pypi.org/project/cc1101/3.0.0/#files |
Hello, first of all thanks for sharing this code to everyone!
I have been using it in a couple of projects during a prototyping phase, and I experienced an issue in one of my hardware settings.
Description
Using an Olimex STMP157 board and a E07-1101D transceiver, the default test command
printf '\x01\x02\x03' | cc1101-transmit -f 433920000 -r 1000
results in an OSError: [Errno 22] Invalid argument. Here the python traceback:A workaround
The standard
spidev_test
linux command shows the SPI fully working with a maximum speed set to 500 KHz.Tweaking the source and modifying the
max_speed_hz
solves the problem.In particular, change the following line:
python-cc1101/cc1101/__init__.py
Line 561 in 1cd90b3
into
Questions
Am I missing something obvious?
Where is the 55700 coming from?
Would it be possible to override
self._spi.max_speed_hz
default value during an init phase?I might be able to write a patch if it can be of any help.
The text was updated successfully, but these errors were encountered: