Ok I think I messed up the function call in that, so I messed around and have tried it this way, also with no luck. It outputs "35", which I guess means it opened the port ok and sent 5 characters to the port?
int n, fd;
fd = open("/dev/ttyS0", O_RDWR | O_NOCTTY | O_NDELAY);
if (fd < 0)
perror("open_port: /dev/ttyS0 - ");
fcntl(fd, F_SETFL, 0);
n = write(fd, &jazz, sizeof(jazz));
if (n < 0)