CrazyEngineers
  • Help to write code for GSM and GPS

    aswani9874

    Member

    Updated: Oct 26, 2024
    Views: 1.6K
    can you write code in c language for my circuit which is attached to it(vehicle tracking using GSM and GPS).

    vehicle-tracking-system-circuit-diagram
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Harshad Italiya

    MemberDec 29, 2014

    #-Link-Snipped-# will you please share some more information about the GPS and GSM module you are using?
    Also have you tried anything for coding for this project? Please share with us.
    Are you sure? This action cannot be undone.
    Cancel
  • aswani9874

    MemberDec 30, 2014

    No sir we haven't tried.
    Our aim is compare the latitude and longitude coordinates from GPS and send them to GSM when they are matched with the coordinates stored in microcontroller.
    Please suggest code on how to match and send to GSM whenever matched.
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberDec 30, 2014

    aswani9874
    No sir we haven't tried.
    Our aim is compare the latitude and longitude coordinates from GPS and send them to GSM when they are matched with the coordinates stored in microcontroller.
    Please suggest code on how to match and send to GSM whenever matched.
    Ok,
    Then first of all you have to read the commands for GSM and GPS module.
    Then you need to write code for UART. As 89S52 doesn't have two UART you may have to create one Software UART.
    Here is the information about Software UART:- #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • aswani9874

    MemberDec 31, 2014

    Sir can u please send us the code which we can refer. The code related to project "bus position monitoring system" maybe really helpful to us.
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberDec 31, 2014

    aswani9874
    Sir can u please send us the code which we can refer. The code related to project "bus position monitoring system" maybe really helpful to us.
    I don't have any ready code that you can use and I suggest you must have to atleast give it a try by yourself.
    Here is one example for UART in 8051. I suggest you follow the steps and make your own.
    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • a.alandkar

    MemberJan 12, 2015

    what exactly you want to implement.? Please share the algorithm. May be i can help you out.
    Are you sure? This action cannot be undone.
    Cancel
  • aswani9874

    MemberMar 8, 2015

    Sir , How can we transfer data from GSM to PC . Can it be done using a cable ??
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberMar 9, 2015

    aswani9874
    Sir , How can we transfer data from GSM to PC . Can it be done using a cable ??
    Do you want to send AT commands via PC to GSM or want to upload some files via GSM to PC?
    Are you sure? This action cannot be undone.
    Cancel
  • aswani9874

    MemberMar 9, 2015

    we need to transfer data via GSM to PC
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberMar 9, 2015

    aswani9874
    we need to transfer data via GSM to PC
    Then you have to run kind of server on your PC.
    For the test purpose you can install Hercules utility on your PC. Download it from here :- <a href="https://www.dropbox.com/s/vjxg18ziutqfc01/hercules_3-2-5.exe?dl=0" target="_blank" rel="nofollow noopener noreferrer">Dropbox - Error</a>
    Then you must need active internet connection on your PC and put one TCP socket in listen mode on hercules.
    Then you need to write code on your GSM modem so it opens TCP connection to your IP and sends data to that specific port.
    Are you sure? This action cannot be undone.
    Cancel
  • a.alandkar

    MemberMar 15, 2015

    if you just want to send the co ordinates which you get from the GPS then you can implement the things using AT commanads also.
    Google for AT comands, if you specify the GSM modem i mean the series then you may get detailed datasheet along with AT commands and their usage also. If you want to use internet connection then Harshad has mentioned the things to be done.
    Are you sure? This action cannot be undone.
    Cancel
  • Prathamesh Taware

    MemberMar 16, 2015

    Sir I am using atmega 16 mcu for my project. I want to interface LM35,humidity sensor and MQ4 to sense temperature,humidity and combustible gases, gsm modem to only send the message and gps module to receive longitude and latitude. So how can i do that simultaeously. I want the code for ot and the ckt diagram. Can I connect gps to Rx of atmega and gsm to Tx pin of it?? I want to send info about the longitude,latitude ,gas readings through GSM modem. I want to use GSM only for transmission purpose ,I don't want to use it for receing purpose
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberMar 16, 2015

    Prathamesh Taware
    I want to use GSM only for transmission purpose ,I don't want to use it for receing purpose
    Even if you do not want to receive anything from GSM but to you must need RX pin of GSM to your MCU to know the response of AT command you need to send GSM to get register in cellular network, establish GPRS service and pushing data to internet.
    Are you sure? This action cannot be undone.
    Cancel
  • Prathamesh Taware

    MemberMar 16, 2015

    So what should I do now. As I have already purchased the Ic and gps
    Are you sure? This action cannot be undone.
    Cancel
  • Harshad Italiya

    MemberMar 16, 2015

    Prathamesh Taware
    So what should I do now. As I have already purchased the Ic and gps
    You will need two UART for sure. You can use hardware UART for GSM and for GPS you can try to create a software UART that might solve your issue.
    This may help you to get more information and reference example about software UART:- <a href="https://github.com/blalor/avr-softuart" target="_blank" rel="nofollow noopener noreferrer">GitHub - blalor/avr-softuart: Software UART implementation for the AVR platform</a>
    Are you sure? This action cannot be undone.
    Cancel
  • Prathamesh Taware

    MemberMar 17, 2015

    If I use ic 4066B cmos quad bilaeral switch for switching purpose between microcontroller and gps,gsm....? As we can get the reading from gps and trasmit the sensor's data & gps reading. What do u say sir ...?
    Are you sure? This action cannot be undone.
    Cancel
  • a.alandkar

    MemberMar 17, 2015

    OK. Now i get it. If you guys are using the same hardware you have shared here i.e. specifically the controller from 51 family which does not have 2 UART in that case you may use it. As a hint before starting actual communication with either of the devices use the rx tx pins as general purpose io pins, select the device and then init the communication.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register