felHR85 / UsbSerial

Usb serial controller for Android
MIT License
1.82k stars 597 forks source link

Connecting to multiple serial ports, how can i change the baud rate for each port? #286

Open GRSahana opened 5 years ago

GRSahana commented 5 years ago

I am using this library in my application, I want to connect to multiple serial port via usb, now in the example code which you have given, How can i change the baud rate for each serial post. Thank You..

ShashiShekhar7 commented 5 years ago

@GRSahana Hey! I'm facing the same issue. Did you got the solution? If yes, then please share. Thanks.

GRSahana commented 5 years ago

You can use the method, serialport.setBaudRate(), to which you will pass the baudrate as an argument.

On Sat, Nov 30, 2019 at 4:21 PM ShashiShekhar7 notifications@github.com wrote:

@GRSahana https://github.com/GRSahana Hey! I'm facing the same issue. Did you got the solution? If yes, then please share. Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/felHR85/UsbSerial/issues/286?email_source=notifications&email_token=AHLWQ7FWPTC3ER6XEIBM74LQWJASDA5CNFSM4JEPO562YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFQBXOQ#issuecomment-559946682, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHLWQ7CIOFZTFNYYR65ICF3QWJASDANCNFSM4JEPO56Q .

ShashiShekhar7 commented 4 years ago

@GRSahana I'm already using that method. I think the issue with the service running. Because , once i have selected a baud rate from a selector and started communication, the value of baud rate argument dose not changes until I re-open the app. Any help? PS- I'm using single port to communicate.

ShashiShekhar7 commented 4 years ago

@GRSahana Hey, i just figured out solution to my problem. I just needed to stop the service before changing the baud rate and start again after changing. Anyway, thanks for the help.

GRSahana commented 4 years ago

ok👍

On Thu, Dec 5, 2019 at 3:36 PM ShashiShekhar7 notifications@github.com wrote:

@GRSahana https://github.com/GRSahana Hey, i just figured out solution to my problem. I just needed to stop the service before changing the baud rate and start again after changing. Anyway, thanks for the help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/felHR85/UsbSerial/issues/286?email_source=notifications&email_token=AHLWQ7AKRYZACQIBYEEYIHLQXDHEBA5CNFSM4JEPO562YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGAFXAY#issuecomment-562060163, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHLWQ7HDI45YB5VJPW46OATQXDHEBANCNFSM4JEPO56Q .