{"action":"created","issue":{"url":"https://api.github.com/repos/gotthardp/lorawan-server/issues/385","repository_url":"https://api.github.com/repos/gotthardp/lorawan-server","labels_url":"https://api.github.com/repos/gotthardp/lorawan-server/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/gotthardp/lorawan-server/issues/385/comments","events_url":"https://api.github.com/repos/gotthardp/lorawan-server/issues/385/events","html_url":"https://github.com/gotthardp/lorawan-server/issues/385","id":321301092,"number":385,"title":"Australian region configuration issues","user":{"login":"romansoft","id":5790506,"avatar_url":"https://avatars0.githubusercontent.com/u/5790506?v=4","gravatar_id":"","url":"https://api.github.com/users/romansoft","html_url":"https://github.com/romansoft","followers_url":"https://api.github.com/users/romansoft/followers","following_url":"https://api.github.com/users/romansoft/following{/other_user}","gists_url":"https://api.github.com/users/romansoft/gists{/gist_id}","starred_url":"https://api.github.com/users/romansoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romansoft/subscriptions","organizations_url":"https://api.github.com/users/romansoft/orgs","repos_url":"https://api.github.com/users/romansoft/repos","events_url":"https://api.github.com/users/romansoft/events{/privacy}","received_events_url":"https://api.github.com/users/romansoft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-08T18:41:53Z","updated_at":"2018-05-08T21:03:18Z","closed_at":null,"author_association":"NONE","body":"I set up the network for Australia region and there are issues with it. \r\n\r\nFirstly, the Data Rate settings are mismatched. What I mean is when SF/BW settings are defined in ADR, they result in wrong DR commands sent to a node. For example, in debug log, I see that DR 0 sent to device corresponds to SF12/125kHz, instead of SF10/125kHz, and so on for other DR settings. That is DR definitions are shifted with respect to SF definitions. \r\n\r\n2018-05-07 16:43:11.961 [debug] <0.23685.1>@lorawan_mac_commands:send_adr:332 LinkADRReq {5,3,[{8,15},{65,65}]}\r\n2018-05-07 16:43:11.961 [debug] <0.23685.1>@lorawan_mac_commands:build_fopts:74 03D994F9 <- [{link_adr_req,3,5,2,7,0},{link_adr_req,3,5,65280,0,0}]\r\n2018-05-07 16:43:56.393 [debug] <0.23729.1>@lorawan_mac_commands:handle_fopts:16 03D994F9 -> [{link_adr_ans,1,1,1},{link_adr_ans,1,1,1}]\r\n2018-05-07 16:43:56.393 [debug] <0.23729.1>@lorawan_mac_commands:handle_adr:159 LinkADRReq 03D994F9 succeeded\r\n2018-05-07 16:43:56.393 [debug] <0.23729.1>@lorawan_mac_commands:build_fopts:74 03D994F9 <- [dev_status_req]\r\n2018-05-07 16:47:40.166 [debug] <0.23898.1>@lorawan_mac_commands:handle_fopts:16 03D994F9 -> [{dev_status_ans,165,6}]\r\n2018-05-07 16:47:40.166 [debug] <0.23898.1>@lorawan_mac_commands:store_actual_adr:139 DataRate 03D994F9 switched to dr 5\r\n2018-05-07 16:47:40.166 [debug] <0.23898.1>@lorawan_mac_commands:handle_status:219 DevStatus: battery 165, margin: 6 (max -7.5)\r\n2018-05-07 16:47:59.331 [warning] <0.22912.1> server {http_error,{412,\"/api/nodes/03D994F9\"}}\r\n2018-05-07 16:48:28.795 [debug] <0.23968.1>@lorawan_mac_commands:send_adr:332 LinkADRReq {5,2,[{8,15},{65,65}]}\r\n2018-05-07 16:48:28.795 [debug] <0.23968.1>@lorawan_mac_commands:build_fopts:74 03D994F9 <- [{link_adr_req,2,5,2,7,0},{link_adr_req,2,5,65280,0,0}]\r\n2018-05-07 16:50:16.830 [warning] <0.24038.1> node 039EB91B {uplinks_missed,1}\r\n2018-05-07 16:50:27.310 [debug] <0.24050.1>@lorawan_mac_commands:handle_fopts:16 03D994F9 -> [{link_adr_ans,1,1,1},{link_adr_ans,1,1,1}]\r\n2018-05-07 16:50:27.310 [debug] <0.24050.1>@lorawan_mac_commands:store_actual_adr:139 DataRate 03D994F9 switched to dr 4\r\n2018-05-07 16:50:27.310 [debug] <0.24050.1>@lorawan_mac_commands:handle_adr:159 LinkADRReq 03D994F9 succeeded\r\n2018-05-07 16:50:27.310 [debug] <0.24050.1>@lorawan_mac_commands:build_fopts:74 03D994F9 <- [dev_status_req]\r\n2018-05-07 16:52:07.869 [debug] <0.24150.1>@lorawan_mac_commands:handle_fopts:16 03D994F9 -> [{dev_status_ans,166,8}]\r\n2018-05-07 16:52:07.869 [debug] <0.24150.1>@lorawan_mac_commands:store_actual_adr:139 DataRate 03D994F9 switched to dr 4\r\n2018-05-07 16:52:07.869 [debug] <0.24150.1>@lorawan_mac_commands:handle_status:219 DevStatus: battery 166, margin: 8 (max -10.0)\r\n2018-05-07 16:52:34.878 [warning] <0.22912.1> server {http_error,{412,\"/api/nodes/03D994F9\"}}\r\n2018-05-07 16:53:03.143 [debug] <0.24209.1>@lorawan_mac_commands:send_adr:332 LinkADRReq {5,0,[{8,15},{65,65}]}\r\n2018-05-07 16:53:03.143 [debug] <0.24209.1>@lorawan_mac_commands:build_fopts:74 03D994F9 <- [{link_adr_req,0,5,2,7,0},{link_adr_req,0,5,65280,0,0}]\r\n2018-05-07 16:53:20.792 [debug] <0.24222.1>@lorawan_mac_commands:handle_fopts:16 03D994F9 -> [{link_adr_ans,1,1,1},{link_adr_ans,1,1,1}]\r\n2018-05-07 16:53:20.792 [debug] <0.24222.1>@lorawan_mac_commands:store_actual_adr:139 DataRate 03D994F9 switched to dr 2\r\n2018-05-07 16:53:20.792 [debug] <0.24222.1>@lorawan_mac_commands:handle_adr:159 LinkADRReq 03D994F9 succeeded\r\n2018-05-07 16:53:20.792 [debug] <0.24222.1>@lorawan_mac_commands:build_fopts:74 03D994F9 <- [dev_status_req]\r\n2018-05-07 16:53:24.375 [debug] <0.24225.1>@lorawan_mac_commands:handle_fopts:16 03D994F9 -> [{dev_status_ans,165,6}]\r\n2018-05-07 16:53:24.375 [debug] <0.24225.1>@lorawan_mac_commands:store_actual_adr:139 DataRate 03D994F9 switched to dr 2\r\n2018-05-07 16:53:24.375 [debug] <0.24225.1>@lorawan_mac_commands:handle_status:219 DevStatus: battery 165, margin: 6 (max -15.0)\r\n \r\nSecondly, adding the new AU region is now creating errors for US network nodes. Here is the debug log excerpt for one of US nodes. This happens on missed node uplinks. Something got corrupted in NS.\r\n\r\ndebug.log :\r\n2018-05-08 18:04:22.299 [warning] <0.12948.3> node 03BE93C3 {uplinks_missed,1}\r\n2018-05-08 18:04:22.500 [debug] <0.12948.3>@lorawan_mac_commands:build_fopts:74 03BE93C3 <- [dev_status_req]\r\n2018-05-08 18:04:22.500 [error] <0.12948.3>@lorawan_mac_region:f2ch:55 gen_statem <0.12948.3> in state uplink terminated with reason: no function clause matching lorawan_mac_region:f2ch(903.3, {9152,2}, {9159,16}) line 55\r\n2018-05-08 18:04:22.501 [error] <0.12948.3>@lorawan_mac_region:f2ch:55 CRASH REPORT Process <0.12948.3> with 0 neighbours crashed with reason: no function clause matching lorawan_mac_region:f2ch(903.3, {9152,2}, {9159,16}) line 55\r\n2018-05-08 18:04:22.501 [error] <0.12804.3>@lorawan_mac_region:f2ch:55 Supervisor lorawan_handler_sup had child handler started with lorawan_handler:start_link() at <0.12948.3> exit with reason no function clause matching lorawan_mac_region:f2ch(903.3, {9152,2}, {9159,16}) line 55 in context child_terminated\r\n"},"comment":{"url":"https://api.github.com/repos/gotthardp/lorawan-server/issues/comments/387541581","html_url":"https://github.com/gotthardp/lorawan-server/issues/385#issuecomment-387541581","issue_url":"https://api.github.com/repos/gotthardp/lorawan-server/issues/385","id":387541581,"user":{"login":"gotthardp","id":939979,"avatar_url":"https://avatars1.githubusercontent.com/u/939979?v=4","gravatar_id":"","url":"https://api.github.com/users/gotthardp","html_url":"https://github.com/gotthardp","followers_url":"https://api.github.com/users/gotthardp/followers","following_url":"https://api.github.com/users/gotthardp/following{/other_user}","gists_url":"https://api.github.com/users/gotthardp/gists{/gist_id}","starred_url":"https://api.github.com/users/gotthardp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gotthardp/subscriptions","organizations_url":"https://api.github.com/users/gotthardp/orgs","repos_url":"https://api.github.com/users/gotthardp/repos","events_url":"https://api.github.com/users/gotthardp/events{/privacy}","received_events_url":"https://api.github.com/users/gotthardp/received_events","type":"User","site_admin":false},"created_at":"2018-05-08T21:03:18Z","updated_at":"2018-05-08T21:03:18Z","author_association":"OWNER","body":"Thanks. I will double check the algorithm."}}
{"actor":{"display_login":"gotthardp"}}