...but even if I (you) can figure this out, I think there's still a problem with the actual serialport.c/.h code. At some point, it seems to either stop responding to bytes coming in (or sending out) or simply stops interacting with java. The way the code is written now (Cedric's code) it simply opens a file handle (in .c) then passes that for app-handling in Android. Maybe if the whole reading/writing/buffering is done in .c and only the read/written bytes are passed to java (e.g. as a circular buffer or something, alloc once only), instead of as a file handle?