Bug #3987

UV-82HP (An error has occurred, Unexpected response from radio)

Added by John Sparks about 1 year ago. Updated about 1 year ago.

Status:In Progress Start date:09/04/2016
Priority:High Due date:
Assignee:Jim Unroe % Done:

100%

Category:-
Target version:0.5.0
Chirp Version:daily Platform:All
Model affected:Baofeng UV-82HP

Description

Ok, I was able to download and then upload the first time, then when I went and tried to download a second time and I recived (An error has occurred, Unexpected response from radio). I noticed that everytime I tried to upload/download the green led would lightup solid until I get the error on chirp then after that the screen on the radio acts like it just powered on. I have the current FTDI cable from baofengtech.com and have tried the prolific driver /s , also tried daily and community builds of chirp. Ive tied switching from usb 3.0 to 2.0 and back again. Im on Win 10 also and tried just about everything I could think of, that and found nothing about this subject anywhere online. Ive attached the debug log to this post. Thanks and any help would be great.

debug.log (19 kB) John Sparks, 09/04/2016 07:44 pm

uv5r(3987).py (56.8 kB) Jim Unroe, 09/19/2016 02:28 am

debug.log (21.3 kB) Reed Swasey, 09/23/2016 07:20 am

debug.log (33.3 kB) Reed Swasey, 09/23/2016 12:14 pm

uv5r.py - UV-5R driver with corrected variable assignment (56.9 kB) Jim Unroe, 09/23/2016 02:47 pm


Related issues

related to Bug #4055: Error Message "Failed to communicate with radio: local va... Feedback 09/23/2016

Associated revisions

Revision 2776:1f9ff67ec2cd
Added by Jim Unroe about 1 year ago

[UV-5R] UV-82HP (An error has occurred, Unexpected response from radio)

The "ident" returned by the radios supported by the uv5r.py driver used to be
static. The "ident" of the UV-82HP radio (and possibly other recent Baofeng
radios) now changes based on the band limit settings. When setting a band limit
to "1" or and value ending in "01" (101, 201, 301, etc.), the value ends up in
the "ident" and is stripped by the code that was added to support the UV-6 with
the longer 12 byte "ident".

This patch uses a different strategy to support the UV-6 with longer "ident"
restoring the use of any selectable band limit value.

Bug #3987

Revision 2780:de4b21e1515d
Added by Jim Unroe about 1 year ago

[UV-5R] UV-82HP (local variable 'response' referenced before assignment)

Some how after my testing I reverted one of my changes. This patch
corrects that mistake.

Bug #3987

History

Updated by Samuel Poissant about 1 year ago

I have exactly the same problem, and I have something weird my radio was at repair in Baofeng tech and when I have received the radio it wouldn't talk any more to Chirp chirp-daily-20160906 and chirp-daily-20160816 and I have the same reaction, Radio refused to send block 0x1ec0.

Thanks Best regards.
Samuel Poissant

Updated by Jim Unroe about 1 year ago

  • Status changed from New to Feedback

John,

Your radio is responding with an invalid/corrupt reply.

aa 79 00 03 06 50 dd 00

It should look something like this

aa 30 79 04 00 05 20 dd

The "aa" is the beginning of the reply
The "30" is the lower VHF band limit ([1}30 MHz)
The "79" is the upper VHF band limit ([1}79 MHz)
The "04 00" is the lower UHF band limit (400 MHz)
The "05 20" is the upper UHF band limit (520 MHz)
The "dd" is the end of the reply

Since the "dd" is not where it belongs (the 8th byte), CHIRP doesn't recognize your radio as being a valid Baofeng radio.

What I would suggest for right now would be to download the OEM VIP software to see if you can reset the band limits to the radio in the hope that it will coax the radio into returning a valid reply. The software is available here

Basically you would access the OEM software's "Other" menu, read the radio, set the band limits to as wide as the software will allow, write the new band limits back to the the radio, then try it with CHIRP again.

If this doesn't work, I will try to come up with something else.

Jim KC9HI

Updated by Jim Unroe about 1 year ago

Samuel,

Your issue is not the same. Does your programming cable have a Prolific type chip? If yes, you probably have to downgrade the device driver to an older version (v3.2.0.0) as described on the Miklor website.

Jim KC9HI

Updated by Jim Unroe about 1 year ago

  • File uv5r(3987).py added
  • Status changed from Feedback to In Progress
  • Assignee set to Jim Unroe
  • Target version set to 0.5.0
  • Platform changed from Windows to All

I finally have an understanding of what is going on here. Using one of the following band limits can cause and issue: 1, 101, 201, 301, ..., 901. Use the attached test driver to adjust the radio as a temporary fix.

1. save the attached "uv5r(3987).py" file to where you store your CHIRP Radio Images (*.img) files
2. load CHIRP
3. click "Help"
4. enable "Enable Developer Functions"
5. click "File"
6. click "Load Module"
7. locate and load the file saved in step 1

Now try to read from your radio. It should be successful. Immediately edit the band limits so that none of the ones listed above are used. After editing the band limits, upload back to the radio. Now you should be able to disable "Enable Developer Functions" then close and reopen CHIRP. You should now be able to download and upload from the radio normally.

I will try to spin up a patch that restores the ability to use the currently "must be avoided" band limits.

Jim KC9HI

Updated by Jim Unroe about 1 year ago

  • % Done changed from 0 to 100

A patch was submitted and accepted. The next CHIRP daily build should resolve this issue.

Jim KC9HI

Updated by Reed Swasey about 1 year ago

Have a BF-F9V2+ (uv-82hp variant). Using latest daily. Get the following error "Failed to communicate with radio: local variable 'response' referenced before assignment" have tried enabling developer functions and loading the uv5r(3987).py file but i get a invalid syntax line 1 error. Debug.log attaached.

Updated by Jim Unroe about 1 year ago

Reed,

I will take a look at this after work. I believe you will find that if you open uv5r(3987).py in a text editor it will be an html document. You cannot right-click the link and choose "Save link as". You have to left-click the link and, on the page that opens, choose "download".

Jim KC9HI

Updated by Reed Swasey about 1 year ago

Jim

Following your instructions i was able to download a working uv5r(3987).py and load into chirp. Am no able to read and write to the radio.

Reed
AD7ZW

Updated by Juan C about 1 year ago

Jim,

Thanks for putting the patch together. I can confirm that the patch resolved the issue and allowed me to read/write to a UV-82HP radio without issue.

Thanks!

Updated by Jim Unroe about 1 year ago

Thanks Juan.

Reed,

Get me a debug log using the uv5r(3987).py test driver.

Jim

Updated by Reed Swasey about 1 year ago

Jim

Per your request here is the debug.log. Read my earlier reply it should say i am now able to read and write the radio. Need to learn to proof read my replies.

Reed
AD7ZW

Updated by Jim Unroe about 1 year ago

Somehow I reverted one of my changes. I will submit a patch soon.

Jim KC9HI

Updated by Jim Unroe about 1 year ago

I don't know what happened because I tested it with at least 3 different radios. Oh, well. Anyway, a patch to correct the problem has been submitted.

I have attached the corrected driver if you want to manually load and use it until the daily build comes out.

Jim KC9HI

Also available in: Atom PDF