【Cloud】Lora节点上云排查方法

 

一直在发入网请求包,但是网关没给回复——————appkey不匹配,可能是云端的下发的appkey不对

 

 

节点的appkey在串口或者工具这边可以查看,要看云端下发的sn码,这边要看as内容,其他可看ns内容和表

root@ROUTER:/mnt/mmcblk0p1/log# psql -U postgres
psql (9.6.8)
Type "help" for help.

postgres=# \c loraserver_ns
You are now connected to database "loraserver_ns" as user "postgres".
loraserver_ns=# \d
                            List of relations
 Schema |                 Name                 |   Type   |     Owner     
--------+--------------------------------------+----------+---------------
 public | device                               | table    | loraserver_ns
 public | device_activation                    | table    | loraserver_ns
 public | device_activation_id_seq             | sequence | loraserver_ns
 public | device_profile                       | table    | loraserver_ns
 public | device_queue                         | table    | loraserver_ns
 public | device_queue_id_seq                  | sequence | loraserver_ns
 public | gateway                              | table    | loraserver_ns
 public | gateway_profile                      | table    | loraserver_ns
 public | gateway_profile_extra_channel        | table    | loraserver_ns
 public | gateway_profile_extra_channel_id_seq | sequence | loraserver_ns
 public | gateway_stats                        | table    | loraserver_ns
 public | gateway_stats_id_seq                 | sequence | loraserver_ns
 public | gorp_migrations                      | table    | loraserver_ns
 public | routing_profile                      | table    | loraserver_ns
 public | service_profile                      | table    | loraserver_ns
(15 rows)

loraserver_ns=# q 
loraserver_ns-# \q
root@ROUTER:/mnt/mmcblk0p1/log# 
root@ROUTER:/mnt/mmcblk0p1/log# 
root@ROUTER:/mnt/mmcblk0p1/log# psql -U postgres
psql (9.6.8)
Type "help" for help.

postgres=# \c loraserver_as
You are now connected to database "loraserver_as" as user "postgres".
loraserver_as=# \d
                        List of relations
 Schema |            Name             |   Type   |     Owner     
--------+-----------------------------+----------+---------------
 public | application                 | table    | loraserver_as
 public | application_id_seq          | sequence | loraserver_as
 public | device                      | table    | loraserver_as
 public | device_activation           | table    | loraserver_as
 public | device_activation_id_seq    | sequence | loraserver_as
 public | device_keys                 | table    | loraserver_as
 public | device_profile              | table    | loraserver_as
 public | device_queue_mapping        | table    | loraserver_as
 public | device_queue_mapping_id_seq | sequence | loraserver_as
 public | gateway                     | table    | loraserver_as
 public | gateway_ping                | table    | loraserver_as
 public | gateway_ping_id_seq         | sequence | loraserver_as
 public | gateway_ping_rx             | table    | loraserver_as
 public | gateway_ping_rx_id_seq      | sequence | loraserver_as
 public | gateway_profile             | table    | loraserver_as
 public | gorp_migrations             | table    | loraserver_as
 public | integration                 | table    | loraserver_as
 public | integration_id_seq          | sequence | loraserver_as
 public | network_server              | table    | loraserver_as
 public | network_server_id_seq       | sequence | loraserver_as
 public | organization                | table    | loraserver_as
 public | organization_id_seq         | sequence | loraserver_as
 public | organization_user           | table    | loraserver_as
 public | organization_user_id_seq    | sequence | loraserver_as
 public | service_profile             | table    | loraserver_as
 public | user                        | table    | loraserver_as
 public | user_id_seq                 | sequence | loraserver_as
(27 rows)

loraserver_as=# select * from device_keys
loraserver_as-# select * from device_keys;
ERROR:  syntax error at or near "select"
LINE 2: select * from device_keys;
        ^
loraserver_as=# select * from device_keys ;
      dev_eui       |          created_at           |          updated_at           |              app_key               | join_nonce 
--------------------+-------------------------------+-------------------------------+------------------------------------+------------
 \x24e124136a390234 | 2020-09-28 15:57:43.703477+08 | 2020-09-28 16:04:50.551366+08 | \x5572404c696e6b4c6f52613230313823 |          1
 \x24e1641194717534 | 2020-09-29 11:49:40.291511+08 | 2020-09-29 17:08:31.070926+08 | \x5572404c696e6b4c6f52613230313823 |          1
 \x24e124136a390442 | 2020-10-12 11:25:39.508542+08 | 2020-10-12 13:07:50.600399+08 | \x5572404c696e6b4c6f52613230313823 |          2
 \x24e124137a370026 | 2020-10-12 13:33:11.302052+08 | 2020-10-12 13:33:11.302052+08 | \x5572404c696e6b4c6f52613230313823 |          0
(4 rows)

  

 

 

而网关的appkey在后台数据库中查看

 

posted @ 2020-10-12 15:06  陈晓猛  阅读(243)  评论(0编辑  收藏  举报