SIM900 Module interfacing with PC / uC

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to interface GPRS via my SIM900 with Atmega8.

I think if it's first interfacd with hyperterminal then it'll be easy to interface with Atmega8.

I've found SIM900 GPRS Application but didn't found a good one.

Where to start for communicating between SIM900 Module & Hyprterminal of PC.

Thank You,
Suket.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well it's going to start by learning how to use the UART in the mega8. There are tutorials about this in the Tutorial Forum here.

I would suggest you don't attempt to get the mega8 talking directly to the SIM900 to start. Take each bit in isolation and get that working first. So for the SIM900 connect it to your PC and make sure you understand what AT commands and what procedures you need to make it do what you want.

Next connect the mega8 to a PC (this may involve a MAX232 level converter) and make sure you can get it to talk to your terminal program too. Only when you are comfortable with both should you connect mega8 to SIM900 and see if you can get those same PC based commands/procedures to work when issued/received by the mega8.

By the way an 8K micro can be "tight" for holding all the code you need to talk to a complex modem like a SIM900 though I guess it depends what you plan to use it for.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep , thanks it's done finally.

The server side code is written as explained in Computer Networks book by tanenbaum.

Online resource available at:

Quote:
http://authors.phptr.com/tanenbaumcn4/

Figures Containing programs -> server.c


It's written to receive file from client, you can modify it to read any message instead of the whole file.

And in the module side, the code can be written to establish GPRS communication as below:

http://www.otto.co.za/store/data...

Suket

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello!

I would like to receive string from SIM900 ( http://www.simcom.us/product_detail.php?cid=1&pid=37 ) module.
For example send: AT+GSN (get imei)
Reply: +GSN<cr><lf>0123456789<cr><lf><cr><lf>OK<cr><lf>

Problem is that I don't know the length of the string, because any reply any length. And sometimes there are another answer instead of OK, for example ERROR or something.

Do you have any ide to receive?
There are a PIN at SIM900 which is HIGH (or LOW) when it send me a string (not character, string!?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Resistor wrote:
Do you have any idea to receive?

Yes: use a State Machine (aka Finite State Machine; FSM; Finite State Automaton)

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is a good example of using a State Machine to decode a text stream:

http://www.visualgps.net/WhitePapers/NMEAParser/NMEAParser.html

(the particular example is GPS NMEA strings - but the principle is general)

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...