[riot-notifications] [RIOT-OS/RIOT] gnrc_lorawan: encode LoRaWAN port in netif header (#16080)

MrKevinWeiss notifications at github.com
Tue Jun 15 10:16:44 CEST 2021


I also went through the documentation and played around with it
```
USEMODULE=sx1272 DRIVER=sx1272 BOARD=nucleo-l452re make flash term -C examples/gnrc_lorawan/
```

<details><summary>device</summary>

```
weiss at mobiweiss:~/wd/RIOT$ USEMODULE=sx1272 DRIVER=sx1272 BOARD=nucleo-l452re make flash term -C examples/gnrc_lorawan/
make: Entering directory '/home/weiss/wd/RIOT/examples/gnrc_lorawan'
Building application "gnrc_lorawan" for "nucleo-l452re" with MCU "stm32".

"make" -C /home/weiss/wd/RIOT/boards/nucleo-l452re
"make" -C /home/weiss/wd/RIOT/boards/common/nucleo
"make" -C /home/weiss/wd/RIOT/core
"make" -C /home/weiss/wd/RIOT/cpu/stm32
"make" -C /home/weiss/wd/RIOT/cpu/cortexm_common
"make" -C /home/weiss/wd/RIOT/cpu/cortexm_common/periph
"make" -C /home/weiss/wd/RIOT/cpu/stm32/periph
"make" -C /home/weiss/wd/RIOT/cpu/stm32/stmclk
"make" -C /home/weiss/wd/RIOT/cpu/stm32/vectors
"make" -C /home/weiss/wd/RIOT/drivers
"make" -C /home/weiss/wd/RIOT/drivers/netdev
"make" -C /home/weiss/wd/RIOT/drivers/periph_common
"make" -C /home/weiss/wd/RIOT/drivers/sx127x
"make" -C /home/weiss/wd/RIOT/sys
"make" -C /home/weiss/wd/RIOT/sys/auto_init
"make" -C /home/weiss/wd/RIOT/sys/crypto
"make" -C /home/weiss/wd/RIOT/sys/div
"make" -C /home/weiss/wd/RIOT/sys/fmt
"make" -C /home/weiss/wd/RIOT/sys/frac
"make" -C /home/weiss/wd/RIOT/sys/hashes
"make" -C /home/weiss/wd/RIOT/sys/iolist
"make" -C /home/weiss/wd/RIOT/sys/isrpipe
"make" -C /home/weiss/wd/RIOT/sys/luid
"make" -C /home/weiss/wd/RIOT/sys/malloc_thread_safe
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/link_layer/lorawan
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/netapi
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/netif
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/netif/hdr
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/netif/init_devs
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/netif/lorawan
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/netreg
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/pkt
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/pktbuf
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/pktbuf_static
"make" -C /home/weiss/wd/RIOT/sys/net/gnrc/pktdump
"make" -C /home/weiss/wd/RIOT/sys/net/link_layer/eui_provider
"make" -C /home/weiss/wd/RIOT/sys/net/link_layer/l2util
"make" -C /home/weiss/wd/RIOT/sys/net/netif
"make" -C /home/weiss/wd/RIOT/sys/newlib_syscalls_default
"make" -C /home/weiss/wd/RIOT/sys/od
"make" -C /home/weiss/wd/RIOT/sys/pm_layered
"make" -C /home/weiss/wd/RIOT/sys/random
"make" -C /home/weiss/wd/RIOT/sys/random/tinymt32
"make" -C /home/weiss/wd/RIOT/sys/shell
"make" -C /home/weiss/wd/RIOT/sys/shell/commands
"make" -C /home/weiss/wd/RIOT/sys/stdio_uart
"make" -C /home/weiss/wd/RIOT/sys/tsrb
"make" -C /home/weiss/wd/RIOT/sys/xtimer
"make" -C /home/weiss/wd/RIOT/sys/ztimer
   text	   data	    bss	    dec	    hex	filename
  54144	    196	   6472	  60812	   ed8c	/home/weiss/wd/RIOT/examples/gnrc_lorawan/bin/nucleo-l452re/gnrc_lorawan.elf
/home/weiss/wd/RIOT/dist/tools/openocd/openocd.sh flash /home/weiss/wd/RIOT/examples/gnrc_lorawan/bin/nucleo-l452re/gnrc_lorawan.elf
### Flashing Target ###
Open On-Chip Debugger 0.11.0+dev-00035-g8d6f7c922-dirty (2021-03-16-15:33)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
hla_swd
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : DEPRECATED target event trace-config
srst_only separate srst_nogate srst_open_drain connect_assert_srst

Info : clock speed 500 kHz
Info : STLINK V2J29M18 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.247800
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32l4x.cpu on 0
Info : Listening on port 40869 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32l4x.cpu       hla_target little stm32l4x.cpu       reset

Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000c50 msp: 0x20000200
Info : device idcode = 0x20016462 (STM32L45/L46xx - Rev Y : 0x2001)
Info : flash size = 512kbytes
Info : flash mode : single-bank
Info : Padding image section 1 at 0x0800d444 with 4 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x0800d448 .. 0x0800d7ff
auto erase enabled
wrote 54344 bytes from file /home/weiss/wd/RIOT/examples/gnrc_lorawan/bin/nucleo-l452re/gnrc_lorawan.elf in 2.447983s (21.679 KiB/s)

verified 54340 bytes in 1.679086s (31.604 KiB/s)

Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
shutdown command invoked
Done flashing
/home/weiss/wd/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2021-06-15 10:04:59,602 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
ifconfig 3 set deveui ****
2021-06-15 10:05:08,276 # ifconfig 3 set deveui ****
2021-06-15 10:05:08,282 # success: set long address on interface 3 to ****
> ifconf 3 set appeui ****
2021-06-15 10:05:12,332 # ifconfig 3 set appeui ****
2021-06-15 10:05:12,337 # success: set AppEUI on interface 3 to ****
> ifconf 3 set appkey ****
2021-06-15 10:05:15,134 # ifconfig 3 set appkey ****
2021-06-15 10:05:15,139 # success: set AppKey on interface 3 to *****
> ifconfig up
2021-06-15 10:05:17,129 # ifconfig 3 up
ifconfig
2021-06-15 10:05:39,385 # ifconfig
2021-06-15 10:05:39,394 # Iface  3  HWaddr: 26:01:4B:CA  Frequency: 869524963Hz  RSSI: 117  BW: 125kHz  SF: 12  CR: 4/5  Link: up 
2021-06-15 10:05:39,401 #            TX-Power: 14dBm  State: SLEEP  Demod margin.: 0  Num gateways.: 0 
2021-06-15 10:05:39,403 #           IQ_INVERT  
2021-06-15 10:05:39,407 #           RX_SINGLE  OTAA  L2-PDU:255  
2021-06-15 10:05:39,408 #           
> txtsnd 3 7B "Hello RIOT!"
2021-06-15 10:06:00,146 # txtsnd 3 7B "Hello RIOT!"
> 2021-06-15 10:06:03,844 # PKTDUMP: data received:
2021-06-15 10:06:03,849 # ~~ SNIP  0 - size:  12 byte, type: NETTYPE_UNDEF (0)
2021-06-15 10:06:03,854 # 00000000  00  65  11  11  01  65  22  22  02  65  33  33
2021-06-15 10:06:03,859 # ~~ SNIP  1 - size:   9 byte, type: NETTYPE_NETIF (-1)
2021-06-15 10:06:03,861 # if_pid: 3  rssi: -32768  lqi: 0
2021-06-15 10:06:03,862 # flags: 0x0
2021-06-15 10:06:03,863 # src_l2addr: (nil)
2021-06-15 10:06:03,865 # dst_l2addr: 01
2021-06-15 10:06:03,869 # ~~ PKT    -  2 snips, total size:  21 byte
ifconfig 3 set dr 2
2021-06-15 10:06:09,770 # ifconfig 3 set dr 2
2021-06-15 10:06:09,774 # success: set datarate on interface 3 to 2
> ifconfig 3 link_check
2021-06-15 10:06:17,546 # ifconfig 3 link_check
2021-06-15 10:06:17,548 # success: set option
> txtsnd 3 01 "Join the RIOT!"
2021-06-15 10:06:28,251 # txtsnd 3 01 "Join the RIOT!"
> ifconfig 3 ack_req
2021-06-15 10:06:40,114 # ifconfig 3 ack_req
2021-06-15 10:06:40,116 # success: set option
> txtsnd 3 01 "My confirmable message"
2021-06-15 10:06:47,956 # txtsnd 3 01 "My confirmable message"
> txtsnd 3 01 "My confirmable message"
2021-06-15 10:07:01,212 # txtsnd 3 01 "My confirmable message"
> txtsnd 3 01 "My confirmable message"
2021-06-15 10:07:05,979 # txtsnd 3 01 "My confirmable message"
> 
```
</details>

<details><summary>application interface</summary>

![Screenshot from 2021-06-15 10-14-16](https://user-images.githubusercontent.com/19396439/122017754-88f46680-cdc2-11eb-90ed-6e418d2de82c.png)

</details>

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16080#issuecomment-861289515
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210615/b10f0ab0/attachment.htm>


More information about the notifications mailing list