removing isatty() does not help since now i have the same error on setting baud rate: avrdude: ser_setspeed(): tcgetattr() failedavrdude: ser_open(): can't set attributes for device "/dev/bus/usb/002/002": Not a typewriter
(usb device is opened using file descriptor though usb file path is used for error message). What is the reason of error? Can i walk around using modified libusb which can work with file descirptor ( https://github.com/martinmarinov/rtl_tcp_andro-/tree/master/jni/libusb-andro/libusb, open2() function)? is there any existing serial impl which can work with file descriptor like i;m trying to use? 2013/6/10 Joerg Wunsch <[email protected]> > As Anton Smirnov wrote: > > > Okay, since i'm completely in stuck with it i have to try just > > comment/remove isatty() check. > > That's simple enough. Let's hope the remainder does work. > > > Do you think i have to just pass file descriptor as int and just > > skip using socket? > > You could give it a try. Just fprintf() the file descriptor number > to stderr when using your socket method. If it's the same anyway, > try skipping the socket. > > If this is indeed useful to people, we could perhaps special-case > something for that in AVRDUDE itself, just as we special-case > filenames that start with "usb:" right now. So, say we prefix > them "fdesc:<NUMBER>", where <NUMBER> refers to an open file > descriptor that has been inherited from a parent process, then > AVRDUDE bypasses the fopen(), and just proceeds to use the > descriptor. > > Of course, it would be even better to use the libavrdude backend in > future, but I think there's a bit of work ahead until that's really > useful. > -- > cheers, Joerg .-.-. --... ...-- -.. . DL8DTL > > http://www.sax.de/~joerg/ > Never trust an operating system you don't have sources for. ;-) > > _______________________________________________ > avrdude-dev mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/avrdude-dev > _______________________________________________ avrdude-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avrdude-dev
