GSM/GPRS
Connecting to the Internet via GPRS
by Khaled Raed Sharaf on Feb.06, 2010, under GSM/GPRS
Now lets get this party started!
OK, now we are ready to go into details on how to make an internet connection from the PIC18F450. This sounds fun!
We need some login information that enables us to access the internet. This is called by the network provider “internet settings” , “internet setting file” or something like that. For example if you bought a brand new Nokia phone, and when you insert the SIM card into it, some providers sends the internet settings as soon as they detect that this phone is for the first time to be connected to there network (they do that by IMEI). Other providers, you have to call the customer service so that they send you the internet settings. So, we really need to know the contents of the internet setting file that the provider send so that we can know: APN, username and password.
Before going into details, the first thing that you must do, is call the customer service from the SIM that you are going to use from any cellular phone, and ask them if SIM is GPRS enables or not. Because some providers are not default enabled, so you need to call them first.
What is APN?
It stands for Access Point Name. This name gives you a gateway rout to the network that you want to connect to like WAP or internet or VPN. The question now is how am I going to get the APN of my network provider?
Two ways to get the APN:
Embedded World 2010
by Khaled Raed Sharaf on Jan.27, 2010, under Ethernet, GSM/GPRS, To do list

One of the most known exhibitions for the embedded systems. Located in Nuremberg, Germany and it will start from 2 March 2009. I will do my best to go and attend this exhibition, and so as you.
see you there!
Pause
by Khaled Raed Sharaf on Jan.13, 2010, under GSM/GPRS
I will not post that much this month, as I have FINALS to study for. So just pray for me!
Interfacing the GM862 with PIC18F452
by Khaled Raed Sharaf on Jan.10, 2010, under GSM/GPRS
Interfacing the PIC18F452 with the GM862 module is relatively simple. What will be left is only the code that needs to be burned on the PIC. By the way,no full codes will be posted here. I will only post the codes that will give you a good kick start because I think it is better to understand than to copy and paste. And there is a Chinese saying:
Give a man a fish, you feed him for a day.
Teach him to fish, and you feed him for lifetime.
This is a sample project that I made and it only deals with making phone calls and I will upload other videos for SMS, GPRS and Data Call:
Now looking at the schematics you will find all the details on how to connect both the module and the PIC.

