Pic to GSM Phone connection (HSerin problems)


Closed Thread
Results 1 to 40 of 289

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133

    Default

    Quote Originally Posted by Lotondo
    main:
    HSerout ["AT",13,10]
    HSerin 5000,main,[WAIT("OK")]
    HSerout ["WELL DONE",13,10]
    End
    I can not understand where will the "WELL DONE" message be displayed. You are sending it back to the mobile, is this correct? What can the mobile do with this message?

    On you previous post you had a pause 1000 after HSerout ["AT",13,10]. You did well removing it.

    So, I guess a sample like this might help you:

    main:
    Green_Led=0
    HSerout ["AT",13,10]
    HSerin 5000,main,[WAIT("OK")]
    Green_Led=1
    End

    Ioannis

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

    Default

    Ioannis
    thanks for answering.
    As you know i have problems with hserin.
    The WELL DONE should come out on the screen cause i'm monitoring
    via max232 what it's happened between the pic & phone.
    I tried as you said to add the Led lines. The led did not turn on.
    The pic sends out the AT, the phone answers back OK, the pic now
    should understand that it has received an OK and with Hserin should
    turn a led on or send out a WELL DONE.
    Of course the phone does not understand what the purpose but I should
    see it on the monitor and the pic ends to run.
    Thanks for any further help
    Lotondo

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

    Default

    I know it might sound silly, but are sure you are communicating between mobile and PIC with the correct levels? May be your PIC does not see the appropriate voltage levels if you don't use a MAX232 device.

    Other than that, I cannot see what might be wrong.

    Ioannis

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

    Default

    Well,
    I think so. I'm using Kasamiko's schema + max232 to monitor the dialog between pic & phone.
    I already tried several code list, I can send sms out if an event happens at a programmed port and many more.
    Now i wanted to try the opposite, if it receives a sms the pic should, for example, turn a led on.
    I believe I have to use hserin to catch a part of the sms (text or pdu) but it seems not working properly.
    I don't know, i'm using all my knowledge (not a lot), I read more than hundred posts, it seems that i'm using hserin correct but ..........
    Thanks for any help.
    Bye
    Lotondo

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

    Default

    After a long rainy Sunday day spent in front of 16f876A I think I got where is the problem but I can not give me an answer of why this happen.
    Please see code in the msg. 130+131.
    If I use serial db9 pin 2 (rx) to monitor what the pic (pin 17) is sending to the phone I just see a loop of AT. Perfect no problems here.
    If now I monitor what the pic (pin 18) is receiving from the phone I see:
    AT
    OK
    According to my knowledge I should just receive OK.
    After this I decided to change the line
    HSerin 5000,main,[WAIT("OK")] into
    HSerin 5000,main,[WAIT("AT")] and like a miracle on the screen WELL DONE and the led on.
    I believe it's quite clear why with WAIT("OK") the led did not go on, after AT there is a and the OK gets lost.
    I do not really understand why the phone is sending back again AT and not just OK.
    If someone of you can explain me this I think I'll get the solution of my problem.
    I'm waiting for yr msgs.
    Thanks
    Lotondo

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

    Default

    You had to send to the mobile ATE0 (that is E and zero).

    By default all phones reply what you type, so you can see on you monitor screen what you have just typed.

    May be you could also try to set the phone to numeric response instead alphanumeric with ATV0. Instead of "OK" you'll get 0 and 4 for error.

    Ioannis

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

    Default

    Thanks for tips.
    I tried but no success.
    Well I'll try to change the phone, maybe the 7110 is not the right one.
    Even in my working test (msg.135) I could see that it was unstable, sometimes it did work, sometimes not.
    I can not spend too much time in these tests.
    Hserout is working fine, at the moment I'll use to send out sms.
    For the incoming I'll wait for a while.
    Thanks

    Lotondo

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 : 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