# BenQ M22 and M23 GPRS module problem

Status
Not open for further replies.

#### techie

benq m22

I am using BenQ M23 module (looks same as M22). The following is the terminal log. Can someone let me know what is the problem.

AT

OK
AT+CGDCONT=1,"IP","INTERNET"

OK
AT%CGPCO=1,"PAP,user,pass",1 (actual user and pass used)

OK
AT$DESTINFO="72.14.203.104",1,80$DESTINFO: "72.14.203.104", 1, 80

OK
ATD*97#

Wait Socket Open
<0><0>
OK
<0>

Then nothing happens. Cannot downlaod HTTP file.
I can disconnect by +++(delay)ATH.

### techie

Points: 2

#### techie

m23 benq

I have read both the articles. I also did manage to communicate with a slef-made server (using winsock.dll in VB6) on another real IP and the data sending/receiveing over TCP socket is working OK. THe problem is that I cannot download an HTTP file from a standard web-server.

My question now is this. What is the difference between a TCP server listening on a port and a standard web-server listening on port 80. The socket connection in both cases is established OK by the M22. But in case of a web-server, there is no response when I send the standard HTTP GET command set composing of a few lines and carraige returns.

#### artem

how to send data to web server from gprs module

What you mean by tcp server ? Which port to use is not an issue i think. If server uses different than 80 port it means you should establish connection to that port . In software the server asks tcp to forward packets when port is its own .

From rfc for http format of request is set as :
Code:
       Full-Request   = Request-Line             ; Section 5.1
| Entity-Header )       ; Section 7.1
CRLF

that means it is concluded with CR and LF both . Do use just CR ?

DO you have an example captured data for request from browser and did you trace arrived packet from your mobile to the server if so did you match the request made from browser to one you send from modem?

you can use etherial to capture packets on your server PC .

#### techie

benq m22

That is a good idea artem. I shall try using a CR+LF. You are right that I was using CR only. Maybe that is the problem. I will try tomorrow morning and let you know. Thanks again.

#### artem

benq m22 ejemplo

If problem will persist, please include packet capture made on server side made from modem and another PC's browser .

That will make our efforts much easier , i think .
https://www.ethereal.com/

It will take just half of hour to get started but you will enjoy it .

### techie

Points: 2

#### techie

how i send data to server through gprs module

I have used ethereal before. It is an excellent tool for this purpose. The problem is that I dont have access to the server since it resides with the ISP. But I am sure your idea of CRLF would work. I am pretty sure that was the problem.

#### cdbarrera

##### Newbie level 4
benq gsm/gprs module

hi everyone. I'm trying to establish a connection in a server and send data via TCP connection using BenQ GSM/GPRS module

I'm using the following series of commands:

AT+CGDCONT=1,"IP", "smart1"
AT$DESTINFO="122.52.17.122",1,1300 AT$NOSLEEP=1
ATD*97#

After the dial command, the hyperterminal shows this:

Wait Socket Open

ERROR

OK

CONNECT

OK

OK

NO CARRIER

What does that mean? What is the problem with the connection? Should I use ATD*99# because I'm dialing from the Philippines? Thanks!

#### techie

benq gsm gprs module

You are missing the command

check the exact command since I maybe making a syntax mistake

#### cdbarrera

##### Newbie level 4
gprs at commands for benq

techie said:
You are missing the command

check the exact command since I maybe making a syntax mistake

Someone told me that the command at%cgpco can already be omitted. Is that correct? What does that at command do?

I also tried connecting using atd*99# and the output is this:

~ÿ}#À!}!}#} }3}"}&} } } } }#}%Â#}%}'}"}(}"ˆé~~ÿ}#À!}!}#} }3}"}&} } } } }#}%Â#}%}
'}"}(}"ˆé~~ÿ}#À!}!}#} }3}"}&} } } } }#}%Â#}%}'}"}(}"ˆé~~ÿ}#À!}!}#} }3}"}&} } } }
}#}%Â#}%}'}"}(}"ˆé~~ÿ}#À!}!}#} }3}"}&} } } } }#}%Â#}%}'}"}(}"ˆé~~ÿ}#À!}!}#} }3}
"}&} } } } }#}%Â#}%}'}"}(}"ˆé~~ÿ}#À!}!}#} }3}"}&} } } } }#}%Â#}%}'}"}(}"ˆé~~ÿ}#À
!}!}#} }3}"}&} } } } }#}%Â#}%}'}"}(}"ˆé~~ÿ}#À!}!}#} }3}"}&} } } } }#}%Â#}%}'}"}(
}"ˆé~~ÿ
NO CARRIER

I've researched somewhere and they said that these are LCP packets. Do you know why I got disconnected?
Thanks!

#### techie

benq m23 gprs

The *99# command does not use the TCP/IP stack on the modem. It is used to implement the PPP + TCP/IP in your microcontroller.

Try using the CGPCO command and see what happens.

#### cdbarrera

##### Newbie level 4
benq m 23 a

I already tried the %cgpco command, the output is still

Wait Socket Open

ERROR

OK

CONNECT

OK

OK

NO CARRIER

what could possibly go wrong with my conncection? On the server side, I used Python Socket programming .

#### techie

at%cgpco=1 benq

Try to connect to a working server, preferrably a web server that is up and running. Connect to this using standard port 80. Sometimes some service providers block all ports on GPRS except 9201, 8080 and the standard HTTP, FTP, POP3, SMTP etc. Since you are using port 1300, that may be blocked.

Status
Not open for further replies.