[MAN102]


Send a SMS message to a cell phone using a Bluetree GPRS modem
and
 CuTOUCH™

 So, one day I was looking through the web and saw that there were a lot of GPRS applications for industrial applications. 
Through a request from one of our customers,
I decided to buy a GPRS modem from Bluetree, it cost me $200 out of my pocket.
 
The modem I got was called the Bluetree M2M Express shown here:



 

Connecting POWER

First, you will need to hook up power to the M2M modem. 
If you look on the back of it, you will see a 4-pin power connector as shown here:

Now, if you read the user manual of the Bluetree GPRS modem,
you will see that the green is not used.
 
Simply connect the red and white wire to 12V + and black to GND – as shown here:

(Note: You can also use anywhere between 8 to 30VDC, but the manual says 12V is the best)



 

Inserting SIM card

 Well since I have Cingular Wireless for my phone,
I decided to take my SIM card to some good embedded technology use.

 If you have Verizon or Sprint,
you probably don’t have a SIM card so you will need to get an activation of some sort with a telecommunication company.
Please contact Bluetree or your GPRS modem dealer for more information.

Now, if you have Cingular or T-mobile as your cell phone carrier, you are in luck. 
They all use SIM cards.

Now, please disassemble your cell phone like I did here:

You should fine a SIM card.

Now, open up the SIM Card slot as shown here and insert your SIM card!



 

RS232 Null-Modem Cabling

 You will need to somehow connect your CuTOUCH to the serial port of the GPRS modem.
 I made my own (which took me over 5 hours!!!). 
Yes, this was the hardest part for me, connecting bunch of wires together.

Well to make your own, simply get 2 MALE serial port ends,
then connect Pin 5 (GND) together and then cross RX & TX.

In the above picture,
I simply cut out two MALE ends of 2 serial ports
and connected Ground (Green) together w/ crossed TX (Red) & RX (Orange) like shown in above picture.
 

Please note that color may differ among serial cable manufacturers. 

 Okay, when you have your null-modem done, you should have something like this:



Fun STUFF

Now for the real fun stuff,
connect the null-modem cable you made and connect to Channel 1 of CuTOUCH
and the serial port of the GPRS modem as shown above.

 Now make sure your GPRS modem is ON and your CuTOUCH is ON. 
Open up CublocStudio and load the Bluetree sample program:

(bluetree.cul)

Now, run and download the program into your CuTOUCH unit.

 

You should see the following on the debug screen:

 And the following CuTOUCH screen:

You might errors with the last command if you have bad signal or you just turned ON the GPRS modem. 
So just give it a minute and try resetting the CuTOUCH program and it should work.

There are other variables that could go wrong, but I won’t go into detail today.
The commands I’ve used here are AT modem commands for GPRS modems. 
They have a standard and should be compatible
with most GPRS modems and cell phones too if they have serial outputs.

AT command is for testing if the GPRS modem responds correctly.

AT+CMGF=1 puts the modem in text mode.

AT+CMGS=”6507039473” sends a text message to my boss’s cell phone to bring the Sony camera
so I can finish this app.
 
(The message must end w/ Ctrl + Z or ASCII code 26)

 

If the message is sent correctly, you should get some kind of +CMGS: 147 and OK message.

(Above shows text message received on the cell phone)

Now, I challenge you to further this app and make a touch-screen menu for different messages and numbers. 
(Yes, you can make a phone number list & different love messages for your honey!)

So next time you want to make a Touch-screen app using a GPRS modem,
you can do it, just don’t spend 5 hours making a null-modem like I did.
J



If you are having any trouble with above app, please e-mail max@zedomax.com

If you have any cool apps you'd like to blog, please e-mail to max@zedomax.com