[chirp_devel] Need help with "def _send_block(radio, addr, data):"
Hi all,
I am working on a radio driver that is giving me issues with uploading. I have the Ident working OK and I can download OK (not perfect but I can get a image). Using PortMon I captured the upload to the radio using the OEM software. What I see is after the first "chunk" is sent, the radio acks with "\x05" and then a little later acks with "\x06". Every "chunk" after that, only the "\x06" is sent.
I thought the following would take care of it, but it doesn't.
def _send_block(radio, addr, data): msg = struct.pack(">BHB", ord("X"), addr, len(data)) radio.pipe.write("\x06") radio.pipe.write(msg + data) time.sleep(0.05)
ack = radio.pipe.read(1) print util.hexprint(ack1) if ack == "\x05": print "am i working?" time.sleep(0.5) ack = radio.pipe.read(1) print util.hexprint(ack) if ack != "\x06": raise errors.RadioError("Radio refused to accept block 0x%04x" % addr)
The first "ack =" captures the "\x05" just fine The first "print" prints the captured ack The "am i working?" gets printed Apparently the second "ack =" does nothing because the second "print" doesn't print anything
I'm stumped. Any ideas?
I've attached a shortened version of the captured upload (it was over 10 meg so I removed most of the middle).
Thanks, Jim KC9HI
On Wed, Dec 30, 2015 at 10:12 PM, Jim Unroe rock.unroe@gmail.com wrote:
Hi all,
I am working on a radio driver that is giving me issues with uploading. I have the Ident working OK and I can download OK (not perfect but I can get a image). Using PortMon I captured the upload to the radio using the OEM software. What I see is after the first "chunk" is sent, the radio acks with "\x05" and then a little later acks with "\x06". Every "chunk" after that, only the "\x06" is sent.
I thought the following would take care of it, but it doesn't.
def _send_block(radio, addr, data): msg = struct.pack(">BHB", ord("X"), addr, len(data)) radio.pipe.write("\x06") radio.pipe.write(msg + data) time.sleep(0.05)
ack = radio.pipe.read(1) print util.hexprint(ack1) if ack == "\x05": print "am i working?" time.sleep(0.5) ack = radio.pipe.read(1) print util.hexprint(ack) if ack != "\x06": raise errors.RadioError("Radio refused to accept block 0x%04x" % addr)
The first "ack =" captures the "\x05" just fine The first "print" prints the captured ack The "am i working?" gets printed Apparently the second "ack =" does nothing because the second "print" doesn't print anything
I'm stumped. Any ideas?
I've attached a shortened version of the captured upload (it was over 10 meg so I removed most of the middle).
Thanks, Jim KC9HI
Anyone?
Hi Jim,
Where is the capture segment you mention?
Can you zip it and send it to this email to get a peek on it?
Less that 250 Kb please, believe it or not I'm on a 2m packet link at 9600 baud.
And what radio are we talking about?
I have learned a trick or two doing the commercial kenwood radios driver.
73
El 04/01/16 a las 18:30, Jim Unroe via chirp_devel escribió:
On Wed, Dec 30, 2015 at 10:12 PM, Jim Unroe rock.unroe@gmail.com wrote:
Hi all,
I am working on a radio driver that is giving me issues with uploading. I have the Ident working OK and I can download OK (not perfect but I can get a image). Using PortMon I captured the upload to the radio using the OEM software. What I see is after the first "chunk" is sent, the radio acks with "\x05" and then a little later acks with "\x06". Every "chunk" after that, only the "\x06" is sent.
I thought the following would take care of it, but it doesn't.
def _send_block(radio, addr, data): msg = struct.pack(">BHB", ord("X"), addr, len(data)) radio.pipe.write("\x06") radio.pipe.write(msg + data) time.sleep(0.05)
ack = radio.pipe.read(1) print util.hexprint(ack1) if ack == "\x05": print "am i working?" time.sleep(0.5) ack = radio.pipe.read(1) print util.hexprint(ack) if ack != "\x06": raise errors.RadioError("Radio refused to accept block 0x%04x" % addr)
The first "ack =" captures the "\x05" just fine The first "print" prints the captured ack The "am i working?" gets printed Apparently the second "ack =" does nothing because the second "print" doesn't print anything
I'm stumped. Any ideas?
I've attached a shortened version of the captured upload (it was over 10 meg so I removed most of the middle).
Thanks, Jim KC9HI
Anyone? _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
It is attached to my original post. I'll grab it and zip it and send it to you.
Thanks, Jim KC9HI
On Tue, Jan 5, 2016 at 11:02 AM, M.Sc. Pavel Milanes Costa via chirp_devel chirp_devel@intrepid.danplanet.com wrote:
Hi Jim,
Where is the capture segment you mention?
Can you zip it and send it to this email to get a peek on it?
Less that 250 Kb please, believe it or not I'm on a 2m packet link at 9600 baud.
And what radio are we talking about?
I have learned a trick or two doing the commercial kenwood radios driver.
73
participants (2)
-
Jim Unroe
-
M.Sc. Pavel Milanes Costa