Thread: Water level sensor

  1. #61
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    i really not sure how to write the code in C programming to send sms from PC to handphone using AT Commands. Pls I really need help. If you know the code pls share with me. Thank You.

  2. #62
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    The manufacturer can help you. They know everything about the chip and want to tell you all they know about it. They do that by writing a datasheet.

    You want to ignore everything they give you and try to get help from random people on a random forum where probably no one has used your chip...?

  3. #63
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by cyberfish View Post
    I thought this is for embedded? Why are we talking Windows?
    Ahhh right... the OP gave an example from hyperterminal so I just figured the device was attached to a PC...

  4. #64
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    To send an SMS you need to know what model of the GSM modem you have, and how to communicate with it over serial port (UART). Consult the datasheet for the GSM modem for info on what commands it supports, how to talk to it, how to send AT commands and so on. Consult the microchip datasheet on how to use the UART part of the chip (probably need something like a max232 circuit aswell to convert the UART signal to proper RS232 signal).

  5. #65
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    NEED HELP!! how to send sms via at commands via c programming using MSP430-eZRF2500..
    Hi

    I am very new to this c programming. I would need c programming codes to send AT commands using using MSP430-eZRF2500.

    MSP430 is the mirco controller im using to send sms.

    thanks in advance.

  6. #66
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well you already figured out the SMS thing back at post #51

    Where you had
    PC(hyperterm) <-----RS232-----> Phone

    Now all you do for testing is this
    PC(hyperterm) <-----RS232-----> Microcontroller

    Now study some serial line code for your microcontroller from the manufacturers sample sets (there's bound to be one or two), and try and write a simple "echo" program on the micro controller. So that instead of "AT / OK" when you used the phone, you just get "AT / AT" because the microcontroller is just echoing everything.

    WHEN you understand that bit, you write some code to send the required AT commands from the microcontroller. Initially, you just use hyperterminal so you can see the complete at+cmgs="+65--------" or whatever else you send just to make sure it is OK.
    If all seems well, try it with a phone.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  7. #67
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    I don't think he is really interested in trying to do it himself. He just wants someone to write all the code for him.

  8. #68
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    I am not asking answer , i really don't know how to write the code. I am asking to guide me. I don't know how to start itself.

  9. #69
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by Aneesha View Post
    I am not asking answer , i really don't know how to write the code. I am asking to guide me. I don't know how to start itself.
    First Question, Does you MCU unit have an rs232 hardware port?
    Note, I am NOT asking about the USB Port.

    Tim S.

  10. #70
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Quote Originally Posted by Aneesha View Post
    I am not asking answer , i really don't know how to write the code. I am asking to guide me. I don't know how to start itself.
    We have told you THREE TIMES where to start. Did you listen?

  11. #71
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    Yes have rs232 harware port. I have connected the RS232 back of my CPU. The microcontroller that i am using doesn't not have rs232hardware port. I hope i answer your question.

  12. #72
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by Aneesha View Post
    Yes have rs232 harware port. I have connected the RS232 back of my CPU. The microcontroller that i am using doesn't not have rs232hardware port. I hope i answer your question.
    If you CAN NOT hook the two devices together; there is NO way to directly communicate from one to the other.

    It is likely possible to communicate via the PC that connects the two devices together.
    But, I have no idea what would be the best way to proceed.

    Tim S.

  13. #73
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Ok... answer in 1 word... Yes or No...

    1) Does the microcontroller connect to your PC?
    2) Does it connect by RS232 serial port?
    3) Does it connect by USB?
    4) When you are programming, does the PC communicate with the uC?

  14. #74
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Trollface


    Quzah.
    Hope is the first step on the road to disappointment.

  15. #75
    Registered User
    Join Date
    Jun 2011
    Posts
    33
    1) No.The microcontroller that i am using is wireless device, msp430 which is eZ430-RF2500.
    2) No.My microcontroller is not connected to RS232. RS232 is from GPRS modem which is connected back of the CPU.
    3) Yes. The microcontroller is connected by USB to the Computer to download the programme into msp430.
    4)Sry i don Understand the Queation. What does uC means?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SRF02 ultrasonic sensor
    By quachtinh in forum C Programming
    Replies: 1
    Last Post: 11-13-2009, 06:51 AM
  2. How to get RSSI value, send to sensor, sensor receive package, repackage it?
    By techissue2008 in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-04-2009, 10:13 AM
  3. Creating a array sensor
    By mikeprogram in forum C++ Programming
    Replies: 1
    Last Post: 12-01-2005, 05:44 PM
  4. OS sensor
    By Queatrix in forum Windows Programming
    Replies: 1
    Last Post: 07-11-2005, 07:00 PM