On 4-1-2014 17:17, Dan Smith wrote:
This works. I see it enabled in the debug.log also: Registered Polmar_DB-50M = PolmarDB50MRadio
Right, okay, so you should be running the code you think you are.
That's wahat I was thinking. ;)
I am just editing the .py file at the moment. I'm not a developer, but seeing how easy it was for an Intek HR-2040 owner to edit the .py file I just dived in. Attached is the .py file I eneded up with, but after only changing any accurrence of Intek to Polmar and HR-2040 to DB-50M, I do not even get the experimental warning. And if I try to read the DB-50M as an Intek HR-2040 I do get that (but also get an unsupported model just after that). But from what source? The bit of code you pasted into the issue looks like it's really old (i.e. not what is in the upstream repository). If you're using the .exe windows build, changing what is in that frozen environment may give you issues and not behave exactly the way you expect. Are you using chirp's module loader or modifying the library zip?
I found an issue about an Intek HR-2040 on the site: http://chirp.danplanet.com/issues/1125
Here it mentions editing a py file, which sounded really easy. :) So I picked the intek.py file and edited that. That file is about 4 months old, so may indeed be outdated.
This baffles me... I see the class PolmarDB50MRadio getting registered in the debug logfile, can pick the model for a read and then nothing. I expected at least the experimental warning and an error, but get some cryptic log statements instead:
Traceback (most recent call last): File "chirpui\mainapp.pyo", line 1357, in mh File "chirpui\mainapp.pyo", line 615, in do_download File "chirpui\mainapp.pyo", line 573, in _confirm_experimental File "chirpui\common.pyo", line 348, in show_warning File "chirpui\common.pyo", line 308, in _add_text TypeError: GtkTextBuffer.set_text() argument 1 must be string or read-only buffer, not None
I expect this is because you're modifying a frozen environment. This is likely stopping you before it ever tries to talk to the radio. Instead of putting your new .py file into the library, keep it out and use File->Load Module inside of chirp. This needs to be done every time you start it for testing.
That is how I load the Polmar py file. I change nothing in the Chirp environment itself.
I expect that all that needs to happen is for us to add the identifier to the existing list. So, if you would, try the following:
- Download the latest daily build
- Enable developer functions in the Help menu
- Go to File->Load Module and select the attached file
Then try to download it by choosing the Anytone model (for now) and send me the resulting debug log on the list here.
That one is easy and what I tried in the first place to get the correct model string. :)
debug.log attached. And using Portmon I already verified that the Polmar DB-50M indeed responds to the model query with "DB-50M". Portmon logs are also attached, they are created by using the official Polmar DB-50M software (which works fine, but does not have a CSV import function).