Small update: By putting this inside the inner loop, it appears mostly
[but not completely] fixed:
if(0 < (ret = ftdi_usb_purge_buffers(ftdic))) {
fprintf(stderr, "unable to purge ftdi buffers: %d (%s)\n", ret,
ftdi_get_error_string(ftdic));
break;
}
Now I'm doubly confused as to what's going wrong. When I put in a bunch
of printf debug spam, it seemed to spend most of it's time waiting on a
read() from the pty.
Thanks,
Gary (-;
On Tue, Jul 21, 2009 at 01:45:31AM -0400, Chunky Kibbles wrote:
> Heya,
>
> I've written a small tool to work with posix_openpt and libftdi; the
> intention is to get the machine to pretend that it has a "real" USB serial
> tty connected, for anyone that needs it [specifically in this case, the
> SheevaPlug comes with a kernel that doesn't have any modules available,
> and re-flashing it with a new kernel is a relative pain].
>
> I open the pty it announces with minicom -p <what ftdipty said>
>
> I'm using an OBDPro device to connect to an OBDII car. The problem is
> that it appears that nothing gets sent to the device until I hit enter
> twice [instead of just once, as expected], and then two enters get send
> and it responds as if I'd sent two.
>
> I don't really have any idea what might be going wrong here, please
> could anyone point me in the right direction? The code [only 83 lines]
> is here:
> http://icculus.org/obdgpslogger/ftdipty.c
>
> Alternatively, of course, if there's any other software out there that
> does the same thing, I would greatly appreciate a URL. I didn't come
> across anything useful while searching.
>
> Thank-you very much,
> Gary (-;
>
> --
> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
> To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|