I have been using raspberry pi with a usb to rs232 converter but now I have to use Raspberry Pi's UART pins but I have such a silly problem.
I am using termios.h library in C (http://en.wikibooks.org/wiki/Serial_Programming/termios) and it works very well with converter but when I use UART pins, while I am setting baud rate as
cfsetospeed(&tio,B115200); // 115200 baud
cfsetispeed(&tio,B115200); // 115200 baud
baud rate still works at 9600. Is there anouther setting that I have to do with termios library ? If not what should I have to do to change the baudrate ?
Also I have tried with baudrate 4800 and it still works with 9600 when I use UART but with the usb to rs232 converter there is no porblem.
I am using the library
https://github.com/irukeru/TermiosSerialCom
that I have modified and there is no problem with other devices.