PDA

View Full Version : Read & Send SMS from a Mobile using PIC Microcontroller



Chakkarapani
- 3rd October 2007, 15:46
Hi, Please help me out if u find any solution. . .

I want to read an SMS i received in the mobile phone using the PIC microcontroller.
I found many article stating that using Fbus we can send and receive SMS with the help of AT commands. Also i found that Septet has to be converted in to octet.
My problem is how i will convert it and interpret it. Is it i have to manipulate with the program what i write? or anyother logic is behind that...
My ultimate aim in my project is to enhance mobility, so i am not using any PC here.
whatever the site i visited, it is providing interface through hyperterminal for using AT commands...
how can i use AT commands through microcontroller?
Please provide me some solutions...

isaac
- 4th October 2007, 14:11
Here are a few question to help you get the best from the forum

1. What Phone are you going to use
2. Text Mode or PDU

Remember not all phones support Text Mode but its mush easier to use than Pdu.

Chakkarapani
- 5th October 2007, 09:48
I am using Nokia mobile phone and PDU mode.

Please helpme out . . .
regards,Chakra.

abicash
- 18th October 2007, 15:29
Hi
You can check www.ucdevelopers.page.tl for a detailed understanding of the NOKIA FBUS for a newbie. It is written for interfacing to AT89S52 but can be easily ported to PIC
Check the excel sheet which can explain the few commands of FBUS reqd for SMS control.

Chakkarapani
- 26th October 2007, 06:50
Hi, Initially i made the circuit on a general purpose PCB for interfacing mobile and PC to have exercise on AT commands and to know how it works.then i connected my Nokia 3315 and PC-COm with this circuit,my hyperterminal is not responding to any of the AT Commands.
I am unable to find whether my mobile modem is responding or not.
I kept my hyper terminal settings as;
115200 baud
no parity
one stop bits
flow control is none
8 data bits

And i am not much clear about that setting of DTR and clearing of RTS;
how to do that?

I used the ckt which has been shown here;

http://www.forosdeelectronica.com/about2.html

is the ckt is right?

what changes i should make to get a response from hyperterminal for AT.

Please help me out...

abicash
- 27th October 2007, 05:14
Hi Chakra
Nokia 3315 doesnt support AT commands.Its made up with a special protocol called FBUS protocol.Its a bit difficult.But see my earlier post on this for the link where u can understand this.Get back if u have any problem.

Chakkarapani
- 29th October 2007, 05:31
Thankyou for your information abicash.
I am having a 3310 mobile also with me i tested with that mobile also i am not getting it.
I would like to know what is the exact voltage level on which the mobile phone is working?
Also I would like to know whether the ckt what i used will work fine or not?

One more thing i purchased that serial cable, you are saying that we have to set DTR and clear RTS to power up the cable, i am not getting it clearly. is that i should open the cable end to do so? And if it is so how can i do it?

I just purchased the cable and connected with the mobile phone, i am not getting any response from that!

Please help me out abicash...

Chakkarapani
- 29th October 2007, 07:07
Please confirm me can Nokia 3310 support AT Commands?

http://discussion.forum.nokia.com/forum/showthread.php?s=&threadid=15433

In the above link they are saying Nokia 3310 doesn't support...

