Pages

Wednesday, December 31, 2014

Arduino Duemilanove + GSM shield, trouble and solution

If you are a beginner in Arduino,  GSM shield, and have failed to use those for sending/receiving SMS, or calling/receiving a call, I can give you a bit of help. Maybe a lot depends on your previous skill level.

You will be able to find a lot of instructions for Arduino Uno + GSM shield. But for any reason, I could not find one good instruction explaining Duemilanove + GSM. Now, after I figure it out, it makes sense because Uno and Duemilanove are almost identical. However, although Arduino experts would understand this GSM instruction without a question, there are so many things which do not make sense to me at all, such as: (and I strongly believe that it is not just my fault as you can see below)
Figure 1. On the left (GSM shield), it clearly says that 'pins 0 & 1' are not connected! HOWEVER, when you connect the GSM shield onto Duemilanove, the GSM pins 0 & 1 are mounted onto the Duemilanove pins 0 & 1. As you can see in Figure 2!
Figure 2. See the bottom left side of picture (right above orange half circle). As you can see, I connect the GSM pins 0 & 1 with the Duemilanove pins 0 & 1. Why, why, and why the official instruction says "not connected"? I really want to know why they mentioned it. But I can confirm that you NEED to connect them. 
Also, there is one more weird instruction I found (please see Figure 3) below:
Figure 3. Check out the difference of TX/RX labels between pictures from the official website (left) and mine (right). Although left official picture says that Pin 2 = RX, actually, my shield Pin 2 is labeled as TX. 
In Figure 3, the pin 2 is actually labeled as GSM TX (not GSM RX as shown in the official website). I was extremely confused. But please ignore the difference. Just mount the GSM shield to Duemilanove.

I also had a problem with Sim card. I need to explain more about this problem. I don't have a phone using the same size of Sim card. I purchased Sim card from the Ebay and activated on AT&T GoPhone website. As soon as you activated the card (by adding Sim card number and IMEI number of the GSM shield), it automatically changed the Sim card Pin number!!Very annoying!!!!! At this point, only way you can add money to the card is by calling the company. However, you still need a phone using the Sim card to have a PIN number. I called three time, and all AT&T representatives ask me for finding a AT&T phone to get a PIN number. You may think we can receive the number by connecting the shield and Arduino to our computer. However, to run the Arduino 'ReceiveSMS.ino', we need to type 'pinnumber' which I didn't have.

So, what I recommend is simple: just go to AT&T store and explain that you need PIN number. I ended up replacing the SIM card.

Finally, I found that we need to type pin number in Arduino IDE (instruction). On the second line of the instruction, if you have PIN number (e.g., 1234), you need to remove quotation marks!!!!
So, instead of below
#define PINNUMBER ""
you need to type
#define PINNUMBER 1234

The PINNUMBER command line is the only line you need to change. I found some instructions to remove the pin number, but I don't know yet.

I hope this instruction help you.
Figure 4. This image shows another side of Figure 2.