Hi,
I have CR800 and I try to control it with PPP connection from RS-232 port. I defined PPP dial command, correctly. Unfortunately, I couldn't take an IP from the server.
Inr der to debug my problem, at first, I connected my Siemens MC39i modem to hyper terminal and wrote my dial string directly to the modem. I saw connect string. My strings works...
Secondly, I connected my CR800 to the hyper terminal and listened the port. Output was very strange:
AAAAAAAAA+++AAAAAAAAAAAAA+++AAAAAAAAAAAA+++AAAAAAAAA....
Of course, "+++" means entering the data mode for modem. But, I couldn't understand the meaning of the "AAAAAAAAA" between them. Also, I couldn't see my PPP dial string
BTW, I out the last version OS and I use DevConfig version 1.5
Please advice a debugging method or a solution to connect my CR800 via PPP method form RS-232 port.
Thanks for your help.
semih
The AAAA is the logger sending repeated A's. It expects the modem to echo the A. If it does not it keeps sending them with the occasional +++ to try to wake up the modem.
Make sure your modem is set to Echo otherwise this is what you see. Please give more details of the connection so we can give more help.
Thnks for our answer.
I checked my modem. Echo was set (ATE1) in default mode but I couldn't establish a link.
I have a simple connection. CR800 --> Siemens MC39i GPRS modem --> my ftp server. I wrote my code.
Please advice a solution.
The main part of my code is here:
'Main Program
BeginProg
SetStatus ("USRDriveSize",3000000)
Scan (5,Min,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
SMIPI 'Read Serial IPI string
CallTable IPI
'APN connection
P1Open=PPPOpen
If P1Open <> "0.0.0" Then Flag = true
'FTP
If Flag = true Then
NameLength = Len(LastFileName)
OutputFileName= REMOTE_PATH + Mid(LastFileName,5,NameLength) FTPSuccess=FTPClient(IPAddress,User,Password,LastFileName,OutputFileName,0)
EndIf
PPPClose
NextScan
EndProg
Your program will not work as it is as PPPOpen will return "0.0.0.0" if there is no connection. However, before you do more diagnostics try removing the PPPClose statement in your program and then monitor the status table of the logger (refreshing occasionally). Check if your PPP connection is working by the presence of some valid IP addresses in the IPInfo field. If this sticks at 0.0.0.0 then either your username, password, dialstring or similar are wrong or the SIM has not been enabled for GPRS.
Thanks,
Yes you are right. I added this extra control to the code. I am sure that:
-Dıal string is correct
-SIM has been enable for GPRS
I guess my problem is between modem and CR800. Before my dial string, CR800 try to send extra code like "AAAAAAA+++++AAAAAA". How can I stop this extra code? May I use different GPRS modems than Champbell supported GPRS modems?
The logger will send AAAAAA etc with any GPRS modem if it does not echo back the first A (which is standard "Hayes" modem dialling protocol). You cannot stop that code except by having a modem that responds as it should.
If the modem is connected correctly to the logger it will not send these strings but simply send the dial command you specify (the first letter of which is normally "A").
Can I suggest you check the wiring between the modem and the logger. You will need some form of null modem cable or interface if connecting to the CS I/O port.
We do have people using modems other than those we supply for GPRS use. If you buy the package from us though it normally works out of the box.
* Last updated by: aps on 7/28/2010 @ 8:03 AM *
Thanks for your ideas.
At first I have null modem cable between RS232 and my modem Siemens MC39i
I guess I found the problem. When I entered the following command to the modem from hyper terminal, I can establish a link:
at+cgdcont=1,"ip","tubidep"
atdt*99***1#
But, I can't enter the following command to the modem from hyper terminal:
at+cgdcont=1,"ip","tubidep";atd*99***1#
It gives an error. Unfortunately, I can't enter two line command in devconfig program for ppp dial string.
How can I enter many lines for PPP dial string in CR800? Are there any specific command like "\cr" or "CHR(13)"?
thanks for your help.
semih
The logger does send the dial commands as separate lines, splitting them when it finds the ";" and appending a CR to the end of the command.
There are two possible problems. Either (i) the modem does not like repeat setting of the CGDCont setting (this has been seen) - a second attempt returns and error code OR (ii) it needs some delay after receiving the setting (possibly because it is saving the setting in flash memory) before it will accept another command. You can force a delay by repeating the ";" several times between the two commands. The logger will wait about one second for each ";".
If all else fails set the CGDCONT setting in the modem using hyperterminal (as you have done). Most modems will remember this setting through power cycles etc. If this works then you can just use the second command alone.
Make sure the connect response you enter matches that the modem sends on connection. "CONNECT" will do if the modem is set in verbose mode, if in numeric mode, the response can vary.