Bug #4165
openCannot communicate with UV-82 radio over included Baofeng pl2303-based programming cable on Ubuntu 16.04
100%
Description
On a previous version of Ubuntu (and CHIRP), circa 2014, I managed to program my UV-82 radio with the included programming cable (which is based on something claiming to be a pl2303 chip). However, today I found that I was unable to do so. The cable showed up in dmesg, but plugging the cable into the radio appeared to trip the push-to-talk and make it try to transmit. Attempting to communicate (upload or download) with CHIRP would just produce a "Radio did not respond" error.
Since I previously had it working, I knew the radio and cable were good, so I went digging. I found http://askubuntu.com/q/465628/170317 which suggested that the drivers shipped with non-ancient versions of Ubuntu for the pl2303 chip will default the DTR (Data Terminal Ready) line of the serial interface to logical 0. Ordinarily, this line is always logical 1, and indicates that the computer is ready to communicate. I added some code to the UV-5R driver in CHIRP (which is used by the UV-82) to try and change this, and it seems to work (as long as you wait a bit for the DTR signal to register with the radio and for it to stop trying to transmit).
It looks like really only the sleep is needed (since pyserial sets DTR to 1 by default when it opens the port, and you just have to wait for the radio to notice), but I'm going to submit a patch that makes it explicit that this radio needs DTR=1 in order to work.
Updated by Bernhard Hailer over 4 years ago
- Status changed from New to Feedback
Has this been completed? Thanks.
Updated by Adam Novak over 4 years ago
I submitted the patch to the mailing list: http://intrepid.danplanet.com/pipermail/chirp_devel/2016-October/004329.html
I'm not sure whether it was ever accepted or not.
Updated by Bernhard Hailer over 4 years ago
Thanks for the feedback!
Could you do me a favor and resubmit on mailing list, asking whether it had been applied or can be applied now?
Updated by Adam Novak over 4 years ago
OK, I re-sent it. I'm not actually on the chirp_devel mailing list, so it's in a queue waiting for moderator approval.
Do the moderators ever approve things? If not I can join the list to send it again, or you are welcome to submit the patch yourself if that would be easier.
Updated by Bernhard Hailer over 4 years ago
Hi Adam, you should really join the developers list. Thanks!
Updated by Adam Novak over 4 years ago
OK, I subscribed and sent the patch in again.
There really needs to be a way to send in patches from people who don't care enough to get development updates in their inbox forever, and who only need e-mail about their patch specifically.
Updated by Martin Cooper over 4 years ago
It's not clear if this is relevant here, but do remember that USB to RS232 and USB to TTL serial adaptors are not the same thing. Logic levels are inverted between RS232 and TTL. This catches a lot of people out, when they are testing a USB to TTL adaptor and expecting to see RS232 logic values.