Pic to GSM Phone connection (HSerin problems) - Page 3


Closed Thread
Page 3 of 3 FirstFirst 123
Results 81 to 120 of 289

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57

    Default

    Hai, could anybody help me on how to built a device (pic) connected to handphone and pc where i can control input just by sending sms. i already search through internet and iam trying to built one. could anybody help me. i want to use PIC16F84A as the controller as iam doing alot of thing with this MCU and control by nokia 3310. may be somebody could provide me the step and all the hex file that i need to built one. i interested on this project but have lack of experience!
    please give me a guide

  2. #2
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57

    Default need help

    helllo

    can same one tell me, what phone can support AT Command

    please...

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,182

    Default

    Nokia, Erricson, Siemens, Wavecom modules, Telit modules....

  4. #4
    Xz0R's Avatar
    Xz0R Guest

    Default

    well dear u use this command instead of ATH which is given below:
    AT+CHUP
    it will hang the call bye tc.

  5. #5
    Join Date
    May 2004
    Location
    brighton
    Posts
    149

    Post Sorry But Please Help

    Sorry Guys to bring this nokia 6210 thing up again i know you have all tried to give all the advise that you can, but i am a bit lost here.
    I am trying to communicate with a Nokia 6210 with my pic using( Melabs LAB-X1 Experimenter/Lab Board) but i dont get any response from the phone .
    i am using the Original Nokia DLR-3 Data Cable that i ordered from Nokia.
    the phone works ok when i use the cable with Hypertheminal and i know my Hardware is ok because i can communicate with my pc with my project board
    so where do you think the problem lies.

    Regards
    Isaac

    i am trying to run the following program


    Define LOADER_USED 1
    Include "Modedefs.Bas"
    DEFINE OSC 20

    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 20h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1
    ' Define LCD connections
    Define LCD_DREG PORTD
    Define LCD_DBIT 4
    Define LCD_RSREG PORTE
    Define LCD_RSBIT 0
    Define LCD_EREG PORTE
    Define LCD_EBIT 1


    ' Define program variables
    col var byte ' Keypad column
    row var byte ' Keypad row
    key var byte ' Key value


    OPTION_REG.7 = 0 ' Enable PORTB pullups

    ADCON1 = 7 ' Make PORTA and PORTE digital
    Low PORTE.2 ' LCD R/W low (write)

    Pause 100 ' Wait for LCD to start

    Lcdout $fe, 1, "Press any key" ' Display sign on message

    loop: Gosub getkey ' Get a key from the keypad
    Lcdout $fe, 1, #key ' Display ASCII key number
    if (key =5) then
    gosub sms
    endif
    Goto loop ' Do it forever


    ' Subroutine to get a key from keypad
    getkey:
    Pause 50 ' Debounce

    getkeyu:
    ' Wait for all keys up
    PORTB = 0 ' All output pins low
    TRISB = $f0 ' Bottom 4 pins out, top 4 pins in
    If ((PORTB >> 4) != $f) Then getkeyu ' If any keys down, loop

    Pause 50 ' Debounce

    getkeyp:
    ' Wait for keypress
    For col = 0 to 3 ' 4 columns in keypad
    PORTB = 0 ' All output pins low
    TRISB = (dcd col) ^ $ff ' Set one column pin to output
    row = PORTB >> 4 ' Read row
    If row != $f Then gotkey ' If any keydown, exit
    Next col

    Goto getkeyp ' No keys down, go look again

    gotkey: ' Change row and column to key number 1 - 16
    key = (col * 4) + (ncd (row ^ $f))
    Return ' Subroutine over

    'Send SMS Test-Message
    sms:

    HSerout ["ATZ",13,10]
    Pause 1000

    HSerout ["AT+CMGF=1",13,10] 'Set Text Mode
    Pause 500

    HSerout ["AT+CMGS=",34,"+447895711481",34,",129",13,10]
    Pause 500

    HSerout ["Test-Message",10,13]
    HSerout [26]
    Pause 500

    RETURN ' return from subroutine

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

    Default

    Quote Originally Posted by isaac View Post
    .....

    'Send SMS Test-Message
    sms:

    HSerout ["ATZ",13,10]
    Pause 1000 <<<<<<<<<<<<<< [1]

    HSerout ["AT+CMGF=1",13,10] 'Set Text Mode
    Pause 500 <<<<<<<<<<<<<< [2]

    HSerout ["AT+CMGS=",34,"+447895711481",34,",129",13,10]
    Pause 500 <<<<<<<<<<<<<< [3]

    HSerout ["Test-Message",10,13]
    HSerout [26]
    Pause 500 <<<<<<<<<<<<<< [4]

    RETURN ' return from subroutine
    General all the above lack the response from the mobile. Every command has a response and that response comes with different timing. Other sooner other later.

    So my suggestion is to:

    [1]: Wait for the 'OK' response
    [2]: Wait for the 'OK' response
    [3]: Wait for the '>' response
    [4]: Wait for the 'OK' response

    Also, have put the phone in TEXT mode or is it in PDU mode?

    A monitor on the RS232 lines to see what text is transmitting to both ends would be very helpfull. If your PC has a second Port use it for stealling the signals with two 10K and drive the Rx pin of the second RS232 com port.

    Ioannis

  7. #7
    Join Date
    May 2004
    Location
    brighton
    Posts
    149

    Default

    Ioannis

    Thanks for your quick reply.
    i delibrately removed the WAITS as i was debuging the phone because the phone was not sending any response back my program kept looping in sms.
    i have only got one serial port on my pc so would be able to experiment as to your suggestion.
    Is it true that i just neeed Tx/Rx & Gnd connection?

    Here is my original code
    Define LOADER_USED 1
    Include "Modedefs.Bas"
    DEFINE OSC 20

    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 20h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1
    ' Define LCD connections
    Define LCD_DREG PORTD
    Define LCD_DBIT 4
    Define LCD_RSREG PORTE
    Define LCD_RSBIT 0
    Define LCD_EREG PORTE
    Define LCD_EBIT 1


    ' Define program variables
    col var byte ' Keypad column
    row var byte ' Keypad row
    key var byte ' Key value


    OPTION_REG.7 = 0 ' Enable PORTB pullups

    ADCON1 = 7 ' Make PORTA and PORTE digital
    Low PORTE.2 ' LCD R/W low (write)

    Pause 100 ' Wait for LCD to start

    Lcdout $fe, 1, "Press any key" ' Display sign on message

    loop: Gosub getkey ' Get a key from the keypad
    Lcdout $fe, 1, #key ' Display ASCII key number
    if (key =5) then
    gosub sms
    endif
    Goto loop ' Do it forever


    ' Subroutine to get a key from keypad
    getkey:
    Pause 50 ' Debounce

    getkeyu:
    ' Wait for all keys up
    PORTB = 0 ' All output pins low
    TRISB = $f0 ' Bottom 4 pins out, top 4 pins in
    If ((PORTB >> 4) != $f) Then getkeyu ' If any keys down, loop

    Pause 50 ' Debounce

    getkeyp:
    ' Wait for keypress
    For col = 0 to 3 ' 4 columns in keypad
    PORTB = 0 ' All output pins low
    TRISB = (dcd col) ^ $ff ' Set one column pin to output
    row = PORTB >> 4 ' Read row
    If row != $f Then gotkey ' If any keydown, exit
    Next col

    Goto getkeyp ' No keys down, go look again

    gotkey: ' Change row and column to key number 1 - 16
    key = (col * 4) + (ncd (row ^ $f))
    Return ' Subroutine over

    'Send SMS Test-Message
    sms:
    HSerout ["ATZ",13,10]
    HSERIN 5000, SMS,[WAIT("OK")] ' wait for response ok for 5 seconds
    HSerout ["AT+CMGF=1",13,10] 'Set Text Mode
    HSERIN 5000, SMS,[WAIT("OK")] ' wait for response ok for 5 seconds
    HSerout ["AT+CMGS=",34,"+447895711481",34,",129",13,10]
    HSERIN 5000 , SMS, [WAIT(">")]
    HSerout ["Test-Message",10,13]
    HSerout [26]
    Pause 500

    RETURN ' return from subroutine

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,182

    Default

    You are welcome.

    Of course I cannot debug from here, but can suggest to send the commands from terminal program and check what the phone responds.

    If all seems OK then check if the PIC communicates OK with the terminal window and you emulate the phone by typing the responses (you have to be quick here...!)

    Also check the settings of the DEFINES for the Baud and XTAL you use. I don't remember if these you use are correct.

    Ioannis

  9. #9
    Join Date
    May 2004
    Location
    brighton
    Posts
    149

    Default

    Just a quick one
    Do i need RTS and DTR etc as those are not connected on the LAB-X1 Experimenter board ?

    Isaac

  10. #10
    Join Date
    Feb 2008
    Location
    Laguna
    Posts
    2

    Default help po pls....

    gud day po mga ffriiends. gusto ko lng po humingi ng tulong about our project.\
    title po nun sms controller. anu po bng PIC ang gagamitin? at panu po ba gagawin un? wla po kasi kming idead about dun. pls help po.. salamat... e2 po contact numbver ko po.. 09216625350

  11. #11
    Join Date
    Feb 2008
    Location
    Laguna
    Posts
    2

    Default help po plsss...

    gud day po.. please i need some help about my project. it is sms controller using microcontroller. what kind of pic shud i be using? please giove me some schematics for this project and help me with the code.. please feel free to contact me.. 09216625350 or email me at [email protected]
    Last edited by tyrantvivi; - 10th February 2008 at 09:00.

  12. #12
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by tyrantvivi View Post
    gud day po.. please i need some help about my project. it is sms controller using microcontroller. what kind of pic shud i be using? please giove me some schematics for this project and help me with the code.. please feel free to contact me.. 09216625350
    You aren't asking for much are you? You probably want a completed project, tested, verified, boxed up, and placed in your lap by sometime tomorrow...just in time to finish the semester or maybe a final project.
    As if there isn't enough examples of hardware and software in this very thread to work with.
    Good idea posting your phone number too....jeeze....
    Even better idea to post your email right after your phone number...
    Maybe, since you are a student, you haven't taken the class in common sense that teaches a person that it probably isn't a good idea to put personal information 'out there' for all to see.
    Last edited by skimask; - 10th February 2008 at 09:07.

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

    Default

    Quote Originally Posted by skimask View Post
    You aren't asking for much are you? You probably want a completed project, tested, verified, boxed up, and placed in your lap by sometime tomorrow...
    Yes, me too skimask, can you? And I have a few others too...

    Really now tyrantvivi. I supose this is the largest thread on the matter. So even if you cannot fully understand the exposed ideas and suggestions, try a second reading. It is all there for you to test. Just sit at your workbench and experiment.

    There is nothing more to add after 281 posts!

    Ioannis

  14. #14
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by Ioannis View Post
    Yes, me too skimask, can you? And I have a few others too...
    Ioannis
    I'll hook you up with the good stuff! Might be awhile before I show up on your doorstep though! I have to wait for the Atlantic to freeze over so I can drive...I hate ships...

  15. #15
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,182

    Default

    Quote Originally Posted by skimask View Post
    I'll hook you up with the good stuff! Might be awhile before I show up on your doorstep though! I have to wait for the Atlantic to freeze over so I can drive...I hate ships...
    After the "LOST" I suppose planes too? OK I 'll wait you with beers!

    Ioannis
    Last edited by Ioannis; - 12th February 2008 at 13:34.

  16. #16
    Join Date
    Mar 2008
    Posts
    2

    Default pic to phone

    pic to smaung e350
    how to connect
    any1 has a diagram for it

    thanks in advance

  17. #17
    Join Date
    Mar 2008
    Posts
    2

    Default hyperterminal

    i tried to use hyperterminal
    all works fine until i press control-z to send the message
    eg
    >hello ->
    after i press control z -> this arrow appear and the hyperterminal hangs there
    any1 knows why
    or any1 know how to send out a sms using hyperterminal
    thanks

Similar Threads

  1. Serial VB 2005 pic 16f877a problems
    By Snap in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 8th July 2013, 00: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, 14:46
  3. problem with the GSM controller
    By Dariolo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2009, 20:33
  4. Automatic VB6 to pic serial connection
    By arniepj in forum Code Examples
    Replies: 13
    Last Post: - 10th January 2008, 07:57
  5. Pic to GSM Phone connection
    By samertop in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th July 2005, 13:40

Members who have read this thread : 0

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