muddy0409
- 3rd April 2008, 08:55
After wading thru piles of info on Nokia and AT commands, I found (can't remember exactly where) that you cannot simply do AT commands to tell a Nokia to send SMS messages. This resulted in my trrowing away my plans to use Nokia gear and moving over to Sony Ericsson, MUCH easier to work with considering their AT command set DIRECTLY controls their onboard modem directly.

aratti
- 10th January 2009, 10:44
Chakkarapani, you are not saying much about your hardware. I hope you have used a max3232 to connect the Fbus to the PC otherwise you have burned the Rx line. (Fbus is 3.3 Volts)

http://www.datasheetcatalog.org/datasheet/texasinstruments/max3232.pdf

Most of the AT command (not all) works also with Fbus.

Alberto

abbas.khodaeian
- 5th April 2009, 15:52
Hi friends,
I'm in the same way to perform this project with PIC and Nokia 3310.
But i find out the PIC 16F84A only can support the 9600 bps Baudrate and less than it. But the nokia 3310 FBUS, only can support the 115200 bps baudrate.

which PIC micro have this buadrate, that i can connect it to nokia?

we know, to open the bus between the nokia and PIC, we must to send 'U' 128 times. and then the bus is opened to communicate data between them selfs.

any Idea for this? for the same baud rate of nokia 3310 in PIC?

thanks in advanced.

aratti
- 5th April 2009, 23:58
Use a pic 18Fxxxx like 18F2585 for instance, with a 40 Mhz xtal oscillator.

Here the setting for the EUSART @ 115200,n,8,2 (Obtained with Mister E PicMulticalc)


RCSTA = $90 ' Enable serial port & continuous receive
TXSTA = $24 ' Enable transmit, BRGH = 1
SPBRG = 86 ' 115200 Baud @ 40MHz, -0,22%
SPBRGH = 0
BAUDCON.3 = 1 ' Enable 16 bit baudrate generator

Al.

sahin5002
- 6th April 2009, 08:50
Chakkarapani, you are not saying much about your hardware. I hope you have used a max3232 to connect the Fbus to the PC otherwise you have burned the Rx line. (Fbus is 3.3 Volts)

Alberto

Hi aratti , Can you please give me a schematic for connecting SIM300CZ (www.sim.com) and pic 16F877A. mainly the Tx Rx line

aratti
- 6th April 2009, 13:10
sahin5002, I am posting a schematic where I have modified the pin out to fit your 16F877. Since you are using a 3 volts modem you must be very carefull to connect it to the pic. The modem Tx can be connected to the Rx (input) directly without any problem, while the modem Rx must be connected to the pic via a resistors partition so that the TTL (5 Volts) will be reduced of 1/3 prior to input it to the modem. The rest of the pin out has been made compatibile with my project SMS IO Controller, but you can change them as you like to suit your need.
If you want to give a look to my project you can find it @ http://techni.caliti.es/blog/2008/12/sms-io-controller.html.

Al.

abbas.khodaeian
- 6th April 2009, 22:38
Use a pic 18Fxxxx like 18F2585 for instance, with a 40 Mhz xtal oscillator.

Here the setting for the EUSART @ 115200,n,8,2 (Obtained with Mister E PicMulticalc)


RCSTA = $90 ' Enable serial port & continuous receive
TXSTA = $24 ' Enable transmit, BRGH = 1
SPBRG = 86 ' 115200 Baud @ 40MHz, -0,22%
SPBRGH = 0
BAUDCON.3 = 1 ' Enable 16 bit baudrate generator

Al.

hey dear atari, thanks for ur replay, but i need 115200 baudrate, 8 bit data, no parity and 1 stop bit.

i don't need the high frequency for processing, but i need high baud rate to communicate with the nokia 3310, if i can do this with the PIC16f84A or other 16 series for example 16F877A(40 Pin)

i need to reach this baud rate(115200) to do my project.

i can't use the other PIC, because i need to complete my proj earliyer. and if i use the other pic, i need to learn about them, and i don't have enough time.

Please help, if u can. thanks in advanced.

abbas.khodaeian
- 6th April 2009, 22:43
Excuse me, i have some mistake about spelling your name, i'm so ashamed of this.

aratti
- 6th April 2009, 23:53
abbas.khodaeian, I am sorry but you cannot reach an acceptable boudrate of 115200 with 16F series even with a 20 Mhz oscillator.

If you want to use the 16F84a, then you must change the phone type and use a brand with boudrate @ 9600 (siemens for instance. make sure they work in text mode)



i don't need the high frequency for processing, but i need high baud rate to communicate with the nokia 3310

The high frequency clock and the pic 18F are necessary to reach the high boudrate required by your nokia 3310.

Al.

mister_e
- 7th April 2009, 00:07
mostly right, but no cigar. You can reach a really decent baudrate accuracy, if you pick the right crystal. 11.059MHz, 14.745MHz and other Baudrate Vouched speed (you know those we often forget :D ) would do the trick with a regular USART (not with built-in bit banging solution.. even though 8 MHZ would probably work fine with DEBUG)

No pain no gain, those crystal speed aren't "standard value", well not listed in PBP supported list, so you'll need to tweak you delay, if your application is timing sensitive.

abbas.khodaeian
- 7th April 2009, 22:46
Hello, dear mister_e and aratti,
thanks for your replay. I will test both of your expert and your idea, but i think the mister_e have been right, if i will select the right crystal, i can reach the desire boud rate, and can do it for my project, and use the right pin of USART madule in PIC16, i can connect and get data in 115200 bps of my nokia 3310.

i will test it, and then i will replay the result to you.
thanks.