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


Closed Thread
Page 2 of 8 FirstFirst 123456 ... LastLast
Results 41 to 80 of 289
  1. #41
    stu746's Avatar
    stu746 Guest

    Default

    i tried connecting the dlr3p to the pc with all the cables needed, i then tried connection the rx, tx and gnd to the pic leaving the others connected to the pc.

    i am just trying to send

    Serout portb.5,n9600,["atd 453",13,10]

    this sends fine to hyperterminal but noting on the phone

    if i send this from hyperterminal the phone screen changes to calling 453 - so i know it is working

    i am using a 16f877a at 4hz, it works at 9600 with the pc? i have also tried 2400

    the pc works at 2400 with the 6210

    i dont seem to be getting anywhere

  2. #42
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    Originally posted by stu746
    i tried connecting the dlr3p to the pc with all the cables needed, i then tried connection the rx, tx and gnd to the pic leaving the others connected to the pc.

    i am just trying to send

    Serout portb.5,n9600,["atd 453",13,10]

    this sends fine to hyperterminal but noting on the phone

    if i send this from hyperterminal the phone screen changes to calling 453 - so i know it is working

    i am using a 16f877a at 4hz, it works at 9600 with the pc? i have also tried 2400

    the pc works at 2400 with the 6210

    i dont seem to be getting anywhere
    Just another question that pops up:

    Assuming you have DB9 connectors at both ends (PIC and PC)
    are you using a "Null-Modem" when connecting the the Phone to the PIC?

    regards

    Ralph

  3. #43
    stu746's Avatar
    stu746 Guest

    Default

    have now changed to a 20mhz xtal and i am using a max232 with hserout, with just connecting rx,tx and gnd i am getting the phone to echo back characters!?

    but when i tried hserout["atd 453",13,10]
    it does nothing

    i figured out with the pc connected to the phone it also needs dtr and rts connected together and to one of the pins that supplies 10v

    i tried connecting these to the spare output on the max232 and could not even get it to echo stuff back : (

    when i connect the pic to the pc with the max232 it works fine and sends the atd 453 command at 9600

    i am not using a null modem cable

    although i did measure the voltage from the max232 and it was only 7.6v? rather than 10v? i tried changing the caps with no effect

    can anyone please help!? : )

  4. #44
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    stu,

    could you post your code and schematic?

    without it all we can do is guessing.

    regatds

    Ralph

  5. #45
    stu746's Avatar
    stu746 Guest

    Default

    here is the code, it is a bit of a mess, the main thing i want it to do is call the number with the first hersout, then i can see on the phone that it is working

    the hardware is just a basic max232 setup with a 16f877 at 20hz.

    my cable is an original nokia one, i am thinking of gettin a cheap copy to see if it any better, it might not be so fussy about what voltage it requires?

    thanks for try to help, Stu


    DEFINE OSC 20

    DEFINE HSER_TXSTA 20h
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1


    adCON1 = 7

    Include "modedefs.bas" ' Include serial modes

    B0 var byte

    pause 2000


    hserout["atd 453",13,10]

    loop:

    hserout["at",13,10]
    hSerin [b0]
    pause 3000

    Lcdout b0

    Goto loop

  6. #46
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    Have you tried this code with the PIC connected to your PC running Hyperterm at 9600 Baud?

    You should see: atd 453
    in the terminal window when you start the PIC.

    Once you have got this working you can be sure your Hardware is ok.

    You are saying you have already tested the phone and datacable with Hyperterm and it's working.

    Are you sure you are connecting
    for PIC to PC:
    TX from the MAX232 to RX on the PC
    RX from the MAX232 to TX on the PC

    for PIC to Phone:
    TX from the MAX232 to RX on the DataCable
    RX from the MAX232 to TX on the DataCable


    Before trying to communicate with the phone try to establish a bidirectional communication between PIC and PC.
    as long as you haven't got this working there is something wrong in general,
    and it doesen't make much sense to connect the PIC to the phone.


    regards

    Ralph

  7. #47
    stu746's Avatar
    stu746 Guest

    Default

    yes works fine with hyperterminal

  8. #48
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    stu746

    check PM

  9. #49
    stu746's Avatar
    stu746 Guest

    Talking

    hi again

    finally got this working with the circuit from here

    http://www.atrox.at/datacable/dlr3/index.html

    i omitted the max232 and just wired the rx and tx to the resistors

    the following works great
    serout2 portb.5, 396,["atz",cr]
    serout2 portb.5, 396,["atd +447890563875;",cr]

    but when trying to get a response from the pic with the following it just hangs

    serout2 portb.5, 396,["atz",cr]
    serin2 portb.4,396,[wait("ok")]


    so i tried

    serout2 portb.5, 396,["a"]
    serin2 portb.4, 396,[b0]
    Lcdout b0

    and it did echo back the a, so i do have 2 way comms

    anyone have any idea how best to get an ok back from the phone?

    thanks, Stu

  10. #50
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795

    Default

    I suppose that serin is slow in response and your phone answers too early to wait for the 'ok'.

    Solutions:

    1. Use Hserin that has also 2 bytes buffer, or

    2. Use numeric response from the phone (ATV0). That way you only have to wait for the 0 but for OK or 4 for error etc.

    I 'd use Hserin though.

    Ioannis

  11. #51
    jojokatada's Avatar
    jojokatada Guest

    Question

    hi Everybody


    is it possible to send an AT command through Hyperterminal using DAU-9P data cable and nokia 5110 or 3310 or 7110

  12. #52
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161

    Default AT Enabled Nokia

    Having gone thru the entire thread , I am now planning to buy a Nokia Which is AT command enabled and experiment with it.

    Any site or info which shows me which of the phones are AT Command enabled.

    Thank you.
    Last edited by charudatt; - 11th February 2005 at 04:22.

  13. #53
    stu746's Avatar
    stu746 Guest

    Default

    I used a nokia 6210 and worked great once i got it working could not get it to work with the nokia dlr3p cable but i made my own in the end and it worked fine

    i got it to send sms messages but it is alot cheaper to just have the phone make a call and hang up, unless there is a message you need to send or you get free sms.

  14. #54
    jojokatada's Avatar
    jojokatada Guest

    Default

    Originally posted by stu746
    I used a nokia 6210 and worked great once i got it working could not get it to work with the nokia dlr3p cable but i made my own in the end and it worked fine

    i got it to send sms messages but it is alot cheaper to just have the phone make a call and hang up, unless there is a message you need to send or you get free sms.

    hi the dlr3p is it used with the pic16f84a or just only max232. see in the web someone make a dlr3p but can't download the hex file

    could you share your schematic of the dlr3p

  15. #55
    stu746's Avatar
    stu746 Guest

    Default

    I used the schematic from this site

    http://www.atrox.at/datacable/dlr3/index.html

    but i did not need the max232 to connect to a pic

  16. #56
    jojokatada's Avatar
    jojokatada Guest

    Default

    yes i know that website but they are not giving the hex file source code for the pic16f84a

    how do you get the hex file? copy and paste?

  17. #57
    stu746's Avatar
    stu746 Guest

    Default

    just right click - save as

  18. #58
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    Dear Forum Members,

    I will defititely no longer reply to any PM's regarding this thread.

    All information you need to get started can be found here.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  19. #59
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    Again:

    Please stop sending PMs asking: would Phone Model X work?

    I definitely don't know all brands and models available on the market.
    And I don't know the pinouts of all those different connectors.

    Further down on this thread there is a working code example that can easily be modified for a different PIC type or Phone type.

    If the documentation of your specific phone says it has an embedded modem you should be able to get it working.

    First try it in Hyperterm, it doesnt make much sense to hook the GSM up to the PIC as long as you havent figured out what the Comms parameters should look like.

    If you try the code example with a phone other than mentioned in that posting chances are it will work, but YOU will certainly have to do some homework.
    (I'm not going to do it for you)

    I'm sure if you google for your particular phone model you will find more descriptions of connectors and interfaces than you'll ever need.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  20. #60
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    For some pinout, i think, i'm not familiar with this kind of task, you can find about everything on GsmForum
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  21. #61
    Join Date
    Mar 2004
    Location
    Manila
    Posts
    18

    Default Smart Car Buddy

    Hi,
    Visit picbasic.org/forum, I've seen a very nice project.

    Brenda

  22. #62
    aruran's Avatar
    aruran Guest

    Default Schematic

    According to Stu's post (#49). I am indeed need of that modified circuit. Can I do it for Nokia 7250i. Since the MBUS pins are connected.


    thanks in advance
    aruran

  23. #63
    aruran's Avatar
    aruran Guest

    Default Sms

    Hello, I am new to this field...
    I want the modified schematic you said that worked in the following quoted message. If you can send it to me, it will be a great help..


    thanking you
    aruran

    Quote Originally Posted by stu746
    hi again

    finally got this working with the circuit from here

    http://www.atrox.at/datacable/dlr3/index.html

    i omitted the max232 and just wired the rx and tx to the resistors

    the following works great
    serout2 portb.5, 396,["atz",cr]
    serout2 portb.5, 396,["atd +447890563875;",cr]

    but when trying to get a response from the pic with the following it just hangs

    serout2 portb.5, 396,["atz",cr]
    serin2 portb.4,396,[wait("ok")]


    so i tried

    serout2 portb.5, 396,["a"]
    serin2 portb.4, 396,[b0]
    Lcdout b0

    and it did echo back the a, so i do have 2 way comms

    anyone have any idea how best to get an ok back from the phone?

    thanks, Stu

  24. #64
    Join Date
    Apr 2005
    Posts
    17

    Question

    Quote Originally Posted by NavMicroSystems
    I have tried it using a NOKIA Phone and it works fine.

    The Phone is connected to the HW-USART via MAX232
    Baudrate: 9600 8N1

    You need a clock spped of minimum 8MHz
    (I'm using a 12MHz resonator)

    -------------------------------------

    DEFINE OSC 12

    DEFINE HSER_TXSTA 20h
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1

    GSMBUFFER VAR BYTE[16]
    Caller VAR BYTE[13]
    GSMTime VAR BYTE[17]


    'Send SMS Test-Message

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

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

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

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

    ' Check for new incomming Messages

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

    HSerout ["AT+CMGF=1",13,10]
    Pause 1000

    Loop:

    'List new Messages
    HSerout ["AT+CMGL",13,10]

    ' Read Caller ID, time and 16 CHARs of Message

    ' The timeout value in the HSERIN statement is important, it takes some time before the phone replies to the AT+CMGL command

    HSerin 5000,loop,[wait("UNREAD"),skip 3,STR Caller\13,skip 4,STR GSMTime\17,skip 6, STR GSMBUFFER\16\13]

    ' --- Put your code to output the result here

    ' i.e. LCDOUT . . . .

    Goto Loop:

    -------------------------------------------------

    There are certainly better ways to do the job, this was just a quick test and it works
    This is my first post..pls be gentle..
    Will this code applicable to PIC16F84A using an 8 mhz xtal?

  25. #65
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Talking

    you'll have to do some modification before. Ralph's favourite 16F84a have no internal USART. Wich mean that, at least, you'll need to change HSEROUT, HSERIN for an equivalent SERIN,SERIN2,SEROUT,SEROUT2

    Once it will be done... it's suppose to work fine.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  26. #66
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    Quote Originally Posted by mister_e
    ..,Ralph's favourite 16F84a have no internal USART. Wich mean that, at least, you'll need to change HSEROUT, HSERIN for an equivalent SERIN,SERIN2,SEROUT,SEROUT2
    Steve, thanks for the reminder ;-)

    As you can see, many beginners are giving themselves a hard time by starting with that "great" F84 while life could be so easy with one of the recent 18pin types.

    I guess one of the reasons is because my favourite is mentioned in so many (outdated) books and manuals.

    (Even in the lastest issue of the PBP Manual)
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  27. #67
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Talking

    Ralph,
    in addition to that, this awesome F84 is one of the first flash device from Microchip and can still be found everywhere and at local electronic parts provider... like 12C508

    for the remainder, you know why i did it
    Last edited by mister_e; - 20th April 2005 at 05:01.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  28. #68
    Join Date
    Apr 2005
    Posts
    17

    Talking

    And it is also weird.....
    It's the ONLY PIC available in our electronics store!!!
    That's why I have no choice...

    BTW:
    Is there a FREE PicBasic compiler and some links for tutorials??

    Thanks

  29. #69
    aruran's Avatar
    aruran Guest

    Talking Nokia... and SMS

    Sorry to ask you all again. I didn't quite get it Mr.kasamiko since the phone's voltages are little lesser

    than 5V. So why the hell we should use max232 to connect to the pic. I didn't quite understand it. I thought

    if I connect it to the PIC directly through the interface given http://www.atrox.at/datacable/dlr3/index.html

    But I am not farely clear what pins I should omitt. I thought that the phone's MBUS and GND are the only pins connected. As posted by stu746 I didn't realy understand the circuit modification. Enybody please help me......? If you could send me the circuit for any nokia connecting to a PIC only would be of immense help.
    I will be greatful to you all

    regards
    aruran

  30. #70
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795

    Default

    On the above code:

    HSerin 5000,loop,[wait("UNREAD"),skip 3,STR Caller\13,skip 4,STR GSMTime\17,skip 6, STR GSMBUFFER\16\13]

    it would be good to change UNREAD to READ since the phone can answer also "REC READ" or other "READ" messages.

    Ioannis

  31. #71
    Join Date
    Apr 2005
    Posts
    17

    Default

    Quote Originally Posted by aruran
    Sorry to ask you all again. I didn't quite get it Mr.kasamiko since the phone's voltages are little lesser

    than 5V. So why the hell we should use max232 to connect to the pic. I didn't quite understand it. I thought

    if I connect it to the PIC directly through the interface given http://www.atrox.at/datacable/dlr3/index.html

    But I am not farely clear what pins I should omitt. I thought that the phone's MBUS and GND are the only pins connected. As posted by stu746 I didn't realy understand the circuit modification. Enybody please help me......? If you could send me the circuit for any nokia connecting to a PIC only would be of immense help.
    I will be greatful to you all

    regards
    aruran
    MAX232 was used on that circuit since it was designed to be used for PC. If you're planning to use that as stand-alone on Nokia's like 6210, you can omit MAX232..
    I have a circuit to be connected for 6210 but I dont have a code for PIC to have it receive an SMS then activate a relay.
    What I need is a PIC16F84 with 8 mhz xtal and can drive a 4 relay when it received an SMS command..
    I know sa AT commands for Nokia but don't know how would I start it..
    Any sample codes will be appreciated.
    TIA

  32. #72
    Join Date
    Apr 2005
    Posts
    17

    Question

    Quote Originally Posted by Ioannis
    On the above code:

    HSerin 5000,loop,[wait("UNREAD"),skip 3,STR Caller\13,skip 4,STR GSMTime\17,skip 6, STR GSMBUFFER\16\13]

    it would be good to change UNREAD to READ since the phone can answer also "REC READ" or other "READ" messages.

    Ioannis
    What is the purposed of this code modification? and in what particular above code?
    Thanks

  33. #73
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    kasamiko,

    see comments

    As I was interrested in "NEW" Messages only (the ones I had not already taken action on) "UNREAD" was correct.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  34. #74
    aruran's Avatar
    aruran Guest

    Question Help

    It seems though everybody are ignoring my problem. Please take a minute to help me.

    thanks
    aruran

  35. #75
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    Quote Originally Posted by aruran
    It seems though everybody are ignoring my problem...
    Have you yet asked yourself why?

    Quote Originally Posted by aruran
    ...Please take a minute to help me.
    Have you taken some time to read this thread from the beginning and checked the links posted here ?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  36. #76
    aruran's Avatar
    aruran Guest

    Default Problem

    Hi NavMicroSystems

    My aim is to send SMS using a Nokia 7250i phone using a PIC microcontroller most probably 16F877A, since

    it has hardware USART

    I went through entire thread from page 1 to 2. The problems I faced can be listed as follows


    1) I am a beginner so the schematic Stu746 told, had me in some dilema
    I thought only modifications to be done are to omit the PC part with two MAx232 ICs

    2) I have a Nokia 7250i : which has an embedded modem as I learnt from Nokia website - Solved
    But I have a DAU 9P-FBSU cable which I use to connect my phone with other third party

    softwares and it is successful. But using Hyperterminal it is not responing to any AT commands. Do I

    need an DLR 3P cable. How can I do it with my DAU 9P FBUS cable...?

    3) To my knowledge phone voltages are between 3.6 and 5V so why we need a MAX232 IC to connect

    the phone to a PIC. We may need it in case we are connecting it to PC COM port. where voltages are

    between +15 and -15V. This contradicted with the NavMicrosystems post on 24th February 2004, 22:05

    Unless of course you are using the phone datacable inbetween !.

    For your reference I have attached the circuit I built.

    regards
    aruran
    Attached Images Attached Images  

  37. #77
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    aruran,

    I'm sorry, but I really can't tell which cable to use with the 7250i.

    For my tests I used a 6210 with a standard (NoName) Data cable.

    All I can tell is:
    If your Phone doesn't respond to AT-commands sent from Hyperterm there is most likely something wrong with your cable.
    I had two different cables, one did work, the second one didn't. I haven't taken the time to investigate in detail what the difference between them was.

    To find out which cable works with your particular phone (or how to build your own) I guess you will have a better chance on one of the many GSM-Forums.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  38. #78
    aruran's Avatar
    aruran Guest

    Default continue...

    Navmicrosystems,

    So If I build the circuit I attached in my last post, it should work is it. Of course connecting the MBUS properly to my Nokia 7250i

  39. #79
    sufian's Avatar
    sufian Guest

    Default hi i want help

    Hi
    I designed a datacable for Ericsson T28
    I used a max3232 in this cable
    I connect the com of the computer to Ericsson though this cable
    and the result on the Hyper terminal was : the program of the mobile show on the hyper terminal and this program still forever .
    so when i try to send At commad the mobile don't response and still send the data of the program.
    are there anyone can help me and say to me how can i send the command from hyper terminal to Ericsson by this cable.
    please i want help as soon as posible.
    my email: [email protected]

  40. #80
    dimitrin's Avatar
    dimitrin Guest

    Default gm862 to pic

    like in an earlier post I seem to get the code to send the the GM862, the person might have used something different, and it is visible through hyperterm, but the phone does not read the code as commands...

    I am using a pic 16f452 and a gm862

    common ground

    tx and rx connect

    I am using nothing inbetween the two... do I need an hex inverter? or a max232?

    and the code is:

    DEFINE OSC 20

    DEFINE HSER_TXSTA 20h
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_BAUD 9600
    DEFINE HSER_CLROERR 1



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

    HSerout ["AT+CGATT=1",13,10]
    Pause 500

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