Connecting to FTDI interfaced device via Chrome App using chrome.usb & chrome.serial API

1,199 views
Skip to first unread message

Chuck Williams

unread,
Jan 27, 2017, 2:30:08 PM1/27/17
to Chromium OS dev
Hello all,

Seeking some help and direction.  Using a Chrome app, we are successfully able to connect to a (OCID serial interfaced device), but there is an Angel Eye custom device based off of FTDI.  getting this error--

Error: Permission broker failed to open the device: org.freedesktop.DBus.Error.Failed: permission_broker/permission_denied:Permission to open '/dev/bus/usb/001/050'

Any ideas or what other Chrome API can be used to connect and interact with this FTDI interfaced device from the context of the app?

Regards

Reilly Grant

unread,
Jan 27, 2017, 4:17:14 PM1/27/17
to Chuck Williams, Chromium OS dev
Have you tried connecting using the chrome.serial API? You will get that error if you try to use the chrome.usb API to connect to a device that already has a driver loaded (as will be the case for an FTDI serial adapter supported by Chrome OS).

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

Chuck Williams

unread,
Jan 27, 2017, 4:57:26 PM1/27/17
to Reilly Grant, Chromium OS dev
Thanks Reilly,

I'll be on a call with the team later tonight to get more details.  Here is a bit more informaition and use case:

Current Situation
Use case involves current Windows machines which are connected to raspberry Pi which in turn is connected to multiple equipment like access card reader, Angel Eye device(custom game). All activities of the different devices are recorded and actions are taken. For eg: if someone swipes a access card, system logs on using his Id.

The Windows machine is coming to end of life and client is looking to replace them using tablets with Chromebook OS. Customer is also looking to remove raspberry Pi and have Chromebooks directly interact with the different devices.

----Angel Eye custom device based off of FTDI interface  

Getting this error--
Error: Permission broker failed to open the device: org.freedesktop.DBus.Error.Failed: permission_broker/permission_denied:Permission to open '/dev/bus/usb/001/050'

-----Team was able to connect successfully to Card Reader (CCID serial Interface)

So are you suggesting trying to connect to the FTDI interfaced device via the Chrome App using the chrome.serial API instead of the chrome.usb API?

Thanks for time in this matter.

Regards
--
Chuck Williams
TCS-WTC-Messaging
Technical Architect
Certified Google G Suite Administrator & Deployment Specialist
501 Brooker Creek Blvd, Oldsmar, FL 34677
Mobile - 813-362-3488



Mark Hayter

unread,
Jan 27, 2017, 5:00:07 PM1/27/17
to Chuck Williams, Reilly Grant, Chromium OS dev

It has been a while since I played with this, but I remember 

(a) there was a special call usb.requestAccess on Chrome OS but the documentation says this is no longer needed 

(b) I had to fuss with the permissions in the manifest compared to what I expected from the examples and ended up with
"permissions": ["usb",
{"usbDevices": [{"vendorId": 6353, "productId": 20490}]}]

Chuck Williams

unread,
Jan 29, 2017, 5:22:11 PM1/29/17
to Chromium OS dev
Here is a bit more information on the issue we are having:

Our use case is a FTDI usb - serial adapter. Working to build a chrome app and using the chrome.usb and chrome.serial APIs. The device is not allowing access see details:

Device Details:

lsusb command showing attached device details.

chronos@localhost $ lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:07dc Intel Corp.
Bus 001 Device 059: ID 5986:0655 Acer, Inc
Bus 001 Device 056: ID 072f:2200 Advanced Card Systems, Ltd ACR122U
Bus 001 Device 057: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

chrome://device-log/

USB User [17:53:45] USB device added: path=/dev/bus/usb/001/051 vendor=1839 " ", product=8704 "CCID USB Reader", serial="--", guid=e82dcf19-c290-49f4-af23-2b30a59fa490


[17:48:21] USB device added: path=/dev/bus/usb/001/050 vendor=1027 "FTDI", product=24577 "FT232R USB UART", serial="AL02LCVV", guid=d0eea35a-1ea1-41d1-b465-26b6b897893

Trying to change the permission of usb rule file:

localhost rules.d # sudo chmod u+w 50-vgem.rules 

chmod: changing permissions of ‘50-vgem.rules’: Read-only file system

localhost rules.d # pwd

/etc/udev/rules.d

