BbsonLin / serial_port_flutter

A Flutter plugin integrated with Android-SerialPort-API
Other
29 stars 24 forks source link

Android-x86 環境下無法運作 #4

Closed raindy29 closed 4 years ago

raindy29 commented 4 years ago

使用 android-x86_64-8.1-r5 這個版本,可以看到RS232 連接埠 但開啟後要發送訊息就會crash,整個app都跳掉,使用example測試

BbsonLin commented 4 years ago

@raindy29 我這邊沒有 Android x86 環境可以測試 ... 請提供 Debug console 的 Log 或更多資訊給我,好讓我知道是甚麼問題~

raindy29 commented 4 years ago

我不曉得要怎麼在 android x86 看debug ,是否方便請你下載 android-x86_64-8.1-r5.iso https://osdn.net/projects/android-x86/releases/69704 他有live開機不需要安裝,就可以執行在任何pc上,也就可以裝上apk ,我稍晚會試看看,找找debug mode

Cobolt77 commented 4 years ago

Having the same issue here. I think it's just the device timing out.

raindy29 commented 4 years ago

選擇其中之一的連接埠後,再按開啟,就會跳出「沒有回應」 app就關閉了,訊息如下

D/SerialPort( 7314): Found new device: /dev/ttyS0 D/SerialPort( 7314): Found new device: /dev/ttyS3 D/SerialPort( 7314): Found new device: /dev/ttyS2 I/al_port_example( 7314): type=1400 audit(0.0:2758): avc: denied { read } for name="/" dev="tmpfs" ino=1572 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=1 I/al_port_example( 7314): type=1400 audit(0.0:2759): avc: denied { open } for path="/dev" dev="tmpfs" ino=1572 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=1 D/FlutterSerialPortPlugin( 7314): [ttyS0 (serial), ttyS3 (serial), ttyS2 (serial)] D/FlutterSerialPortPlugin( 7314): [ttyS0 (serial), ttyS3 (serial), ttyS2 (serial)] D/FlutterSerialPortPlugin( 7314): [/dev/ttyS0, /dev/ttyS3, /dev/ttyS2] D/FlutterSerialPortPlugin( 7314): [/dev/ttyS0, /dev/ttyS3, /dev/ttyS2] D/FlutterSerialPortPlugin( 7314): Open /dev/ttyS2, baudrate: 9600 I/zygote64( 7314): Thread[3,tid=7321,WaitingInMainSignalCatcherLoop,Thread*=0x71ffda0bf400,peer=0x14202c38,"Signal Catcher"]: reacting to signal 3 I/zygote64( 7314): I/zygote64( 7314): Wrote stack traces to '[tombstoned]'

BbsonLin commented 4 years ago

@raindy29 我最近試過 Androd X86-64 平台,這應該是權限問題。 暫時解決方式是將你要連的 /dev/ttySX 權限改成 755 或 777。

@Cobolt77 I recently tried on Android x86-64, this is because of the device permission. Temporarily solution is changing device /dev/ttySX permission to 755 or 777

FndP commented 4 years ago

@BbsonLin how to change permission 755 or 777 and where to change can i know about more please !

BbsonLin commented 4 years ago

Hi @falgunpatel97621 Android is an Unix-like OS, all you need is to open terminal on your system. Or you can download and try out this app. Terminal Emulator for Android