Hi, Please help!
I want to use an USB to Serial adapter (type: FTDI) , (VID: 1027, PID: 24577) with my ODROID- XU3 device.
I planned to use it with LIB, felUSBSerial.
my try is:
The LOG content is:
my device name is "/dev/bus/usb/002/002"
i've no permission for this (as the "haspermission" says), but requestpermission dialog is not visible.
How can I give permission to device for usage.
Thanks a lot!
I want to use an USB to Serial adapter (type: FTDI) , (VID: 1027, PID: 24577) with my ODROID- XU3 device.
I planned to use it with LIB, felUSBSerial.
my try is:
B4X:
Sub btnConnect_Click
Dim I As Int
If manager.GetDevices.Length = 0 Then
Log("No connected usb devices.")
Else
For I = 0 To manager.GetDevices.Length - 1
Dim D As UsbDevice
d = manager.GetDevices(I)
Log(D.DeviceName )
Log(D.VendorId)
Log(D.ProductId)
Next
Dim device As UsbDevice = manager.GetDevices(1) 'assuming that there is exactly one device
If manager.HasPermission(device) = False Then
ToastMessageShow("Please allow connection and click again.", True)
manager.RequestPermission(device)
Else
usbserial.Initialize("serial", device, -1)
usbserial.BaudRate = 115200
usbserial.DataBits = usbserial.DATA_BITS_8
usbserial.StartReading
End If
End If
End Sub
The LOG content is:
B4X:
Logger connected to: HARDKERNEL Co., Ltd. ODROID-XU3
--------- beginning of /dev/log/main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
/dev/bus/usb/006/003
3034
33107
/dev/bus/usb/002/002
1027
24577
my device name is "/dev/bus/usb/002/002"
i've no permission for this (as the "haspermission" says), but requestpermission dialog is not visible.
How can I give permission to device for usage.
Thanks a lot!