Skip to content

Commit

Permalink
Cell info attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Feb 6, 2020
1 parent 2c0563a commit eaacf2e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,16 @@ private boolean decodeLbs(Position position, ByteBuf buf, boolean hasLength) {

int mcc = buf.readUnsignedShort();
int mnc = BitUtil.check(mcc, 15) ? buf.readUnsignedShort() : buf.readUnsignedByte();
int lac = buf.readUnsignedShort();
int cid = buf.readUnsignedMedium();

position.set("mcc", mcc);
position.set("mnc", mnc);
position.set("lac", lac);
position.set("cid", cid);

position.setNetwork(new Network(CellTower.from(
BitUtil.to(mcc, 15), mnc, buf.readUnsignedShort(), buf.readUnsignedMedium())));
BitUtil.to(mcc, 15), mnc, lac, cid)));

if (length > 9) {
buf.skipBytes(length - 9);
Expand Down

0 comments on commit eaacf2e

Please sign in to comment.