After doing the above connections, you need to start the module first and then initiate the baudrate that both of them will work on. The Telit module works on different values of baudrates (300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200). For me I shall work with baudrate 19200, but you can choose whatever baudrate that you want.
To start the module, you simply connect the ON_OFF pin to the ground for at least 1 sec (note: this pin is normally high). So you can do this by two ways. First way is to connect a switch and give the ON signal by hand, which is not a good idea. The second way which all of you will do, is to let the PIC18F452 do the job of turning the module ON. We will connect a transistor as shown in the schematic (PN2222A) such that when the base voltage is high, it allows the current to pass to the ground. So, you will need to make PORTC.PIN5 to be HIGH for 1 sec and then toggle it back to LOW (safety factor make it 1.1 sec).
So, after initializing the baudrate on the PIC you need to do the following at the start of your program:
while(recieved_serial!='AT;\nOK\r\n'){
send_serial('AT\r');
delay_ms(300); //Delay 300 mSec
}
Level shifter using 74HC4050
by Khaled Raed Sharaf on Jan.09, 2010, under GSM/GPRS
Some people will say that we can reduce the voltage of the PIC18F452 or any type of PIC to 4.1v as it operates from 2.0V to 5.5V. But sadly this is not possible because to run the USART of the PIC18F452 it needs a minimum voltage of 4.9 volt (as far as I know). And we are not allowed to put the 5v input directly to the GM862 because this will ruin the whole module. What need now is a level shifter.
There are many techniques out there that enables you to make a level shifter. I used the 2 of 74HC4050 (Datasheet) and it worked fine with baudrate 19600. When you use these level shifter, one will be from low to high (4.0v ->5.0v) and the other will be from high to low (5.0v -> 4.0).
First we need to test everything is working fine before making any connections. In the IC that is used as a high to low converter; insert 5.0v as an input and check with a voltmeter the reading of the output. If its not 4.0v then you did something wrong with the connections and you need to revise the 74HC4050 connection. And do the vice versa to the second IC.
After the test, you are now ready to connect the PIC18F452.
Before connecting the PIC18F452
by Khaled Raed Sharaf on Jan.08, 2010, under GSM/GPRS
Now we can start working with the GM862 module. Before connecting the microcontroller we have to make sure that the module itself turns on. Basically, what we will do is connect the following pins:
Pin 1,3,5,7 (Vbatt) ——to——> Vdd
Pin 2,4,8 (GND) ——to——> Ground
Pin 45 (RTS) ——to——> Ground
For us to debug this module, we will connect both the STATUS_LED (Pin 39) and PWRMON (Pin 21). These are output pins used to make sure that the module turns ON, look at the schematic to see how we connect the LEDs on these pins. Also, we will connect a normally opened switch where one side is connected to the ground while the other side is connected to the module pin 17 (ON_OFF).
Note in the schematic there are two extra pins (pin 51 & pin 52). These pins I added because when you use the Mikroelektronika board it will come with 52 pins (2 extra pins that are Not Connected – NC).
Powering the GM862
by Khaled Raed Sharaf on Jan.08, 2010, under GSM/GPRS
You might think that your normal power supply that you have in your lab will work fine on the MikroElektronika Board, but this is not always the case. The GM862 Module needs a 2A current spike that it uses when it is registering to the network. If your power supply doesn’t support 2A current then this is what will happen:
“The STATUS_LED flashes a couple of times and after that it turns off. It is like the module never power on. Any clue?” Hector Pinedo
“The STATUS_LED blinks for 5 or 8 times and then after that the module turns off. And in the datasheet it says it should blink every 3 seconds.. So what is wrong here???” Manson
And many others had the same problem (even me
). One of the reasons for such problem is the power supply. So, as we love to do everything with our bare hands, lets first do a power supply that supports the 2A current spike that the GM862 needs.
Types of Telit GM862 QUAD Board
by Khaled Raed Sharaf on Jan.07, 2010, under GSM/GPRS
There are different test boards that you can find online, but some of them can cost as low as $93 and others can go as €500 (that is right Euros which is equivalent to $716) per board. Of course if you are rich enough you will go and buy the $716 board, which I really don’t recommend at all. Why?? Lets see:
1-EasyGSM/GPRS GM862 from mikroElektronika (cost: $93) Click Here
Believe me, it is not as easy as it is named. When you start to work with it for the first time you will find some difficulties that faced me for a month to get it up working. But to tell you the truth this by far the best board for the module to work on, because you will get to do everything by your hand except the connector of the Telit Module (50 Pins) which is surface mounted on the board. So if you do know how to solder surface mounted components and you do know how to make PCBs then go ahead and just only buy the module with the antenna and the connector and do the board yourself. Something to mention, Mikroelektronika sells the Telit module ONLY (without the board) with a very low price ($69 each) compared to other companies that told me that the sell it for $60.5 if I got a 1000 piece
0911_Modules_Accessories from Telic GmbH (Euros)
Starting the blog…
by Khaled Raed Sharaf on Jan.07, 2010, under GSM/GPRS
This is one of the most useful modules that an Engineer or a Designer can try to test out and do some really good applications with it. Sold for a cheap price that any person could buy and try it out, it is widely used in many cellular phones.
In this blog, I will show really how to get this module up working. Also I will show how to make a cellular phone that can make phone calls, send SMS, make voice calls and log on the internet and much more. In other words we can say: Nokia watch out we are coming!
I am more than thankful to Alex Weber (http://tinkerlog.com) who helped me to make this module work and for me I will try to start with what Alex and SJ (http://note19.com) have ended with.
Dealing with this module GM862 is not that of an easy task and believe me, if you messed up in anything or did anything wrong, the module will burn and you will not be able to make it turn ON again.
So be caution when you work with this module as it is kind of tricky when you work with it.
I will post all the problems that I faced and you will most probably face when you get your leg into it.
In the end I will try to make this blog as a reference to everybody for dealing with this module and with other modules as well.
And if you have any questions regarding this module please don’t hesitate to ask.
Best of Luck!


