MTSMC-H5 socket dial error

Home Forums General MTSMC-H5 socket dial error

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2893
    toyo ayeni
    Participant

    hi

    I’m new to your modem modules and I’m having trouble opening a socket connection for transmitting via TCP/IP.

    I’m communicating (using AT commands) with a MTSMC-H5 on a

    MTSMC-UDK board. I’ve got a GPRS enabled SIM card connected to the modem. I’ve been able to obtain an IP address from the network(#SGACT), verified the address(+CGPADDR), configure GPRS access(+CGDCONT), configured the stack(#SCFG). Opening the socket is the issue(#SKTD). Every time I issue this command, I hear the SIM buzzing for about 20 secs after which the modem returns an ERROR response. I’ve tried ports and addresses I can already connect to within my local network. I’ve also tried port 80 for

    well known addresses like http://www.google.com with no success.

    I cant reach the modem even when I put it in the listen mode either.

    I would appreciate any suggestions. thanks.

    #4473
    Lonny Knudson
    Blocked

    Hi Toyo,

    Could you capture a log of your terminal session showing all commands you are sending and the responses from the Socket modem. I recommend issuing AT+CMEE=1 at the beginning of your command sequence, this should give us more detail regarding the ERROR.

    The IP stack has a firewall built in, by default inbound connections are blocked. You will need to add a firewall rule to allow inbound connections (see documentation for the #FRWL command for more details). I would recommend getting the client connections working before moving on to the listen mode issue.

    #4474
    toyo ayeni
    Participant

    hi Lonny

    I found my problem. I had been using an APN of the carrier that did not require a user name/pwd. so soon as a switched to an APN that required it, it worked.

    thanks anyways

    #4475
    toyo ayeni
    Participant

    hi Lonny,

    I’ve run into a different kind of problem. As an example, after issuing the (#SD) command to http://www.yahoo.ca @port 80, I get the ‘CONNECT’ response. Then I try to issue HTTP commands to retrieve the page but the characters are not echoing back. It seems like the module is locked up. After a few seconds, I get the ‘NO CARRIER’ response. I can ping (#PING) the site, I can send email using the other method (#EMAILD).

    Any suggestions? (I’ve posted my sequence of commands below) =>

    AT

    OK

    AT

    OK

    AT+CGPADDR=1

    +CGPADDR: 1,”25.16.167.13″

    OK

    AT#GPRS?

    #GPRS: 1

    OK

    AT#SCFG=1,

    +CME ERROR: 4

    AT#SCFG?

    #SCFG: 1,1,400,100,1000,50

    #SCFG: 2,1,1500,20,600,30

    #SCFG: 3,1,300,90,600,50

    #SCFG: 4,2,300,90,600,50

    #SCFG: 5,0,300,90,600,50

    #SCFG: 6,1,300,90,600,50

    OK

    AT+CGDCONT?

    +CGDCONT: 1,”IP”,”internet.com”,”25.16.167.13″,0,0

    OK

    AT#PING=”www.yahoo.ca”

    #PING: 01,”98.139.102.145″,12,44

    #PING: 02,”98.139.102.145″,3,44

    #PING: 03,”98.139.102.145″,3,44

    #PING: 04,”98.139.102.145″,2,44

    OK

    AT#SD=1,0,80,”www.yahoo.ca”

    CONNECT

    NO CARRIER

    AT

    OK

    #4476
    Lonny Knudson
    Blocked

    Hi Toyo,

    If you get a CONNECT response to the #SD command, the socket to the http server should be open.

    Could you post the contents of your HTTP request?

    #4477
    toyo ayeni
    Participant

    GET / HTTP/1.1<cr><lf>

    Host: http://www.yahoo.ca<cr><lf&gt;

    When I start with ‘G’ I expect to see G on the screen, then ‘E’ then ‘T’ and so on. But nothing comes up. After a few seconds the NO CARRIER response comes up.

    #4478
    Lonny Knudson
    Blocked

    Hi Toyo,

    When you see the CONNECT response, this means that the interface has switched to data mode. When in data mode, the modem does not echo characters back to the host. This is expected behavior.

    The HTTP request should be terminated by 2 <cr><lf> pairs. A single <cr><lf> pair is used to delimit the http command and individual headers. I suspect that the http server is closing the socket (producing the NO CARRIER response from the modem) because it was expecting more headers. The ‘Host:’ line in your request appears to be terminated with one <cr><lf> pair rather than 2.

    #4479
    toyo ayeni
    Participant

    thanks Lonny, I enabled local echo.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.