Pic to GSM Phone connection (HSerin problems)


Closed Thread
Results 1 to 40 of 289

Hybrid View

  1. #1
    aruran's Avatar
    aruran Guest

    Default

    Quote Originally Posted by NavMicroSystems
    aruran,

    it would be nice if you would share youre code.
    Hai NavMicro,

    Sorry for the delayed response. I was involved in the project in another part..So I couldn't concentrate on the SMS sending part as it is almost finished.

    I have finished the PBP coding to send SMS using a Ericsson T10. It uses PDU mode since T10 supports AT command for PDU mode. So help from bitmaniac's PBP file helped me.
    I have attached the file.

    I also want to develop this to be integrated into a Embedded IP module for my project. I want to know how can I make this SMS sender to send sms when a centrallized MCU gives an interrupt and then the datas such as message, recepient number and so on are fed from that centrallized MCU to the MCU that controlling sending sms.

    Some people say that the PBP is not good for interrupt handling, and ASM codes inserted may be of use. Have anybody got any idea....

    thanks
    aruran
    Attached Files Attached Files
    Last edited by aruran; - 16th August 2005 at 17:47.

  2. #2
    Airrr's Avatar
    Airrr Guest

    Default oh no!

    i've read this thread a few times, but it wont work at all!
    nokia 6210 connected with RX to PIC 16f84a port b.1
    gnd2gnd

    now thats the programm

    SerOut2 PORTB.1, 396,["AT", 13, 10]
    Pause 1000
    SerOut2 PORTB.1, 396,["AT+CMGF=1", 13, 10]
    Pause 500
    SerOut2 PORTB.1, 396,["AT+CMGS=", 34, "+972544567209", 34, 13, 10]
    Pause 500
    SerOut2 PORTB.1, 396,["Test-message", 13, 10]
    Pause 500

    i tryed 8mhz crystal and 12mhz
    pic sends some pulses out, but mobile just do nothing
    is it a wrong programm or what?

    ps, i need simply to send SMS.
    i think i missed something important..
    Last edited by Airrr; - 1st September 2005 at 02:59.

  3. #3
    Join Date
    Jan 2004
    Location
    Thessaloniki , GREECE
    Posts
    61

    Wink

    First of all I would like to say a big HELLO! to all of you.

    I was out of this forum for some months and I really like the fact that this topic is of so great interest , while I am back.

    SO back to PICs again..

    Airrr:
    I would advice you to read all the related topics about sending sms with Gsm ,
    so to take an idea of how this works.
    But to make you start:
    A simple way to test if your phone is working ok (making sure you have checked the connections) you can connect it to your PC serial port and try sending AT commands using a terminal program like HyperTerminal for example
    (set speed 9600,8,n,1)
    OF COURSE YOU HAVE TO USE A RS232 LEVEL CONVERTER as your serial port
    works with rs232 level volt (+-12v) and your Nokia ecpects TTL level volt (+-5v).

    Second, as reading your code I noticed that you are trying to use NOKIA 6210 in 'text mode' and I am not sure that 6210 supports text mode.
    I think it only supports PDU mode but I am not 100% sure.
    You have to encode your text sms in PDU format in order to 'feed' it to your phone trough AT commands which is a complex procedure with pic but IT IS possible -please read through the topic to get an idea.

    I hope I have helped you a little

    AGAIN A BIG HELLO TO ALL OF YOU!

  4. #4
    Airrr's Avatar
    Airrr Guest

    Talking

    i have made this circuit for interfacing rs232 to nokia
    http://pinouts.ru/images/cable_cell2.gif
    now im starting huper terminal, 9600, com1, 8,n,1, connected xx:xx:xx and
    i can't type anything, pressing on keys don't display nothing, but schematic works fine with logo manager as f-bus cable.
    ? how it could be? logo manager works, does it meen cable is OK?

    after few hours i have sucesfully send msg from hyper terminal. now some other questions
    1: is it so necessary to use pic on mbus? if so, my project has to be double pic'ed
    2: finaly project uses a 9210 mobile, but seems like communicator dont recognize pic on mbus (debug led on pic remains off all the time)? 6210 works, but now i need to do the same with 9210.. any suggestions?
    Last edited by Airrr; - 2nd September 2005 at 06:03.

  5. #5
    Join Date
    Sep 2005
    Location
    Switzerland
    Posts
    46

    Default

    Quote Originally Posted by Airrr
    i have made this circuit for interfacing rs232 to nokia .....

    after few hours i have sucesfully send msg from hyper terminal. now some other questions
    I have the same problem with hyperTerm, how were you able to send AT cmds ?

    Thanks
    Lotondo

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170

    Default

    Quote Originally Posted by Lotondo
    I have the same problem with hyperTerm, how were you able to send AT cmds ?

    If you follow the thread from the top, you will find out how. Anyways, just type the commnds that are relative to the phone being used: AT+CMSG etc...

    Look the manual of your phone and then type them in your terminal. You can also set your modem to ASCII and not PDU format which is more convinient.

    Ioannis

  7. #7
    Airrr's Avatar
    Airrr Guest

    Default

    Lotondo: like on the schematic abowe, u have to use pic connected to m-bus and if its working good, phone will connect to terminal...

  8. #8
    Join Date
    Apr 2005
    Posts
    17

    Default

    Quote Originally Posted by Airrr
    i've read this thread a few times, but it wont work at all!
    nokia 6210 connected with RX to PIC 16f84a port b.1
    gnd2gnd

    now thats the programm

    SerOut2 PORTB.1, 396,["AT", 13, 10]
    Pause 1000
    SerOut2 PORTB.1, 396,["AT+CMGF=1", 13, 10]
    Pause 500
    SerOut2 PORTB.1, 396,["AT+CMGS=", 34, "+972544567209", 34, 13, 10]
    Pause 500
    SerOut2 PORTB.1, 396,["Test-message", 13, 10]
    Pause 500

    i tryed 8mhz crystal and 12mhz
    pic sends some pulses out, but mobile just do nothing
    is it a wrong programm or what?

    ps, i need simply to send SMS.
    i think i missed something important..
    I succesfully done it using this code..

    Device 16F84A
    Declare Xtal = 4

    Symbol BAUD = 84 ' 9600,8,N,1(True,driven)
    SYMBOL LED = PORTB.2 ' Assign PortB.2 for Status LED
    Symbol TX = PORTB.1 ' TX to Phone
    Symbol RX = PORTA.0 ' RX from Phone

    Start:

    SerOut2 TX, BAUD,["AT",13]
    DelayMS 500
    SerOut2 TX, BAUD, ["AT+CMGF=1",13] ' Use TXT Mode
    LOW LED ' Turn OFF Status LED
    DelayMS 1000 ' Pause for 1 second
    HIGH LED ' Turn ON Status LED
    SerOut2 TX, BAUD,["AT+CMGS=",34,"Recipient Phone Number",34,13]' Prepare the recipient Phone Number
    DelayMS 1000 ' Pause for 1 Second
    SerOut2 TX, BAUD,["TEST Message!!",13] ' The message to be sent
    DelayMS 1000 ' Pause for 1 second
    SerOut2 TX, BAUD,[26] ' Terminate message with Control+Z (26)
    LOW LED ' Turn OFF Status LED
    DelayMS 1000
    Goto Start ' Repeat
    End

    What i did is some sort of SMS bomber...look for the circuit I posted before to make this code works..
    Notice that all it does is send..TX. I dont process any message I received so RX was not used.
    BR
    Last edited by kasamiko; - 5th September 2005 at 03:35.

  9. #9
    Join Date
    Sep 2005
    Location
    Switzerland
    Posts
    46

    Default

    Kasamiko,

    thanks for sharing your project.
    I built it according to your above schema but the test I did had no success.
    The pics receive 2.8 V. from the phone, is that enough ?
    IC2 has your software with my data (phone nr. + text)
    IC1 has the the software found at http://www.atrox.at/datacable/dlr3/dlr1.hex
    LED1 is always flashing
    LED2 is just flashing once.
    Could you pls. tell me the pic config (osc, wdt, pwrt) ?
    What's the purpose of diode zener (D5 2.7) ?
    Thanks your or anyone else support.

    Lotondo

  10. #10
    Join Date
    Apr 2005
    Posts
    17

    Default

    That circuit is drawing power from the phone..2.8VDC is enough since this is the maximum the phone can supply. Please remove that zener Diode that was left when I was experimenting powering it with external power supply.
    I think you have the problem with the HEX you used for the DLR-3P part since LED1 will light steadily. You used the wrong HEX! this is the link for the 8 Mhz version..http://www.atrox.at/datacable/dlr3/dlr2.hex
    LED2 will continously blink meaning it is sending SMS.

  11. #11
    Join Date
    Sep 2005
    Location
    Switzerland
    Posts
    46

    Default

    Kasamiko,
    thanks for answering.
    I did what you said.
    Now the LED1 is always on and not flashing like before. This should be ok.
    Led 2 is just flashing once cause I turn the loop off.
    Till here should be everything correct but I dont receive any sms on the
    other cellphone.
    Testing my phone (7110) with a DLR3P cable (Nokia cable) and hyperterm I noticed that it worked only at 19200 baud. I knew that it should also work with a lower baud but it did not. Maybe it's the DLR3P cable that 'force' it works at 19200.
    Btw here is "my" code pls have a look.
    Thanks again for any further help.
    Lotondo

    ;Device 16F84A
    DEFINE OSC 4

    BAUD VAR BYTE
    LED VAR PORTB.2 ' Assign PortB.2 for Status LED
    TX VAR PORTB.1 ' TX to Phone
    RX VAR PORTA.0 ' RX from Phone

    BAUD = 84 ' 9600,8,N,1(True,driven)

    Start:

    SerOut2 TX, BAUD,["AT",13]
    Pause 500
    SerOut2 TX, BAUD, ["AT+CMGF=1",13] ' Use TXT Mode
    Low LED ' Turn OFF Status LED
    Pause 1000 ' Pause for 1 second
    High LED ' Turn ON Status LED
    SerOut2 TX, BAUD,["AT+CMGS=",34,"0761111111",34,13]' Prepare the recipient Phone Number
    Pause 1000 ' Pause for 1 Second
    SerOut2 TX, BAUD,["TEST Message!!",13] ' The message to be sent
    Pause 1000 ' Pause for 1 second
    SerOut2 TX, BAUD,[26] ' Terminate message with Control+Z (26)
    Low LED ' Turn OFF Status LED
    Pause 1000
    ;GoTo Start ' Repeat
    End

  12. #12
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170

    Default

    Hi!

    All phones default on power up to Autobaud mode. The first connection defines the speed from that moment on upt to the next power up.

    This is over ruled only if you define explicitly and store to the phone's memory the speed to use.

    So, in your case may be you did a connection with the mobile at 19200 with the Hyperterminal and then without reseting the mobile, did you connected to the PIC circuit? Are you sure the mobile does autobaud at power up?

    Ioannis

  13. #13
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170

    Default

    Hi!

    All phones default on power up to Autobaud mode. The first connection defines the speed from that moment on upt to the next power up.

    This is over ruled only if you define explicitly and store to the phone's memory the speed to use.

    So, in your case may be you did a connection with the mobile at 19200 with the Hyperterminal and then without reseting the mobile, did you connected to the PIC circuit? Are you sure the mobile does autobaud at power up? If it does then you should send an AT command without any parameters to sync the mobile to the speed you set in the beginning of your program.

    Ioannis

Similar Threads

  1. Serial VB 2005 pic 16f877a problems
    By Snap in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 8th July 2013, 01:52
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 15:46
  3. problem with the GSM controller
    By Dariolo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2009, 21:33
  4. Automatic VB6 to pic serial connection
    By arniepj in forum Code Examples
    Replies: 13
    Last Post: - 10th January 2008, 08:57
  5. Pic to GSM Phone connection
    By samertop in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th July 2005, 14:40

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts