Bug #10787
closedRetevis RB15/RB615 use all 99 Memory Slots and use 400 to 480 mhz / Update retevis_rb15.py
100%
Description
Retevis RB15/RB615 does have 99 Memory Slots. The Driver limits CHIRP to read/write only 16 and 21 Memory Slots. The official Retevis programming tool allows to Program 99 Slots on both models.
I can confirm that the Radios transmit and receive on channel 99. As well as they do on 400 to 480 mhz.
The bandwith restriction is only in the Retevis PC software, that doesn't allow anything outside PMR(RB615) respectively FRS(RB15) to be copied to the radios memory. The radio itself is works with programmed channels between 400 and 480 mhz on high an low settings. There is a workaround to deactivate the limitation in the retevis software, so they can be programmed freely. But the software itself is a pain in the ass, so it would be a huge plus to use CHIRP for programming.
See pictures: Transmitting/receiving on Channels 98 and 99 on 400 and 480 mhz. On the Quasheng on the right you can see the receiving frequency.
Files
Updated by Jim Unroe over 1 year ago
- Status changed from New to In Progress
- Assignee set to Jim Unroe
- Target version set to chirp-py3
Updated by Jim Unroe over 1 year ago
I have the driver updated and passing all tests. It has been attached to this issue so you can give it a quick test before I submit it. If you have not loaded a test driver module using CHIRP-next before, this page explains how it is done: LoadingTestModules
Updated by M B over 1 year ago
- File chirp_debug-xnmsqgnu.txt chirp_debug-xnmsqgnu.txt added
- File Screenshot 2023-08-15 at 02.24.10.png Screenshot 2023-08-15 at 02.24.10.png added
- File Retevis_RB15_20230815.img Retevis_RB15_20230815.img added
I tried it. It does actually download all memory slots. So yeah!
But the editing is kinda broken.
I can copy a whole line and then edit the frequency, but if i try to make a new entry on a new line (or copy in a standard configuration such as pmr channels) it throws an error (list index out of range).
It was the same thing with the old driver, so I dont think it is your changes that are responsible for that.
Log, img and screenshots attatched.
FYI. I copied the line 89 to 92, that worked. And then tried to create a line from scratch by setting a frequency in lines 93 to 95.
No clue what the problem is here.
I can do further testing tomorrow, its 02:30 am here now.
Updated by M B over 1 year ago
You can actually reproduce the issue yourself if you open the attached .img file and try to edit it in the way described.
Updated by Jim Unroe over 1 year ago
M B wrote in #note-4:
You can actually reproduce the issue yourself if you open the attached .img file and try to edit it in the way described.
Perfect. If I can solve it quickly, I will submit it tonight. If I can't, we can work on it tomorrow. Thanks.
Updated by Jim Unroe over 1 year ago
Found the problem. Just made a pull request.
Updated by M B over 1 year ago
- File retevis_rb15_full_band_3.py retevis_rb15_full_band_3.py added
- File Retevis_RB15_20230815.img Retevis_RB15_20230815.img added
- File Screenshot 2023-08-15 at 08.57.19.png Screenshot 2023-08-15 at 08.57.19.png added
- File Screenshot 2023-08-15 at 08.57.36.png Screenshot 2023-08-15 at 08.57.36.png added
Thank you so much!
I tested it, the editing works now.
Two last things:
The programmable frequency range with the new driver is now 400 to 519 mhz. But every value above 480 channel does not show up in the radio. Did you set it to 400-519mhz instead of 400-480mhz on purpose?
I changed the "VALID_BANDS" value in line 308 to "VALID_BANDS = [(400000000, 480000001)]" reloaded the module an now everything works fine.
Second, the value for empty slots differs from the stock one.
See img and files attatched, channels 17 to 20 have been programmed empty with retevis software. Channel 90 to 99 have been programmed with chirp and then deleted with chirp and reuploaded. They still show up in the radio and when selected the radio flashes green and red.
I guess that has something to do with that:
# if empty memory
if mem.empty:
_mem.set_raw("\xFF" * 8 + "\x00" * 5 + "\xFF" * 3)
return
in lines 538 - 541
I changed it to
# if empty memory
if mem.empty:
_mem.set_raw("\xFF" * 8 + "\xFF" * 5 + "\xFF" * 3)
return
and now it works.
Do you commit those changes as well?
Updated module is attached btw.
Updated by M B over 1 year ago
M B wrote in #note-7:
Second, the value for empty slots differs from the stock one.
See img and files attatched, channels 17 to 20 have been programmed empty with retevis software. Channel 90 to 99 have been programmed with chirp and then deleted with chirp and reuploaded. They still show up in the radio and when selected the radio flashes green and red.
Wrong img in the post above sorry, this one is the one I mean.
Updated by Jim Unroe over 1 year ago
M B wrote in #note-7:
Two last things:
The programmable frequency range with the new driver is now 400 to 519 mhz. But every value above 480 channel does not show up in the radio. Did you set it to 400-519mhz instead of 400-480mhz on purpose?
This is the why it has always been. Since the channels were restricted to 462 MHz (FRS) and 446 MHz (PMR), the issue was never discovered.
Second, the value for empty slots differs from the stock one.
See img and files attatched, channels 17 to 20 have been programmed empty with retevis software. Channel 90 to 99 have been programmed with chirp and then deleted with chirp and reuploaded. They still show up in the radio and when selected the radio flashes green and red.I guess that has something to do with that:
# if empty memory
if mem.empty:
_mem.set_raw("\xFF" * 8 + "\x00" * 5 + "\xFF" * 3)
return
in lines 538 - 541I changed it to
# if empty memory
if mem.empty:
_mem.set_raw("\xFF" * 8 + "\xFF" * 5 + "\xFF" * 3)
return
and now it works.
I didn't think that this looked right last night and almost changed it. Then I thought that is has been that way for a year with no complaints, maybe I better leave it along. But again, since the 22 (FRS) and 16 (PMR) channels were fixed and could not be (easily) deleted, the bug was never experienced.
I am working on getting the changes committed. Thank you for the testing. I haven't located my RB15/RB615 radios yet.
Updated by M B over 1 year ago
Nice! Thank you.
I loaded the new module once more from your githup repo and tested it and it seems to work. It just needs to get merged now.
Updated by Jim Unroe over 1 year ago
M B wrote in #note-10:
Nice! Thank you.
I loaded the new module once more from your githup repo and tested it and it seems to work. It just needs to get merged now.
Thank you for the great testing. The clear explanations and photos were very helpful. I didn't attach a "_4.py" since it would have been basically the same as the "_3.py" that you attached.
I did finally find my RB15 and RB615 radios and their programming cable. That allowed me to fully understand what you were describing about frequencies above 480 MHz.
Jim KC9HI
Updated by M B over 1 year ago
- File Screenshot 2023-08-15 at 19.35.32.png Screenshot 2023-08-15 at 19.35.32.png added
- File Screenshot 2023-08-15 at 19.35.24.png Screenshot 2023-08-15 at 19.35.24.png added
- File channelvalues_Retevis_RB15_20230815.img channelvalues_Retevis_RB15_20230815.img added
Ah maybe I called it too early. Can you program new channels from scratch, as in picking a empty slot setting frequency and other values and uploading it. Since I cant, i guess i overlooked that.
Turns out the Retevis Software programmed Channels and the Chirp programmed Channels differ in the Values "unknown1" and "unknown2". Chirp puts a 1 there, it should be a 0 though.
See Images and img file. The channel 89 was programmed with retevis, the channel 90 with chirp. In the Chirp Spreadsheet they show the exact same values.
Updated by M B over 1 year ago
I can up and download the channels from the memory, but the radio doesnt show them.
Updated by Jim Unroe over 1 year ago
M B wrote in #note-13:
I can up and download the channels from the memory, but the radio doesnt show them.
I see what the problem is. I'm on it.
Updated by M B over 1 year ago
While you are at it. Can you set the default value for "encode:1, // Encode" to "0" as well? It doesnt make any difference whether encryption is set or not since the radio doesnt support it.
But it may be confusing for other users to have it activated by default on every newly setup channel.
Updated by M B over 1 year ago
M B wrote in #note-15:
While you are at it. Can you set the default value for "encode:1, // Encode" to "0" as well? It doesnt make any difference whether encryption is set or not since the radio doesnt support it.
But it may be confusing for other users to have it activated by default on every newly setup channel.
Nevermind. Doesnt work that easy. When changing the value to 0 it gives a syntax error when reading memory.
Updated by Jim Unroe over 1 year ago
M B wrote in #note-13:
I can up and download the channels from the memory, but the radio doesnt show them.
An 'unknown' bit in the memory structure is now known. It indicated if a memory us used (0x00) or not used (0x00). Previously when a memor was deleted all but 3 of the bytes were being set to 0x00 so this bit was 0x00 and all was good. Now when a memory is deleted all bytes are set to 0xFF so all bits are set to 0x01 effectively turning off any newly programmed channels.
There was nothing in set_memory() to set this bit to 0x00 when the memory was programmed so newly programmed channels would remain turned off.
Give this a try before I commit it.
Updated by M B over 1 year ago
I can create new channels now.
But the "unknown1" is still 1 in chirp vs 0 in official retevis software. I have no clue what it does but wouldnt it be best to just go along with the official software just to avoid any possible bugs?
Updated by M B over 1 year ago
And just for my understanding: To set unkonwn1 and encode both to 0 by default I would just add
_mem.unknown1 = False
_mem.encode = False
In the " set_memory() " section?
Does Order matter here?
Updated by M B over 1 year ago
- File retevis_rb15_full_band_5.py retevis_rb15_full_band_5.py added
- File Screenshot 2023-08-15 at 20.51.12.png Screenshot 2023-08-15 at 20.51.12.png added
- File Screenshot 2023-08-15 at 20.51.21.png Screenshot 2023-08-15 at 20.51.21.png added
M B wrote in #note-19:
And just for my understanding: To set unkonwn1 and encode both to 0 by default I would just add
_mem.unknown1 = False _mem.encode = False
In the " set_memory() " section?
Does Order matter here?
Yes it does.
Now the values are the exact same as with the retevis software.
Updated by M B over 1 year ago
Yes it does as in one would just add the values not as in order does matter.
Updated by Jim Unroe over 1 year ago
M B wrote in #note-19:
And just for my understanding: To set unkonwn1 and encode both to 0 by default I would just add
_mem.unknown1 = False _mem.encode = False
In the " set_memory() " section?
Does Order matter here?
Well it would depend on what you are trying to do.
False = 0 and True = 1 so you could also use _mem.encode = 0
What are you trying to accomplish? When I create a new channel, Encode defaults to Disabled.
And if you force Encode = 0 in set_memory(), then you basically disabled the Encode setting. Setting Encode to Enabled would never work.
I can do this with mem.isused because there is no setting exposed to the user. It just needs to be set to 0 for every programmed channel. But if someone wanted to, there could be a setting added so you could program 99 channels and turn them off individually without deleting them and then be able to turn them back on again later. Kind of like skipping a channel when scanning.
Updated by M B over 1 year ago
You are right. Encode is off by default. I clould swear the default setting for encode with the initial driver was activated. But maybe it was just something odd on my side.
Ah ok. Now I understand what that section does. Thanks.
So what about the unkonw1?
Set the "_mem.unknown1 = False" to be parallel with official software or leave it as it is?
I tested it, it works with "_mem.unknown1 = False" and produces then the exact same memory blocks as the retevis software.
Updated by Jim Unroe over 1 year ago
What are you trying to do? There is probably a better way to do it. Which factory software are you using?
Updated by M B over 1 year ago
- File VirtualBox_Windows XP_14_08_2023_22_44_14.png VirtualBox_Windows XP_14_08_2023_22_44_14.png added
I just thought since we dont know what it does it would be best to have the unknown1 set to 0 as it is the same value as the official software sets it to. Just in case.
But what works works on the other hand. If youre saying its unescessary then it probably is. You for sure know better than I do.
Regarding the software. See image attatched. It was the one that could be downloaded from the website when the radios first entered market. But it seems it is not available anymore.
Updated by Jim Unroe over 1 year ago
M B wrote in #note-25:
I just thought since we dont know what it does it would be best to have the unknown1 set to 0 as it is the same value as the official software sets it to. Just in case.
OK. I am on the same wavelength now. That makes sense.
I have included it. I am ready to commit once you give the OK.
Updated by M B over 1 year ago
You can download the software here if you want. Link is valid for 7 days.
This software is locked to pmr/frs frequencies.
https://nextcloud.mxbchr.duckdns.org/index.php/s/WE8LfXiwPAnmy5W
Updated by M B over 1 year ago
Copy channels, create from scratch, 400 to 479 mhz works now. Radio shows all those channels an tx/rx on them.
Memory blocks are exactly the same as when programmed with tool mentioned above.
Anything else you want me to check?
Updated by Jim Unroe over 1 year ago
M B wrote in #note-27:
You can download the software here if you want. Link is valid for 7 days.
This software is locked to pmr/frs frequencies.https://nextcloud.mxbchr.duckdns.org/index.php/s/WE8LfXiwPAnmy5W
Got it. Thanks
Updated by Jim Unroe over 1 year ago
M B wrote in #note-28:
Copy channels, create from scratch, 400 to 479 mhz works now. Radio shows all those channels an tx/rx on them.
Memory blocks are exactly the same as when programmed with tool mentioned above.
Anything else you want me to check?
I think we have it. Unless you disagree, I will commit what we have now. If something else is discovered, we can open a new ticket to cover it separately.
Updated by Jim Unroe over 1 year ago
The latest changes have been force-pushed. All tests passed. Just need to patiently wait for it to be merged.
Updated by M B over 1 year ago
- File dtcs_Retevis_RB15_20230815.img dtcs_Retevis_RB15_20230815.img added
- File Screenshot 2023-08-15 at 22.02.16.png Screenshot 2023-08-15 at 22.02.16.png added
- File Screenshot 2023-08-15 at 22.02.50.png Screenshot 2023-08-15 at 22.02.50.png added
- File Screenshot 2023-08-15 at 22.02.38.png Screenshot 2023-08-15 at 22.02.38.png added
I think you can commit.
And actually I did discover something else while cross checking with the quansheng.
When no dtcs is chosen CHIRP sets the values "decQT" and "encQT" to "0000". When this is uploaded to the Radio the Radio has selected Ct05 as CTS? Tone. I did not notice because it was the same both rb615 so they could still hear each other. But the rb615 couldnt hear the quansheng withiot any tones set on the same channel.
When I deactivate the CTS/DTCS Tones in the RB615 on a Channel and re-download the memory into chirp then the "decQT" and "encQT" values turn out to be "C000".
This equals no user selectable setting in CHIRP. So its actually impossible to create new channels without CTS/DTCS.
Images and img attached.
98 is chirp default new channel setting, 99 is after deselecting CTS/DTCS on the radio an re-downloading memory.
But although thats a real issue, thats far away from the original topic. So I guess I open a new one?
Updated by Anonymous over 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Applied in changeset github|6e7f8d425fd4511f3d3f60273f8203dab33c5a9a.