Skip to content

Commit 7f92ff9

Browse files
committed
Polish
1 parent 344c344 commit 7f92ff9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/lorawan_gw_router.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ handle_cast({downlink, {MAC, GWState}, DevAddr, TxQ, RFCh, PHYPayload}, #state{g
101101
Dict2 = dict:store(MAC, Stats#gwstats{tx_times=[{TxQ#txq.freq, Time} | TxTimes]}, Dict),
102102
{noreply, State#state{gateways=Dict2}};
103103
error ->
104-
lager:warning("Downlink request ignored. Gateway ~w not connected.", [MAC]),
104+
lager:warning("Downlink request ignored. Gateway ~s not connected.", [lorawan_utils:binary_to_hex(MAC)]),
105105
{noreply, State}
106106
end;
107107

src/lorawan_mac.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ingest_frame(MAC, <<MType:3, _:3, 0:2, _/binary>> = PHYPayload) when byte_size(P
2727
end),
2828
Res;
2929
ingest_frame(MAC, PHYPayload) ->
30-
lager:warning("~s unknown frame protocol: ~p", [binary_to_hex(MAC), PHYPayload]),
30+
lager:warning("gateway ~s received unknown frame protocol: ~p", [binary_to_hex(MAC), PHYPayload]),
3131
ignore.
3232

3333
ingest_frame0(MAC, 2#000, <<_, AppEUI0:8/binary, DevEUI0:8/binary,
@@ -59,7 +59,7 @@ ingest_frame0(MAC, MType, <<_, DevAddr0:4/binary, ADR:1, ADRACKReq:1, ACK:1, _RF
5959
ingest_data_frame(MAC, MType, Msg, FOpts, FRMPayload, MIC,
6060
#frame{conf=Confirm, devaddr=DevAddr, adr=ADR, adr_ack_req=ADRACKReq, ack=ACK, fcnt=FCnt, port=Port});
6161
ingest_frame0(MAC, MType, Msg, _MIC) ->
62-
lager:warning("~s bad frame (mtype ~.2B): ~p", [binary_to_hex(MAC), MType, Msg]),
62+
lager:warning("gateway ~s received bad frame (mtype ~.2B): ~p", [binary_to_hex(MAC), MType, Msg]),
6363
ignore.
6464

6565
ingest_data_frame(_MAC, MType, Msg, FOpts, FRMPayload, MIC,
@@ -94,7 +94,7 @@ ingest_data_frame(_MAC, MType, Msg, FOpts, FRMPayload, MIC,
9494
{ignore, Frame}
9595
end;
9696
ingest_data_frame(MAC, MType, _Msg, _FOpts, _FRMPayload, _MIC, #frame{devaddr=DevAddr}) ->
97-
lager:warning("~s ~s downlink frame (mtype ~.2B)", [binary_to_hex(MAC), binary_to_hex(DevAddr), MType]),
97+
lager:warning("gateway ~s received ~s downlink frame (mtype ~.2B)", [binary_to_hex(MAC), binary_to_hex(DevAddr), MType]),
9898
ignore.
9999

100100
handle_join(MAC, #device{deveui=DevEUI, profile=ProfID}=Device, DevNonce) ->
@@ -106,7 +106,7 @@ handle_join(MAC, #device{deveui=DevEUI, profile=ProfID}=Device, DevNonce) ->
106106
[] ->
107107
{error, {device, DevEUI}, {unknown_group, GroupName}, aggregated};
108108
[#group{can_join=false}] ->
109-
lager:warning("~s join ignored from DevEUI ~s", [binary_to_hex(MAC), binary_to_hex(DevEUI)]),
109+
lager:warning("gateway ~s ignored join from DevEUI ~s", [binary_to_hex(MAC), binary_to_hex(DevEUI)]),
110110
ignore;
111111
[#group{network=NetName, subid=SubID}] ->
112112
case mnesia:read(network, NetName, read) of

0 commit comments

Comments
 (0)