Help to write code for GSM and GPS

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

Replies

  • Harshad Italiya
    Harshad Italiya
    #-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.
  • aswani9874
    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.
  • Harshad Italiya
    Harshad Italiya
    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-#
  • aswani9874
    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.
  • Harshad Italiya
    Harshad Italiya
    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-#
  • a.alandkar
    a.alandkar
    what exactly you want to implement.? Please share the algorithm. May be i can help you out.
  • aswani9874
    aswani9874
    Sir , How can we transfer data from GSM to PC . Can it be done using a cable ??
  • Harshad Italiya
    Harshad Italiya
    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?
  • aswani9874
    aswani9874
    we need to transfer data via GSM to PC
  • Harshad Italiya
    Harshad Italiya
    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 :- Dropbox - Error
    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.
  • a.alandkar
    a.alandkar
    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.
  • Prathamesh Taware
    Prathamesh Taware
    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
  • Harshad Italiya
    Harshad Italiya
    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.
  • Prathamesh Taware
    Prathamesh Taware
    So what should I do now. As I have already purchased the Ic and gps
  • Harshad Italiya
    Harshad Italiya
    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:- GitHub - blalor/avr-softuart: Software UART implementation for the AVR platform
  • Prathamesh Taware
    Prathamesh Taware
    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 ...?
  • a.alandkar
    a.alandkar
    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.

You are reading an archived discussion.

Related Posts

After the launch of Stellar 520n and Dream Uno 498H (known as a hindi smartphone) in this month, the Indian smartphone maker company, Spice mobiles has launched a dual-SIM (GSM...
I have a simpler solution to open file at folder location at D:\Folder A\Folder B\Folder C\Folder D by creating create batch file... Batch file experts kindly let me know in...
Heyy guys..I'm a TE extc student and I have to make a mini project using Pic microcontroller or else using any other microcontroller except 8051. So could you guys suggest...
Apple Inc. has been recently launching some great products and has also been bringing about some really cool updates. One recent change that Apple has introduced now is that it...
Neurons in nervous system communicate through synapses (a structure that allows neuron to transmit electrical or chemical signal to another neuron). This type of communication is called synaptic transmission or...