flutter_libserialport icon indicating copy to clipboard operation
flutter_libserialport copied to clipboard

SerialPortError (SerialPortError: Permission denied, errno = 13)

Open workoutand opened this issue 2 years ago • 8 comments

image

Hi everyone,

I'm trying to run the example of the flutter_serialport lib, but it doesn't work on the android system, only windows, can anyone help me?

workoutand avatar Jul 29 '21 22:07 workoutand

Hi, perhaps the discussion at https://github.com/jpnurmi/libserialport.dart/issues/3 helps

jpnurmi avatar Jul 30 '21 05:07 jpnurmi

Hellow, I saw this thread but I didn't understand where those directories came from

workoutand avatar Jul 30 '21 10:07 workoutand

Someone made it work?

laychopy avatar Oct 16 '21 11:10 laychopy

Hello, I have the same problem and so far I haven't seen a solution on the forums. Can you help me?

josuemoraisgh avatar Feb 05 '22 11:02 josuemoraisgh

Anyone with a solution for this?

jeremylcarter avatar Mar 20 '22 23:03 jeremylcarter

Hi, perhaps the discussion at jpnurmi/libserialport.dart#3 helps

“ Permission denied, errno = 13 ” Is there a tutorial on how to solve it?

thousmile avatar Apr 12 '22 08:04 thousmile

I have the same problem

Fudal avatar Apr 28 '22 09:04 Fudal

This lib should be updated to use the new android permissions handling, see https://github.com/altera2015/usbserial/blob/master/android/src/main/java/dev/bessems/usbserial/UsbSerialPlugin.java

That lib, usbserial, could be used instead of this one until it's fixed here I think.

augustbering avatar May 02 '22 09:05 augustbering

I have the same problem, is it fix yet?

trapeye avatar Nov 17 '22 02:11 trapeye

still same problem guys, is it fix yet? Thanks

asrafilll avatar Jan 12 '23 16:01 asrafilll

Hello, still have the same problem, does someone has a solution?

algom-gchauvelin avatar Mar 23 '23 12:03 algom-gchauvelin

am also having the same problem. any fix?

eldhosekm avatar Jul 07 '23 11:07 eldhosekm

only my "fix" from above

augustbering avatar Jul 15 '23 14:07 augustbering

I make it work using the native implementation of Flutter. in native use this in gradle io.github.xmaihh:serialport:2.1.1

eldhosekm avatar Jul 16 '23 11:07 eldhosekm

I make it work using the native implementation of Flutter. in native use this in gradle io.github.xmaihh:serialport:2.1.1

is it possible for you to put the steps on how you solved it, unfortunately, I have zero knowledge of the native structure.

Muaz-fmb avatar Oct 25 '23 16:10 Muaz-fmb

you can use MethodChannel to communicate to native here is the sample. You will get the callback in flutter from java or kotlin.

https://medium.com/@iiharish97ii/method-channel-in-flutter-bridging-native-code-and-flutter-with-two-way-communication-788d1e91c8c1

then you write the code in native (java or kotlin) using this library( io.github.xmaihh:serialport:2.1.1) to communicate with serial port.

eldhosekm avatar Oct 29 '23 11:10 eldhosekm

you can use MethodChannel to communicate to native here is the sample. You will get the callback in flutter from java or kotlin.

https://medium.com/@iiharish97ii/method-channel-in-flutter-bridging-native-code-and-flutter-with-two-way-communication-788d1e91c8c1

then you write the code in native (java or kotlin) using this library( io.github.xmaihh:serialport:2.1.1) to communicate with serial port.

Can you help me with setting it up? it won't be for free. reach me out on [email protected]

Muaz-fmb avatar Oct 29 '23 14:10 Muaz-fmb

Having the same problem while running flutter on Linux. Using sudo solved it.

guyluz11 avatar Dec 25 '23 15:12 guyluz11

We put permission handling in todo. Activity is tracked in #76 Closed

lucafabbri avatar Feb 21 '24 12:02 lucafabbri