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

Incorrect frequencies in BAND definition #14

Open
egzumer opened this issue Aug 6, 2023 · 2 comments
Open

Incorrect frequencies in BAND definition #14

egzumer opened this issue Aug 6, 2023 · 2 comments

Comments

@egzumer
Copy link

egzumer commented Aug 6, 2023

Bands are defined as:

BANDS = { 0: [50.0, 76.0], 1: [108.0, 135.9999], 2: [136.0, 199.9990], 3: [200.0, 299.9999], 4: [350.0, 399.9999], 5: [400.0, 469.9999], 6: [470.0, 600.0] }

According to this:
https://github.com/amnemonic/Quansheng_UV-K5_Firmware/blob/main/uvmod_kitchen/mod_custom_freq_ranges.py

it should be:
BANDS = { 0: [50.0, 76.0], 1: [108.0, 135.9999], 2: [136.0, 173.9990], 3: [174.0, 349.9999], 4: [350.0, 399.9999], 5: [400.0, 469.9999], 6: [470.0, 600.0] }

Also there is definition BANDS_NOLIMITS but _find_band returns hardcoded 1 for frequencies <50MHz (it should return 0 according to BANDS_NOLIMITS).

If band number and frequency doesn't match the radio band plan, the frequency on the radio is replaced with the closest value from the given band.
For example: when I add in chirp a channel with frequency of 27.180MHz, the driver assigns band 1. If I then send it to the radio and switch to that channel, the radio tunes itself to 108MHz.

The hardcoded band number of 1 for <50MHz doesn't make any sense it should be deleted.

@sq5bpf
Copy link
Owner

sq5bpf commented Aug 16, 2023

Thanks, i got the ranges by reading them from the radio, however i might have made a mistake there. Will check.

Regarding setting band 1 for frequencies < 50MHz, this is required for the early modified firmwares, where the modification was just to make band 1 (which is originally airband) 18-1300MHz.

@egzumer
Copy link
Author

egzumer commented Sep 5, 2023

I was wrong about the frequencies, I checked it on radio and it is correct, however something is wrong as the mod checks for those alternative frequencies in the original firmware for some reason before applying new values.

Which mod is for <50 in band 1? In this driver 50-76 is still in band 0. This makes it impossible to configure the band table on a radio to match that, so both 18-50 and 50-76 would work.

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

2 participants