Altera_Forum
Honored Contributor
16 years agoConnecting the Altera UART port to a development kits uart port
Hi I am working on a bluetooth(BT) development kit. The BT kit has a RS232 serial interface. I program the BT IC using hyperterminal [AT commands]. Now I need to connect the altera stratix ep1s10f780c6 kit's UART/RS-232 to the board directly. I wrote a small code to make a bluetooth connection. However nothing seems to be happening. Can someone assist me regarding this problem? Thanks
# include <stdio.h> # include <string.h> int main() { FILE* fp; char prompt=0; fp = fopen("/dev/uart1", "w+"); fprintf(fp,"AT+BTW0021D226A29E\r\n"); while(1){ prompt = getc(fp); printf("%c", prompt); } fclose(fp); return 0; }