Sensor<--->Datalogger<--RS232-->GPRS/GSM Modem<--->Computer

Status
Not open for further replies.

100darsad

Newbie level 2
Joined
May 4, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,293
I'm a "Modem GPRS / GSM" and a "Data logger-Model: OPUS200"
How do I receive or send data through the "TCP / IP"
"AT Command" Please help.
apn:mtnirancell
port:9201

Sensor<--->Datalogger<--RS232-->GPRS/GSM Modem<--->Computer

Thanks!
 

1st be ensure your modem has built in TCP/IP stack. if it hasn't then you can send any kinds of data by AT command with out making TCP stack in your micrcontroller. if it has built in TCP/IP stack then you can try..


Code ASM - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
>> AT+CGATT=1   - Attach to GPRS Service
<< OK
 
>> AT+CGDCONT=1,"IP","wap.cingular"     - Define PDP Context (cid, PDP type, APN)
<< OK
 
>> AT+CDNSCFG="208.67.222.222","208.67.220.220" - Configure Domain Name Server (primary DNS, secondary DNS)
<< OK
 
>> AT+CSTT="wap.cingular","wap@cingulargprs.com","cingular1" - Start Task & set APN, User ID, and password
<< OK
 
>> AT+CIICR     - Bring up wireless connection with GPRS - THIS MAY TAKE A WHILE
<< OK
 
>> AT+CIFSR             - Get Local IP address
<< 10.190.245.172       - returns IP address assigned to your module
<< OK
 
>> AT+CIPSTATUS         - Get Connection Status
<< OK
<< STATE: IP STATUS     - returns status of connection, needs to be 'IP STATUS' before you can connect to a server



After you have context, you need to make a connection to the server and then send your data.


Code ASM - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
>> AT+CIPHEAD=1         - Tells module to add an 'IP Header' to receive data
<< OK
 
>> AT+CDNSORIP=1        - Indicates whether connection request will be IP address (0), or domain name (1)
<< OK
 
>> AT+CIPSTART="TCP","www.google.com","80" - Start up TCP connection (mode, IP address/name, port)
<< OK
<< CONNECT OK           - Indicates you've connected to the server - IT MAKE TAKE A WHILE FOR THIS TO BE RETURNED
 
>> AT+CIPSEND           - Issue Send Command
<< >                              - wait for module to return'>' to indicate it's ready to receive data
>> GET / HTTP/1.1       - Send data - this example is an HTTP request for the default page 
>> Host: [url=https://www.google.com]Google[/url]
>> Connection: Keep-Alive
>> Accept: */*
>> Accept-Language: en-us
>> 
<< data from server returned - Server will return data here



To more: https://www.edaboard.com/threads/147142/
 

the modem that i am using for connecting to pc isnot working with wireless it is kind of GPRS Modem
plz answer me as soon possible
 

Apart from the unclear communication topology in the original question, some guesses can be made:

Data logger OPUS200 has a serial interface and supports connection through a modem as an option. To determine the available communications variants, you have to check the instrument specification thoroughly. Most devices are only prepared for a passive circuit switched dial-in connection and won't support GPRS respectively TCP based connections. They either can configure the modem to accept incomming data calls, or don't configure anything and rely on a fixed modem configuration, even a fixed baud rate. In the latter case, the manufacturer will typically require a particular modem type to be connected with the device.

GPRS support would require a considerable software overhead built to the data logger. It must be clearly specified in the product datasheet and users manual.

P.S.:
the modem that i am using for connecting to pc isnot working with wireless it is kind of GPRS Modem
GPRS is in fact a wireless protocol (spell "general packet radio service"). It's not clear what you want to achieve. Just referring to your chain "schematic". Are there two RS232 connectors at the modem? Otherwise please correct it.

My guess would be GPRS at the data logger and wired internet connection of the PC. As I explained above, you have to care for GPRS support of the data logger.
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…