Menu

Serial Port to HTML?

Anonymous
2021-05-25
2021-05-26
  • Anonymous

    Anonymous - 2021-05-25

    Hi all,

    No experience at all in writing scripts, I’m hoping to send GPS reports from a radio connected to serial to ip adapter then convert to http request. I’m thinking this project will do the trick, can someone point me in the right direction? Example gps output is

    $PKNID,00,U00669,207,00,2D
    $PKNDS,015930,A,3900.6097,N,07528.2177,W,000.0,000.0,250521,9.30,E00,U00669,207,00,
    08
    $PKNSH,3900.6097,N,07528.2177,W,015930,A,U00669,4D
    $GPRMC,015930,A,3900.6097,N,07528.2177,W,000.0,000.0,250521,9.30,E
    58
    $GPGGA,015930,3900.6097,N,07528.2177,W,1,08,001.2,00013.80,M,-034.60,M,,4A
    $GPGLL,3900.6097,N,07528.2177,W,015930,A
    3F

    I’d like to send that in this format to Traccar, an opensource gps server.

    http://LocalHost:5055/?id=RadioID&lat=&lon={1}&timestamp={2}&hdop={3}&altitude={4}&speed={5}

    Maybe Later I can add to that things like status code, group id. I can slim down on that gps output too seems overly redundant. I have the above showing up in the terminal I just have no clue what to do next.

    Thank you!

     
  • Anonymous

    Anonymous - 2021-05-26

    Hi,

    you have to receive the data with the main interface (you can find an example in exampleScripts/WorkerScripts/ReceiveFile (scriptInf.dataReceivedSignal)) and send the data with an additional TCP interface (you can find an example in exampleScripts/WorkerScripts/AdditionalInterface/TCP_Client).

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.