Quantcast

using ftdi in chroot on android

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

using ftdi in chroot on android

Bradley Bauer

can libftdi be used in a linux chroot on android hardware? I have gentoo and did successfully compile libftdi on my chroot.

I have the ttl-232r usb to serial cable and am trying to hook it up to the nexus 7 android tablet.

when I call ftdi_usb_open() I am returned -3 error code, usb device not found...

when the usb is plugged in I get dmesg output that identifies my ftdi cable. I have tried with and without the kernel module ftdi_sio. I also have tried w/ and w/o the ftdi android app installed, which does detect my cable.

is there any reason this will not work?

I am using code from this page... pretty basic stuff http://hackaday.com/2009/09/22/introduction-to-ftdi-bitbang-mode/



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: using ftdi in chroot on android

Jim Paris
Bradley Bauer wrote:

> can libftdi be used in a linux chroot on android hardware? I have gentoo
> and did successfully compile libftdi on my chroot.
>
> I have the ttl-232r usb to serial cable and am trying to hook it up to the
> nexus 7 android tablet.
>
> when I call ftdi_usb_open() I am returned -3 error code, usb device not
> found...
>
> when the usb is plugged in I get dmesg output that identifies my ftdi
> cable. I have tried with and without the kernel module ftdi_sio. I also
> have tried w/ and w/o the ftdi android app installed, which does detect my
> cable.
>
> is there any reason this will not work?

Running your program under e.g. strace would help identify where it's
going wrong.

Does the right USB device node show up under /dev/bus?  Usually it's
made by udev, or devtmpfs.  I don't know how android handles that.
If you don't have /dev/bus but you do have devtmpfs in the kernel,
maybe try:
  mkdir /dev/bus
  mount -t devtmpfs none /dev/bus
  mount --bind /dev/bus/bus /dev/bus

Jim

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: using ftdi in chroot on android

Rogier Wolff
In reply to this post by Bradley Bauer
On Sun, Oct 12, 2014 at 02:04:51PM -0400, Bradley Bauer wrote:
> can libftdi be used in a linux chroot on android hardware? I have gentoo
> and did successfully compile libftdi on my chroot.
>
> I have the ttl-232r usb to serial cable and am trying to hook it up to the
> nexus 7 android tablet.
>
> when I call ftdi_usb_open() I am returned -3 error code, usb device not
> found...

In a chroot, you need to mount /dev/ and /proc and possibly /sys to
make certain things work.

mount -o bind /dev /chroot/dev

etc. I'd recommend doing all three, verifiy that this solves it, and
then figure out the minimum set of mounts that are required to make it
work.

        Roger.

--
** [hidden email] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: using ftdi in chroot on android

Thomas Jarosch
On Wednesday, 15. October 2014 11:34:13 Rogier Wolff wrote:

> On Sun, Oct 12, 2014 at 02:04:51PM -0400, Bradley Bauer wrote:
> > can libftdi be used in a linux chroot on android hardware? I have gentoo
> > and did successfully compile libftdi on my chroot.
> >
> > I have the ttl-232r usb to serial cable and am trying to hook it up to
> > the nexus 7 android tablet.
> >
> > when I call ftdi_usb_open() I am returned -3 error code, usb device not
> > found...
>
> In a chroot, you need to mount /dev/ and /proc and possibly /sys to
> make certain things work.
>
> mount -o bind /dev /chroot/dev
>
> etc. I'd recommend doing all three, verifiy that this solves it, and
> then figure out the minimum set of mounts that are required to make it
> work.

'strace' also might help here to see which files / directories
libusb tries to access.

Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...