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