As Anton Smirnov wrote:

> is there any work around for it (without rooting)?

Frankly: I don't know.

Depending on your Arduino platform, setting the baudrate might be
required or not.  If it's not required (e.g. since the STK500v2
protocol is handled by a controller directly attached to USB, I've
seen an ATmega16U2 on some boards), and that is your only ioctl that
fails, you might try commenting it out.

> In my case file descriptor is also int value which originally received in
> android app (java vm) using UsbDeviceConnection.getFIleDescriptor() which
> is written to return file descriptor for native code specially.
> then i pass it to avrdude and since it's child process and file descriptors
> are process-related i have to use unix socket.

Ouch. :-)

Btw., there's no real need to pass the descriptor along a socket, you
could as well pass it through a commandline option and just bypass the
open().
-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
avrdude-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to