Planning on doing some pull requests for the 4G TAT series by Teltonika, covering the TAT140 (Cat-1), TAT141 (Cat-M1), and TAT240 (Cat1 with magnetic tamper detection). Just need a little advice on the alterations to the code, because the LTE data is similar but not exactly the same. A couple of the parameters are 4-bytes unsigned on the TATX4X series, and the signal is LTE specific in that it is RSRP, values 0-7 not RSSI, values 0-63.
This is the current code:
if ("TAT100".equals(model)) {
Network network = new Network();
decodeCell(position, network, "io1200", "io287", "io288", "io289");
decodeCell(position, network, "io1201", "io290", "io291", "io292");
decodeCell(position, network, "io1202", "io293", "io294", "io295");
decodeCell(position, network, "io1203", "io296", "io297", "io298");
The new attributes would make this something like so:
if (model.matches("TAT[12]4[0-1]")) {
Network network = new Network();
decodeCell(position, network, "io25032", "io25020", "io25021", "io25022");
decodeCell(position, network, "io25033", "io25023", "io25024", "io25025");
decodeCell(position, network, "io25034", "io25026", "io25027", "io25028");
decodeCell(position, network, "io25035", "io25029", "io25030", "io25031");
Hoping for a little guidance before I go and do some really deep dives on "decodeCell". Note my RegEx caters for an as-yet non-existent TAT241, which is likely to arrive at some point, given Teltonika's support for Cat-M1.
And yes, I'm aware I'm going to be told that the TATX4X series have 2G fallback and that we actually need to validate the connection type more than the model number. There is no 2G here anymore hence my personal focus on 4G.
Planning on doing some pull requests for the 4G TAT series by Teltonika, covering the TAT140 (Cat-1), TAT141 (Cat-M1), and TAT240 (Cat1 with magnetic tamper detection). Just need a little advice on the alterations to the code, because the LTE data is similar but not exactly the same. A couple of the parameters are 4-bytes unsigned on the TATX4X series, and the signal is LTE specific in that it is RSRP, values 0-7 not RSSI, values 0-63.
This is the current code:
if ("TAT100".equals(model)) { Network network = new Network(); decodeCell(position, network, "io1200", "io287", "io288", "io289"); decodeCell(position, network, "io1201", "io290", "io291", "io292"); decodeCell(position, network, "io1202", "io293", "io294", "io295"); decodeCell(position, network, "io1203", "io296", "io297", "io298");
The new attributes would make this something like so:
if (model.matches("TAT[12]4[0-1]")) { Network network = new Network(); decodeCell(position, network, "io25032", "io25020", "io25021", "io25022"); decodeCell(position, network, "io25033", "io25023", "io25024", "io25025"); decodeCell(position, network, "io25034", "io25026", "io25027", "io25028"); decodeCell(position, network, "io25035", "io25029", "io25030", "io25031");
Hoping for a little guidance before I go and do some really deep dives on "decodeCell". Note my RegEx caters for an as-yet non-existent TAT241, which is likely to arrive at some point, given Teltonika's support for Cat-M1.
And yes, I'm aware I'm going to be told that the TATX4X series have 2G fallback and that we actually need to validate the connection type more than the model number. There is no 2G here anymore hence my personal focus on 4G.