GPRS mobile modem

I think we all know by now what this section is for.
Post Reply
User avatar
ed
retired
Posts: 5384
Joined: Thu Jun 21, 2007 4:01 pm
Location: yorkshire
Contact:

#1 GPRS mobile modem

Post by ed »

and now for something completely different

I' m thinking this will/may be for Nick or Nick but others may have an angle.....

I currently upload data from a remote AVR processor to a web server that processes weather data...all is good!
I've just implemented a database on my server and some php scripts to maintain a db....all is good!

well, all is good if I message the php script through a browser address line..the database updates or lists contents ok....

if I message the php script via tcp GET using the GPRS modem my webserver doesn't acknowledge receiving any messages. The GPRS unit responds to all my modem commands and connects(or says it does) to my web server and responds ok to messages sent...but the web server doesn't receive the messages(or at least the messages dont appear in my visitors or error log. I use exactly the same method and commands for the uplink that currently works.

anybody any experience in this area?

web server support will only commit themselves as far as to say they MIGHT be blocking the IP address I'm using and I should try white listing it. Problem there is the address is dynamically allocated everytime I fire up the modem, which could be frequently as I reboot every time I get a comms time-out. Webserver support say nobody else is using this method of comms, which I find difficult to accept.

I'm in the process of moving between scratching my head and tearing my hair out.......
There's nowhere you can be that isn't where you're meant to be
User avatar
Nick
Site Admin
Posts: 15707
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#2 Re: GPRS mobile modem

Post by Nick »

Any way of seeing what is actually replied to the post on the GPRS unit? It should see a 200 Ok message back. Are you connecting to the server (I assume its to some cloud service not your own server) by name or ip address? If ip address the server may be using name based virtual host to work out which host to send the message to (if you see what I mean), if you are sending the ip instead of a name it may not be going to the server you think it is.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
User avatar
ed
retired
Posts: 5384
Joined: Thu Jun 21, 2007 4:01 pm
Location: yorkshire
Contact:

#3 Re: GPRS mobile modem

Post by ed »

was trying to rush a reply....

am due at the cubs party 5 minutes ago...boy is chomping at the bit...

will update later, thanks for watching
There's nowhere you can be that isn't where you're meant to be
User avatar
ed
retired
Posts: 5384
Joined: Thu Jun 21, 2007 4:01 pm
Location: yorkshire
Contact:

#4 Re: GPRS mobile modem

Post by ed »

connecting by name..these gprs units find a name server

am using tcp so the gprs unit should pass back the server reply
all replies are good, including connect to server...the only reply I don't check is the response to CIPSEND which should be a chevron...I wait 2 seconds before putting the URL/parameter string together....

although as the char(26) gets a response of SEND OK I rather thought the chevron had come back ok......

whats throwing me at the mo is that I use exactly the same AT+ modem commands for my server as I do for the weather processing server....and the weather processing link is perfect. I will investigate a bit more in case I'm not getting the invitation chevron back from the gprs...

I will post the log/transcript if you have any suggestions.......I'm aware it's not the usual AT fodder

btw the cubs christmas party was a hoot...I had to partake in the musical statues and the ball fight......

edit: a snippet of debug log...

test gprs uplink to vitalstates server Version:- 1.00
Deactivated
APN set!
Initialised!
Address obtained
Echo Disabled
AT+CIPSTART="TCP","www.vitalstates.org","80"
connected
AT+CIPSEND
GET /wstest/wstestupload.php?one=7771&two=7772&three=7773 HTTP/1.1

AT+CIPCLOSE
logged
AT+CIPSTART="TCP","www.vitalstates.org","80"
connected
AT+CIPSEND
GET /wstest/wstestupload.php?one=7771&two=7772&three=7773 HTTP/1.1

AT+CIPCLOSE
logged
AT+CIPSTART="TCP","www.vitalstates.org","80"
connected
AT+CIPSEND
GET /wstest/wstestupload.php?one=7771&two=7772&three=7773 HTTP/1.1

AT+CIPCLOSE
logged
There's nowhere you can be that isn't where you're meant to be
User avatar
Nick
Site Admin
Posts: 15707
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#5 Re: GPRS mobile modem

Post by Nick »

If it helps send me the php and I will put it on this server and you can try calling it and we can see if it makes it here.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
User avatar
jack
Thermionic Monk Status
Posts: 5493
Joined: Wed Dec 29, 2010 8:58 pm
Location: ɐılɐɹʇsnɐ oʇ ƃuıʌoɯ ƃuıɹǝpısuoɔ
Contact:

#6 Re: GPRS mobile modem

Post by jack »

Just seen this. Apologies.

I would use curl to emulate the GET from alternative IPs to check content and acceptance from different sources, e.g. I could do that from here too.

Also, as t'other Nick said, really need the responses... Some hosting companies reject whole AS blocks (I've seen this when using Digital Ocean droplets) - get some examples of your IP address and check against the DNS blacklists using MXToolbox or similar - if the range crops up there, that could explain it...
Vivitur ingenio, caetera mortis erunt
User avatar
ed
retired
Posts: 5384
Joined: Thu Jun 21, 2007 4:01 pm
Location: yorkshire
Contact:

#7 Re: GPRS mobile modem

Post by ed »

This is sorted, I should have mentioned the fact...

Nick kindly lent me the use of his server to ascertain if the problem was related to shared vs dedicated servers......it wasn't...

The problem seemed to revolve around the fact that my modem wasn't forwarding the requests to the server, so I was never getting a reply to analyse any error I was making. It was very touchy to the fact that I was using some documentation which was shy of some pertinent info.....to wit: the double cr/lf after the http parameter(which stopped the modem actually sending) and the fact that I needed a full URL after the GET request and not just the resource URI......it was exasperating because although the servers were not proxied the full URL was required as if they were proxy servers.

In addition, my modem( a chinese copy) was not passing the host para(part of the http line) to the server....I still don't know why this is...but it's academic to me at this point as the whole thing now works.....
There's nowhere you can be that isn't where you're meant to be
Post Reply