MTSMC-H5 socket dial error
- This topic has 7 replies, 2 voices, and was last updated 12 years ago by
toyo ayeni.
-
AuthorPosts
-
March 15, 2013 at 7:08 pm #2893
toyo ayeni
Participanthi
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.
March 15, 2013 at 7:29 pm #4473Lonny Knudson
BlockedHi 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.
March 18, 2013 at 8:19 pm #4474toyo ayeni
Participanthi 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
March 19, 2013 at 9:41 pm #4475toyo ayeni
Participanthi 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
March 20, 2013 at 8:26 pm #4476Lonny Knudson
BlockedHi 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?
March 21, 2013 at 6:21 pm #4477toyo ayeni
ParticipantGET / HTTP/1.1<cr><lf>
Host: http://www.yahoo.ca<cr><lf>
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.
March 21, 2013 at 6:42 pm #4478Lonny Knudson
BlockedHi 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.
March 21, 2013 at 7:33 pm #4479toyo ayeni
Participantthanks Lonny, I enabled local echo.
-
AuthorPosts
- You must be logged in to reply to this topic.