Git Product home page Git Product logo

jt808-deprecated's Introduction

Jt808

中华人民共和国交通运输行业标准JT/T808协议的简单测试后台;

快速使用

以下操作命令基于 Ubuntu 16.04 系统

下载源码及编译

$ git clone https://github.com/hanoi404/jt808 && cd jt808
$ make all

运行后台服务

$ ./jt808service

然后需要将支持808协议的终端连接到这个后台, IP为你自己服务器的IP, 端口为8193, 可以在main/service_main.cc文件中自己修改. 后台可识别的终端识别号为13826539847等, 如果有需要在源码目录下examples/devices.list文件里自行添加, 并将该文件拷贝到/etc/jt808/service目录下. 终端连接到本后台后, 如果终端实现了上报位置信息命令,后台会进行解析.

使用控制命令操作后台, 下发命令到终端. 下面是查询终端参数操作例子, 假设终端识别号为13826539850, 要查询的终端参数ID为0x0020(位置汇报策略), 输入以下命令并得到返回结果:

$ ./jt808command 13826539850 getterminalparameter 0020
terminal parameter(id:value): 0020:0

CMake

编译准备

$ sudo apt-get install cmake cmake-curses-gui

下载源码

$ git clone https://github.com/hanoi404/jt808 && cd jt808
$ mkdir build

下载googletest

$ git clone https://github.com/google/googletest

但还是推荐下载release版本源码包, 然后解压到源码根目录下, 我用的是1.8.1版本.

编译

$ cmake .. && make

使用

先确保以下目录存在并且有读写权限, 不存在请自行创建:

$ /etc/jt808/service
$ /etc/jt808/terminal
$ /tmp
$ /upgrade
$ /var/tmp

拷贝examples目录下文件到/etc/jt808目录下:

$ cp examples/devices.txt /etc/jt808/service/
$ cp examples/arearoute.txt /etc/jt808/terminal/
$ cp examples/terminalparameter.txt /etc/jt808/terminal/

运行后台服务:

$ ./jt808service

运行终端:

$ ./jt808terminal

使用命令行控制工具:

$ ./jt808command

然后根据提示正确输入完整命令.

生成 debug 版和 release 版的程序

$ ccmake ..

编辑CMAKE_BUILD_TYPE行, 填写DebugRelease.

jt808-deprecated's People

Contributors

sevensx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.