2011-08-01 05:10:47     Improper modem response !!

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-08-01 05:10:47     Improper modem response !!

Ganesh krish (INDIA)

Message: 102744   

 

Hi ,

 

   I'm using sim300 modem through sport1_to_uart on my BF531 , in my appln code i'm opening the device and sending some AT commamds through tht ........

 

I can able to send the AT commands but I'm unable to get response properly from the modem .When i do pppd connection before executing my user appln .. then i do execute my appln means its working properly (i.e) i can able to recieve the AT command response properly ...

 

 

 

This how i'm configuring UART :

 

uart1_fd = open("/dev/ttySS1",O_RDWR | O_NOCTTY | O_NDELAY);

    if (uart1_fd == -1)

    {

        fprintf(stderr,"Unable to open UART 1 - %s\n",strerror(errno));

        return -1;

    }

 

    tcgetattr(uart1_fd, &cur_uart1_options);

    old_uart1_options = cur_uart1_options;

    new_uart1_options = cur_uart1_options;

 

    /*In Non-blocking mode,the read function will return 0 if no characters are available on the port*/  

 

         fcntl(uart1_fd, F_SETFL, FNDELAY);    //Non-blocking mode

   

     cfsetispeed(&new_uart1_options, B9600);

    cfsetospeed(&new_uart1_options, B9600);

     new_uart1_options.c_cflag |= (CLOCAL | CREAD);

     new_uart1_options.c_cflag &= ~PARENB;

     new_uart1_options.c_cflag &= ~CSTOPB;

     new_uart1_options.c_cflag &= ~CSIZE;

     new_uart1_options.c_cflag |=  CS8;

     new_uart1_options.c_cflag &= ~CRTSCTS;

     new_uart1_options.c_lflag &= ~(ICANON | ECHO | ISIG); 

    new_uart1_options.c_lflag &= ~OPOST;

 

     tcsetattr(uart1_fd, TCSAFLUSH, &new_uart1_options);

    usleep(20000);

 

 

 

Plese Help where i'm going Wrong !!!!!!!!

QuoteReplyEditDelete

 

 

2011-08-01 05:47:02     Re: Improper modem response !!

Aaron Wu (CHINA)

Message: 102745   

 

Don't quite follow you when it's working properly and when not. When saying unable to get response properly from the modem have you checked what's the problem is, the receiving for sport to uart driver does not work or have you done anything to make your modem dead?

QuoteReplyEditDelete

 

 

2011-08-02 01:20:36     Re: Improper modem response !!

Ganesh krish (INDIA)

Message: 102754   

 

Hi aaron,

 

   Its working properly when i establish pppd connection before sending any at commands ,,,,,,, when i directly send at commands i could able to send but getting the command response properly ....... Before sending any at commands whn i do pppd connection ,,,,,, thn i do get response properlY ..... i havnt done anything to mak modem dead ..... whn i do pppd after tht i snd AT commamds i get the response for the at command properly, so i cant suspect the sport_to_uart driver !!

QuoteReplyEditDelete

 

 

2011-08-02 01:40:52     Re: Improper modem response !!

Aaron Wu (CHINA)

Message: 102755   

 

Sounds like something is wrong with your AT command transaction process between the host and your modem, are you able to verify your AT transaction process on other platform like a PC?

QuoteReplyEditDelete

 

 

2011-08-02 01:42:15     Re: Improper modem response !!

Aaron Wu (CHINA)

Message: 102756   

 

Sounds like something is wrong with your AT command transaction process between the host and your modem, are you able to verify your AT transaction process on other platform like a PC?

QuoteReplyEditDelete

 

 

2011-08-02 01:54:44     Re: Improper modem response !!

Ganesh krish (INDIA)

Message: 102757   

 

Yup i tried with PC it was working fine .......... Even after pppd connection modem works well .... but before tht it was not responding properly

QuoteReplyEditDelete

 

 

2011-09-07 02:36:35     Re: Improper modem response !!

Ganesh krish (INDIA)

Message: 103312   

 

Can anyone give me some suggestion on this !!!

QuoteReplyEditDelete

 

 

2011-09-07 04:14:59     Re: Improper modem response !!

Aaron Wu (CHINA)

Message: 103318   

 

we don't  have your modem and you App so can not have a quick try for you, guess maybe you need more debug to identify where the problem is, your AT command transaction flow or something wrong with the blackfin device driver. Give us more details like how to reproduce this without much dependent on specific hardware if it's a blackfin platform issue so we can help to check on our side

Attachments

    Outcomes