FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

4167 questions

4739 answers

3460 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
3,006 views
in Vehicle tracking by

Hello,

I have an FMB125 connected to an external device via RS232 in TCP binary mode. I also have a GPS antenna connected to the FMB125. 

Actual behaviour:

The external device collects data retrieved from sensors connected to it -> The external device builds a custom frame with the data ->  The external device sends the frame to the FMB125 -> FMB125 encapsulate the frame on a Codec12 frame -> FMB125 send the frame to the remote server.

Additional steps that i don't know how to accomplish:

Besides the data that my external device collects, I would want to query GPS to FMB125 data through RS232 and join these GPS data to other sensor data.

If this is not possible, is the FMB125 capable of sending GPS data to the remote server periodically?

Best Regards

1 Answer

+1 vote
by anonymous
You can not directly request GPS (nmea) data to be forwarded to your external device from FMB. No such functionality.

But if you need only to get GPS information from device -> to server. Then you can use getgps codec12 command:

https://wiki.teltonika.lt/view/FMB_getgps

There is also: https://wiki.teltonika.lt/view/FMB_ggps

"Besides the data that my external device collects, I would want to query GPS to FMB125 data through RS232 and join these GPS data to other sensor data."

Not possible unless we were to develop custom functionality for you. Can contact sales representatives for this -> and if you'll reach agreement -> this might translate into development.

"If this is not possible, is the FMB125 capable of sending GPS data to the remote server periodically?"

Yes, if you periodically send codec12 ggps or getgps commands to device. Otherwise - to schedule this from FW side -> no such functionality at the moment.

Regards
by
Hello,

Thank you for the answer.  I did understand everything you have said and it makes sense. But there is any special reason why it is possible to query GPS data by RS485 and not by RS232?

Regards
by anonymous

Uhm - how do you go about querying GPS data by RS485?

In general RS485 - has exactly the same command wise availability as RS232. And vice versa.
I.e. same commands which you can send via RS232 and get a response -> same should work for RS485.

Regards

by anonymous
Maybe you mean that RS232/RS485 mode -> nmea?
by
I am sorry, i have said one mistake. In fact, with rs485 in NMEA mode I do not query, it is fmb125 that just send to me periodically. And you were right, I have tried NMEA mode with rs232 and it worked the same way of rs485.

Just to conclude:

- > It is not possible to receive NMEA data on the rs232 external device using tcp binary mode?

-> If the answer is no, it is possible for rs232 external device to change fmb125 mode on demand? (Switching from binary mode to nmea, and the other way around)

Thank you
by anonymous
- > It is not possible to receive NMEA data on the rs232 external device using tcp binary mode?

[AA] No. In nmea mode -> nmea is sent to externally connected device. In tcp binary mode -> FW expects packets -> which it then forwards to server.

There is no mix between the two: ie to both send nmea to external device + receive packets from external device -> for sending to server.

-> If the answer is no, it is possible for rs232 external device to change fmb125 mode on demand? (Switching from binary mode to nmea, and the other way around)

[AA] Yes. Just send setparam 151:1          - to set nmea mode @ RS232

or setparam 151:8         - to set tcp binary @ RS232

for RS485 mode param_id is 160

and then you will be able to switch between the modes from the server by sending these commands.

Commands sending should be done via codec12.

Regards
by

"[AA] Yes. Just send setparam 151:1          - to set nmea mode @ RS232

or setparam 151:8         - to set tcp binary @ RS232"

Well, if this works i will be able to do exactly what i want! Thank you a lot for the support! 

One more thing: Where can i find the latest version of the codec12 protocol document? In tcp binary mode the messages that are sent from server are not being forward to the external device. This error appears when the message from server is received: [2019.03.21 08:35:46]-[GPRS.CMD] WARNING @ 151:Invalid cmd len: 12 < 20. 

I suspect it is because i am not building correctly the packet on the server side. I know it is a little bit off-topic, but if you can say me where i can find the document is enough!

Again, thank you. 

Regards

by

Does the 'setparam 151:1 'has to be sent from server? Or it can be sent from external device?

by anonymous

So, i tried these 3 messages both from server and external device (not at the same time of course):

000000000000160c01050000000e736574706172616D203135313A31010000475a

000000000000160c01060000000e736574706172616D203135313A31010000741e

000000000000160c010e0000000e736574706172616D203135313A310100003dff

None of these worked. Do I have to set up some additional configuration? 

by anonymous
will try to send: setparam 151:1
2012.10.01 19:00:10.817000 >> Packet sent (34 B): 00000000000000160C01050000000E736574706172616D203135313A31010000475A

00000000000000160C01050000000E736574706172616D203135313A31010000475A
00000000 - 4x zeroes
00000016 - data_len
0C - codec12
01 - nod
05 - cmd_type -> to device
0000000E - pld_len
736574706172616D203135313A31 == 'setparam 151:1'
01 - nod
0000475A - CRC

And sending from device - will not work. codec12 communication is only via GPRS.

Regards
by
OK, I was sending only 3 zeros in the preamble by mistake. Now it is working. Thank you for the tips!

Regards