[chirp_devel] Patch for #7119 BF-888 "Refused to enter programming mode."

Hi,
Sorry if this becomes a duplicate message. I was at first but subscribed to the list with the correct email, and my first message didn't come through.
About the patch:
This change fixes the problem with my two radios, but i can't be sure that its the same problem that the original reporter of the bug has.
I'm a bit concerned about raising the timeout globally. I can't rule out that it has any other consequences, but at the same time i don't imagine anything depends on a particular serial read timeout. -- Nicklas Lindgren 59D8 27AD 2632 F349 9B20 F5CB D363 3177 0A12 1B95

This change fixes the problem with my two radios, but i can't be sure that its the same problem that the original reporter of the bug has.
I'm a bit concerned about raising the timeout globally. I can't rule out that it has any other consequences,
Yeah, it's not appropriate to change it globally to try to address a problem with one radio. If you look at (many) other drivers, they manipulate the timeout on the serial connection themselves as appropriate (grep '.timeout =' should turn up some examples). The initial timeout we set on the serial connection is really just to have *some* timeout to prevent drivers from blocking forever on the pipe when nothing is responding.
but at the same time i don't imagine anything depends on a particular serial read timeout.
Well, in a way, your driver apparently does :)
If you want to make a change to the radio-specific driver to address a problem, then that's fine, but please just do it there (in chirp/h777.py in your case). Changing timeout values to solve a problem can often be just moving a symptom around, so it'd be good to have any such patch include details about why the change makes sense in the commit message.
Thanks!
--Dan

On Mon, Dec 23, 2019 at 11:15:16AM -0800, Dan Smith via chirp_devel wrote:
If you want to make a change to the radio-specific driver to address a problem, then that's fine, but please just do it there (in chirp/h777.py in your case). Changing timeout values to solve a problem can often be just moving a symptom around, so it'd be good to have any such patch include details about why the change makes sense in the commit message.
I will look at that then. Thanks!

Hi,
Here is a new patch, which modifies the serial timeout only in the specific instances where it is required.

This looks simple enough to me, and might already be merged (I think I saw it pop up in my search for #7066 and r3233)
@Dan, this possibly helps us since it looks like my patch didn't cause a regression (IMO) in the newer baofeng 888 models since reverting it didn't help anyone in #7066. Any chance you'd consider re-implementing r3233? https://chirp.danplanet.com/projects/chirp/repository/revisions/3233 ________________________________ From: chirp_devel-bounces@intrepid.danplanet.com chirp_devel-bounces@intrepid.danplanet.com on behalf of Nicklas Lindgren via chirp_devel chirp_devel@intrepid.danplanet.com Sent: Saturday, December 28, 2019 9:38:50 AM To: chirp_devel@intrepid.danplanet.com chirp_devel@intrepid.danplanet.com Subject: Re: [chirp_devel] Patch for #7119 BF-888 "Refused to enter programming mode."
Hi,
Here is a new patch, which modifies the serial timeout only in the specific instances where it is required.
-- Nicklas 59D8 27AD 2632 F349 9B20 F5CB D363 3177 0A12 1B95

I actually meant bug #7067 https://chirp.danplanet.com/issues/7067 And revision r3254 https://chirp.danplanet.com/projects/chirp/repository/revisions/7dba74b4fa43 ________________________________ From: chirp_devel-bounces@intrepid.danplanet.com chirp_devel-bounces@intrepid.danplanet.com on behalf of Tony Fuller via chirp_devel chirp_devel@intrepid.danplanet.com Sent: Friday, January 3, 2020 11:31:46 PM To: Nicklas Lindgren nili@gulmohar.se; chirp_devel@intrepid.danplanet.com chirp_devel@intrepid.danplanet.com Subject: Re: [chirp_devel] Patch for #7119 BF-888 "Refused to enter programming mode."
This looks simple enough to me, and might already be merged (I think I saw it pop up in my search for #7066 and r3233)
@Dan, this possibly helps us since it looks like my patch didn't cause a regression (IMO) in the newer baofeng 888 models since reverting it didn't help anyone in #7066. Any chance you'd consider re-implementing r3233? https://chirp.danplanet.com/projects/chirp/repository/revisions/3233 ________________________________ From: chirp_devel-bounces@intrepid.danplanet.com chirp_devel-bounces@intrepid.danplanet.com on behalf of Nicklas Lindgren via chirp_devel chirp_devel@intrepid.danplanet.com Sent: Saturday, December 28, 2019 9:38:50 AM To: chirp_devel@intrepid.danplanet.com chirp_devel@intrepid.danplanet.com Subject: Re: [chirp_devel] Patch for #7119 BF-888 "Refused to enter programming mode."
Hi,
Here is a new patch, which modifies the serial timeout only in the specific instances where it is required.
-- Nicklas 59D8 27AD 2632 F349 9B20 F5CB D363 3177 0A12 1B95

@Dan, this possibly helps us since it looks like my patch didn't cause a regression (IMO) in the newer baofeng 888 models since reverting it didn't help anyone in #7066. Any chance you'd consider re-implementing r3233?
Ugh, I hadn't noticed that people said it didn't help.
Yeah, I guess. Send me a new copy on top of the current tip that you've tested and I'll re-apply. When I do, please report back after you confirm it didn't make anything worse(er).
--Dan

Patch for the chinese lady (and other settings) on the newer-ish 777/888 radios is rebased and attached inline below. Sorry for the delay.
Tony
---
# HG changeset patch # User Tony F goldstar611@hotmail.com # Date 1583202525 21600 # Mon Mar 02 20:28:45 2020 -0600 # Branch issue_7653 # Node ID bc80b6adbdfaf911f0934957ad534e82fb80e28a # Parent 5d79b7bd63496c0fdb5b987a0dc358d9f1eedf3f [h777] Fix some settings not taking effect Fixes #7653 Does not cause regression in #7067
diff --git a/chirp/drivers/h777.py b/chirp/drivers/h777.py --- a/chirp/drivers/h777.py +++ b/chirp/drivers/h777.py @@ -281,8 +281,8 @@
_ranges = [ (0x0000, 0x0110), + (0x0380, 0x03E0), (0x02B0, 0x02C0), - (0x0380, 0x03E0), ] _memsize = 0x03E0 _has_fm = True
On Mon, 2020-01-06 at 12:30 -0800, Dan Smith via chirp_devel wrote:
@Dan, this possibly helps us since it looks like my patch didn't cause a regression (IMO) in the newer baofeng 888 models since reverting it didn't help anyone in #7066. Any chance you'd consider re-implementing r3233?
Ugh, I hadn't noticed that people said it didn't help.
Yeah, I guess. Send me a new copy on top of the current tip that you've tested and I'll re-apply. When I do, please report back after you confirm it didn't make anything worse(er).
--Dan
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
participants (4)
-
Dan Smith
-
goldstar611@hotmail.com
-
Nicklas Lindgren
-
Tony Fuller