I have now successfully downloaded and uploaded a Baofang UV-5RA using a Raspberry Pi and using a NanoPi Duo, with not USB dongle. The programming cable consists of three wires and the connectors at each end, and nothing else.

function                 radio                        Pi
GND                      2.5mm SP sleeve     GND
Data FROM radio    2.5mm SP ring         RxD
Data TO radio         3.5mm MIC sleeve   TxD

Run CHIRP on your RPi, and it just works.