-
Notifications
You must be signed in to change notification settings - Fork 432
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
feat: Add liveSpectrumScan #1408
base: master
Are you sure you want to change the base?
Conversation
Thank you for the contribution! This looks very cool, however, when I was trying to run the script with an ESP32 + SX1262, I ran into a problem. When opening the COM port, the ESP32 dumps a bunch of stuff into it, either at a baudrate other than 115200 or just something altogether garbled. However, the script tries to decode that as UTF-8 and fails:
I'm guessing this is not a problem with the hardware you are using, however, it would be nice for this to be a bit more resilient ;) |
Hi @jgromes I’ve added warnings and an error message—if you have any other suggestions for improvement, I’d be happy to implement them. For now, I believe this will help in cases where it's necessary to wait for the correct data, such as with the ESP32, which sends its bootloader configuration at startup. Best regards, and I’ll be on the lookout for any further feedback! |
That was not the issue, the baudrate was consistently set to 115200. The problem is that at the start, the ESP32 just dumps a bunch of data at a different baudrate, or it just toggles some pins that cause bunch of noise to appear in the terminal. Either way, it cannot be decoded. I still cannot get this to work as-is, I only get UTF decode errors. The baudrate is the same on both sides and my original scanning script works. So I started looking around the script a bit more and found some more issues:
The only way I was able to kind of get this to work is by opening the Serial port directly in the receive task by calling Also, should this be run together with SX126x_Spectrum_Scan or SX126x_Spectrum_Scan_Frequency? The helptext says "SX126x_Spectrum_Scan", but doing that, I only get output as shown below, which doesn't seem correct. |
@JahazielLem is there any update on this? I don't think the latest change addresses my main problem, which is that the new scan version doesn't really seem to be working, at least when testing on Windows. Thanks! EDIT: If this is still a work-in-progress, that's fine but I'd rather mark this PR as draft until it is ready. |
Hi @jgromes I'm working on this I found a ESP based board with radio for testing, so I'm working in a dev branch, meanwhile we can put it in draft. Regards/ |
Hi!
First of all, thank you for this great library—it's been incredibly useful. While working with the SX126, I needed a more real-time approach for spectrum scanning, so I developed this script and modified it to align with the format of the original example.
This script introduces a software-defined frequency range. If the firmware is configured to scan, for example, from 860 MHz to 920 MHz, you can use this script to focus on a narrower range, such as 900 MHz to 920 MHz. However, note that since the full range is still being captured, you may need to wait for the desired frequencies to be scanned.
I also have a modified version of the firmware that supports real-time frequency changes via commands, making the scanning process much more efficient and works very well with this script.
I hope this script proves useful to others as well. Looking forward to your feedback!
Best regards.