localhost rules.d # sudo mount -o remount,rw /dev/dm-0

mount: cannot remount /dev/dm-0 read-write, is write-protected

Details Logs :


17:53:47] Permission broker failed to open the device: org.freedesktop.DBus.Error.Failed: permission_broker/permission_denied:Permission to open '/dev/bus/usb/001/050' denied

2017-01-11T18:05:21.497324+08:00 INFO kernel: [29695.362182] usb 1-1: USB disconnect, device number 50
2017-01-11T18:05:21.498428+08:00 INFO kernel: [29695.362435] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
2017-01-11T18:05:21.498451+08:00 INFO kernel: [29695.362482] ftdi_sio 1-1:1.0: device disconnected



Any ideas.....

Vincent Palatin

unread,
Jan 30, 2017, 9:35:19 AM1/30/17
to Chuck Williams, Chromium OS dev
On Sun, Jan 29, 2017 at 11:22 PM, Chuck Williams <chuck.wi...@nielsen.com> wrote:
Here is a bit more information on the issue we are having:

Our use case is a FTDI usb - serial adapter. Working to build a chrome app and using the chrome.usb and chrome.serial APIs. The device is not allowing access see details:

Device Details:

lsusb command showing attached device details.

chronos@localhost $ lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:07dc Intel Corp.
Bus 001 Device 059: ID 5986:0655 Acer, Inc
Bus 001 Device 056: ID 072f:2200 Advanced Card Systems, Ltd ACR122U
Bus 001 Device 057: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

chrome://device-log/

USB User [17:53:45] USB device added: path=/dev/bus/usb/001/051 vendor=1839 " ", product=8704 "CCID USB Reader", serial="--", guid=e82dcf19-c290-49f4-af23-2b30a59fa490


[17:48:21] USB device added: path=/dev/bus/usb/001/050 vendor=1027 "FTDI", product=24577 "FT232R USB UART", serial="AL02LCVV", guid=d0eea35a-1ea1-41d1-b465-26b6b897893

Trying to change the permission of usb rule file:

localhost rules.d # sudo chmod u+w 50-vgem.rules 

chmod: changing permissions of ‘50-vgem.rules’: Read-only file system


please note this file has nothing to do with USB rules.

 

localhost rules.d # pwd

/etc/udev/rules.d

localhost rules.d # sudo mount -o remount,rw /dev/dm-0

mount: cannot remount /dev/dm-0 read-write, is write-protected


Yes the root filesystem is read-only by default (and signed).
if you want to make it Read-Write to debug, you need to do the following:
 /usr/share/vboot/bin/make_dev_ssd.sh --remote_rootfs_verification --partitions 2
<reboot>
mount -o remount,rw /


 

Details Logs :


17:53:47] Permission broker failed to open the device: org.freedesktop.DBus.Error.Failed: permission_broker/permission_denied:Permission to open '/dev/bus/usb/001/050' denied

'/dev/bus/usb/001/050' is the FTDI USB-Serial device, as mentioned earlier, you need to access it through the chrome.serial interface (ie on ChromeOS, USB devices owned by a kernel driver cannot be accessed through chrome.usb unless you whitelist them in the admin panel)

 

2017-01-11T18:05:21.497324+08:00 INFO kernel: [29695.362182] usb 1-1: USB disconnect, device number 50
2017-01-11T18:05:21.498428+08:00 INFO kernel: [29695.362435] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
2017-01-11T18:05:21.498451+08:00 INFO kernel: [29695.362482] ftdi_sio 1-1:1.0: device disconnected



This log shows the USB device being disconnected.
Is there something you want to know about this.


 


Any ideas.....


A lot of details are missing but everything above looks normal.
What is the step you are unable to achieve ?

 





On Friday, January 27, 2017 at 2:30:08 PM UTC-5, Chuck Williams wrote:
Hello all,

Seeking some help and direction.  Using a Chrome app, we are successfully able to connect to a (OCID serial interfaced device), but there is an Angel Eye custom device based off of FTDI.  getting this error--

Error: Permission broker failed to open the device: org.freedesktop.DBus.Error.Failed: permission_broker/permission_denied:Permission to open '/dev/bus/usb/001/050'

Any ideas or what other Chrome API can be used to connect and interact with this FTDI interfaced device from the context of the app?

Regards

--
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages