[chirp_devel] Help with New Radio Support
I am looking at a new Anytone radio. After capturing the serial port during a download from the radio using the Anytone software, my feeling is that it is very similar to the protocol used by the AT-5888UV that CHIRP already supports.
The problem I am having is that CHIRP is not seeing the data returned from the radio for some reason.
_echo_write(radio, "PROGRAM") response = radio.pipe.read(3) if response != "QX\x06": print "Response was:\n%s" % util.hexprint(response) raise errors.RadioError("Unsupported model")
For example, the above code sends "PROGRAM" to the radio to initiate cloning, but then aborts with an "Unsupported model" error. The printing of "response" show that it is "nul", but my port monitor clearly show that "QX\x06" was returned.
Anybody have any advice for me to solve this?
Thanks, Jim KC9HI
_echo_write(radio, "PROGRAM") response = radio.pipe.read(3) if response != "QX\x06": print "Response was:\n%s" % util.hexprint(response) raise errors.RadioError("Unsupported model")
For example, the above code sends "PROGRAM" to the radio to initiate cloning, but then aborts with an "Unsupported model" error. The printing of "response" show that it is "nul", but my port monitor clearly show that "QX\x06" was returned.
Without looking, I think _echo_write() writes something to the device, and then, expecting a complete echo, reads and discards the same number of characters so that the caller doesn't see the echo. Maybe this new radio/cable doesn't echo and your response is getting eaten and discarded?
--Dan
On Thu, Feb 26, 2015 at 6:59 PM, Dan Smith dsmith@danplanet.com wrote:
_echo_write(radio, "PROGRAM") response = radio.pipe.read(3) if response != "QX\x06": print "Response was:\n%s" % util.hexprint(response) raise errors.RadioError("Unsupported model")
For example, the above code sends "PROGRAM" to the radio to initiate cloning, but then aborts with an "Unsupported model" error. The printing of "response" show that it is "nul", but my port monitor clearly show that "QX\x06" was returned.
Without looking, I think _echo_write() writes something to the device, and then, expecting a complete echo, reads and discards the same number of characters so that the caller doesn't see the echo. Maybe this new radio/cable doesn't echo and your response is getting eaten and discarded?
--Dan
Thanks. I think I follow what you are saying. That makes sense because when it gets to downloading the "chunks" it CHIRP there are fewer characters than expected (they to got eaten and discarded.
Jim
On Thu, Feb 26, 2015 at 6:59 PM, Dan Smith dsmith@danplanet.com wrote:
_echo_write(radio, "PROGRAM") response = radio.pipe.read(3) if response != "QX\x06": print "Response was:\n%s" % util.hexprint(response) raise errors.RadioError("Unsupported model")
For example, the above code sends "PROGRAM" to the radio to initiate cloning, but then aborts with an "Unsupported model" error. The printing of "response" show that it is "nul", but my port monitor clearly show that "QX\x06" was returned.
Without looking, I think _echo_write() writes something to the device, and then, expecting a complete echo, reads and discards the same number of characters so that the caller doesn't see the echo. Maybe this new radio/cable doesn't echo and your response is getting eaten and discarded?
--Dan
Yep. That was it. Thanks again Dan.
Jim
participants (2)
-
Dan Smith
-
Jim Unroe