This is not a javascript problem. You have the string:
+RESP:GTFRI,EF8019,866425032153324,ZK105,,,,,0,0000000000000000,1,0.0,21,29.5,120.101247,30.344809,20190710013252,,0460,0000,580C,8500,31&0,1,42,0,36638,0,0,0,0,1,,0.0&0.0&0.0&0.0&0&0&0&030015&D50052&0&0&00000000000000000000,49,20190710013252,6D1F$
.. and literally that is the human readable value. That is to say, the string that humans can read literally starts with +RESP
.. and ends with $
.
Your problem is you don't understand what this string means, not figuring out how to display it on screen.
My personal debugging process when faced with something like this is to use http://www.google.com. Googling the string +RESP:GTFRI
gives me a PDF document as the first result. It is the documentation of the Track Air Interface Protocol which is a protocol used by a GPS device called Enduro Pro.
This link may not last forever but for now the document can be found at: http://www.trackingtheworld.com/wt_products/wtenduropro/Documents/Enduro_Pro_Tracker_Air_Interface_Protocol_1.04.pdf.
The documentation of the +RESP:GTFRI
packet can be found on page 39.
It looks like it uses AT
commands (a format for serial protocols) where commands sent to the device starts with AT+<command>
and responses starts with +RESP:<command>
. So the packet encodes the reply to the GTFRI
command (datatype) which is the command to configure scheduled report (page 19).
Whenever you encounter a new kind of AT
command it is worth googling the first few characters (the command words). I have never worked with this device and don't know anything about it but I got all the above from googling +RESP:GTFRI
.
Ideally, since you presumably actually have access to the device you should also have copies of the documentation. But I've been in the industry long enough to know that that's not always the case.