Send image (.jpg) file over serial port

This is a discussion on Send image (.jpg) file over serial port within the Networking/Device Communication forums, part of the General Programming Boards category; We are trying to interface one of our devices with our machines by having the device send a file over ...

Send image (.jpg) file over serial port

We are trying to interface one of our devices with our machines by having the device send a file over the serial port. The code for the external device is written in C. However, we have not been able to successfully compile any of our code to do this. This is one of the code snippets we used to try to open the serial port and send data:

However, when we try to compile this code, we get an error that O_NDELAY is an undeclared variable. We think it has something to do with termios.h, but we have not been able to fix this. We also tried using FileOutputStream.h (Source: fileoutputstream.c File Reference) but we got a file not found error. Can someone point us in the right direction here?