用例
我有一个 OBD2 设备,可以通过设置它的 IP 和端口进行通信来配置它。与 OBD 设备通信的唯一方式是通过 SMS。OBD 设备有一个 SIM 卡,可以通过它进行通信(随附的文档图像)。我想从设备中获取数据并运行一个 python 代码来进行一些转换(比如 AWS Lambda)并将 JSON 数据发送到 S3。
我的问题是可以在这里使用任何 AWS 服务从该设备获取数据吗?我不允许在 OBD 设备的操作系统上编写任何代码或安装任何 SDK。
OBD2 设备文档
通过监听器接收到的数据
4/7/2019 12:57:12 PM
L,ATLOBD,866795030623415,03,6806,072703,070419,CAN,0101:00076100,0103:0100,0104:48,0105:49,010A:XX,010B:26,010C:16DB,010D:00,010E:81,010F:50,0110:XXXX,0111:34,011C:06,011F:000B,0121:0000,0122:XXXX,012F:XX,0162:XX,0132:XXXX,0133:60,0143:006F,0145:10,0146:XX,0147:24,0148:XX,0149:23,014A:12,014B:XX,014C:19,0151:XX,0131:9172,0144:XXXX,015E:XXXX,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0902:XXXXXXXXXXXXXXXXXXXX,$ATLOBD,*N
运行python代码进行转换后的数据
Python 代码是一个函数,它可以对上述数据进行预处理并将数据转换为以下 JSON 值,以存储在 S3 存储桶或任何数据库中。
{
"Live/Memory": "L",
"Signature": "ATLOBD",
"IMEI": "866795030623415",
"Message Type": "03",
"Sequence No": "6816",
"Time (GMT)": "073203",
"Date": "070419",
"OBD Protocol": "CAN",
"0101": "00076100",
"0103": "0200",
"0104": "69",
"0105": "7F",
"010A": "XX",
"010B": "4D",
"010C": "1977",
"010D": "2F",
"010E": "BC",
"010F": "54",
"0110": "XXXX",
"0111": "2B",
"011C": "06",
"011F": "012D",
"0121": "0000",
"0122": "XXXX",
"012F": "XX",
"0162": "XX",
"0132": "XXXX",
"0133": "60",
"0143": "006E",
"0145": "13",
"0146": "XX",
"0147": "2E",
"0148": "XX",
"0149": "2F",
"014A": "17",
"014B": "XX",
"014C": "1F",
"0151": "XX",
"0131": "9174",
"0144": "XXXX",
"015E": "XXXX",
"0902": "XXXXXXXXXXXXXXXXXXXX"
}
先谢谢了