New Model #2435

Wouxun KG-UV899

Added by Gary Tourville over 2 years ago. Updated almost 2 years ago.

Status:New Start date:03/16/2015
Priority:High Due date:
Assignee:- % Done:

0%

Category:-
Target version:0.4.1
Chirp Version:0.4.0 Equipment Loan Offered:Yes

Description

Just purchased this unit a few weeks ago and was hoping CHIRP would work, but alas it did not. Manufacturers software doesn't even support this radio as of yet. Help!

Monitoring Session read from radio.spm - log form com port while reading from the radio (60.1 kB) Piotr Stec, 01/09/2016 06:31 am

Monitoring Session write to radio.spm - log form com port while writing to the radio (155.3 kB) Piotr Stec, 01/09/2016 06:31 am

read 2 text.txt (165.6 kB) Piotr Stec, 01/10/2016 10:11 am

History

Updated by Tim Bonine over 2 years ago

Any update on this? I have a UV-899 on order.

Updated by Piotr Stec almost 2 years ago

Is there any way I can help you to support this radio?

Updated by Piotr Stec almost 2 years ago

I attach 2 log files from serial port monitor - while reading from device and while writing to it via Wouxun original software. I wish it could be helpful somehow. If there's anything else I can do, just tell me.

Updated by Piotr Stec almost 2 years ago

I add another log of reading from this device. It seems like I should send IiNHRGc” to identify device and then data is sent in packets of length 68. I was working on existing files wouxun.py and wouxun_common.py. I don't understand do_download function from the second one. Especially line cmd = struct.pack(">cHb", "R", i, blocksize) what is that for? I always get exception in this function beacause required data length does not match real length.

Updated by Pavel Milanes almost 2 years ago

Hi Piotr,

struct is a python class to interpret strings as packed binary data with a predefined format.

You can have a peek in the python docs here [[https://docs.python.org/2/library/struct]]

cmd = struct.pack(">cHb", "R", i, blocksize)

This is packing the data with Big Endian coding(>), "R" as char (1 byte long), i as a unsigned short (two bytes long) and blocksize as signed char (1 byte long)

For example:

i = 256
blocksize = 64
cmd = struct.pack(">cHb", "R", i, blocksize)

Then cmd will have "\x52\x01\x00\x40"

the reverse function is easy also:

CMD, i, blocksize = struct.unpack(">cHb", cmd)

Cheers

Updated by Piotr Stec almost 2 years ago

Thank you for your answer, but i still do not know what does >cHb mean. I see now that '>' means Big Endian coding, but what does the other part mean? cHb?

Updated by Pavel Milanes almost 2 years ago

Piotr Stec wrote:

Thank you for your answer, but i still do not know what does >cHb mean. I see now that '>' means Big Endian coding, but what does the other part mean? cHb?

In simple terms: it's a handy function to pack/unpack data into a binary form, many radios have a predefined structure on the headers it's send/receive; with this function/procedure you make shorter code to pack/unpack data. As simple as that.

"<cHb" it's just the format the data has to be encoded/decoded, it's like a template to render the binary data you pass as variables, in the last post I put a translation for each term.

Also available in: Atom PDF