Hi ....
I have a custom K60 board, UART2 has been interfaced to a GSM modem. I have enabled "ttyc:" in the user config so the device has got installed in the queue.
I want it to operate in "NON_BLOCKING" mode with no ECHO. When I try to write a string Eg: "AT" on the port it only sends the First byte 'A'.
Also my ioctl "GET_BAUD" gives me "536845072" as baud rate... what should I do to correct this...
User Config:
#define BSPCFG_ENABLE_TTYC | 1 |
here is my code
MQX_FILE_PTR | modemPortFp=NULL; |
modemPortFp = fopen(MODEM_PORT, NULL); |
if( modemPortFp != NULL)
{
printf("\nUART 2 Init success !\n"); | |
}
else
printf("\nUART 2 Init Failed !\n"); |
uartParams = 0; |
if(ioctl(modemPortFp, IO_IOCTL_SERIAL_GET_BAUD, &uartParams) != 0)
printf("\nIoctl call to Get Baud failed!"); |
else
printf("\nDefault Baud = %i", &uartParams); |
************************************************************************************************************************
on console I see "Default Baud = 536845072"
Solved! Go to Solution.
Enabled "ITTYC" in user_config.h and changed fopen("ttyc:", NULL) to fopen("ittyc", NULL)... this did the trick for me...
Now I am able to communicate with modem and get valid response for AT commands
Enabled "ITTYC" in user_config.h and changed fopen("ttyc:", NULL) to fopen("ittyc", NULL)... this did the trick for me...
Now I am able to communicate with modem and get valid response for AT commands
Thanks for sharing with us, Chandra!
Keep up with the hard work.
Best,
Monica.