USB-SERIAL COMMUNICATIONS ON RASPBERRY PI 3 B+

I have ExaGear Desktop for Raspberry Pi 3 B+ and use WINE to successfully launch an x86 program.  The x86 program needs to communicate with a device using a USB-serial adapter.  So far I have not figured out how to get the x86 program to recognize the USB-serial adapter.

On a Windows laptop, we install USB Driver: CH341SER.exe and it just works without any troubleshooting or further configuration.  I tried but it wasn't as simple as installing the CH341SER driver software using WINE on the Pi.

The endgame is to create a portable "black box programmer" to change motor control settings on my Bafang powered eBike.

http://wiseinnovationtechnologies.com/programming-your-bafang-motor/
LVL 1
Lance McGrewRETIREDAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
it won't work, why don't you just make a serial connector and connect it to the gpio
RXD pin 10, TXD pin 8, GND pin 6

you will have to enable uart in the config file
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=141195
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nociSoftware EngineerCommented:
Wine doesn't connect serial ports through USB....
That is to say Wine doesn't handle USB.

This may work;    first create a serial port under linux and the export that serial port in Wine as COM1, COM...
See this:    https://www.onetransistor.eu/2015/12/wine-serial-port-linux.html
0
Lance McGrewRETIREDAuthor Commented:
The motor control requires power for programming.  That is why they use USB-serial adapter to supply voltage and data.  The idea of using GPIO header seems like a viable idea.
image_10636.jpg
0
nociSoftware EngineerCommented:
be aware that  USB is the power rail on the Raspberry for 5V, GPIO = 3.3V and behind a power convertor (so limited power, few mA).
Power for motors SHOULD realy be from other sources.  if 5V is sufficient then the USB powerrail should be sufficient, as long as the Powersupply can deliver. (well not 10A... ;-)  )

There are motor controls for the RPi (as a HAT)  that have separate power supplies, either using relays or H coupled transistors.
0
Lance McGrewRETIREDAuthor Commented:
Both contributors provided great suggestions to my original request and I appreciate their time.
0
nociSoftware EngineerCommented:
Good luck with your project, RPi's can be fun ;-)
0
Lance McGrewRETIREDAuthor Commented:
noci said This may work;    first create a serial port under linux and the export that serial port in Wine as COM1, COM...
See this:    https://www.onetransistor.eu/2015/12/wine-serial-port-linux.html

Following the instructions produced a working solution.  Thank you noci for your contribution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.