diff --git a/configs/b-l475e-iot01a/README.txt b/configs/b-l475e-iot01a/README.txt index 48a7d8c102..3baeb22c1a 100644 --- a/configs/b-l475e-iot01a/README.txt +++ b/configs/b-l475e-iot01a/README.txt @@ -271,6 +271,109 @@ Configuration sub-directories spirit-6lowpan - This is another NSH configuration that differs from the 'nsh' - configuration in that it has 6LoWPAN networking enabled for the - on-board Spirit1 SPSGRF-915 part. + This is another version of nsh that is similar to the above 'nsh' + configuration but is focused on testing the Spirit1 integration with + the 6LoWPAN network stack. Additional differences + are summarized below: + + NOTES: + + 1. You must must have two b-l475e-iot01a boards. + + 2. IPv6 networking is enabled with TCP/IP, UDP, 6LoWPAN, and NSH + Telnet support. + + 3. Configuration instructions: NSH does not configuration or + bring up the network. Currently that must be done manually. + The configurations steps are: + + a) Assign a unique 8-bit node address to the Spirit1 + + b) Bring the network up: + + nsh> ifup wpan0 + + 4. examples/udp is enabled. This will allow two Spirit1 nodes to + exchange UDP packets. Basic instructions: + + On the server node: + + nsh> ifconfig + nsh> udpserver & + + The ifconfig command will show the IP address of the server. Then on + the client node use this IP address to start the client: + + nsh> udpclient & + + Where is the IP address of the server that you got above. + NOTE: There is no way to stop the UDP test once it has been started + other than by resetting the board. + + 5. examples/nettest is enabled. This will allow two Spirit1 nodes to + exchange TCP packets. Basic instructions: + + On the server node: + + nsh> ifconfig + nsh> tcpserver & + + The ifconfig command will show the IP address of the server. Then on + the client node use this IP address to start the client: + + nsh> tcpclient & + + Where is the IP address of the server that you got above. + NOTE: Unlike the UDP test, there the TCP test will terminate + automatically when the packet exchange is complete. + + 6. The NSH Telnet deamon (server) is enabled. However, it cannot be + started automatically. Rather, it must be started AFTER the network + has been brought up using the NSH 'telnetd' command. You would want + to start the Telent daemon only if you want the node to serve Telent + connections to an NSH shell on the node. + + nsh> ifconfig + nsh> telnetd + + Note the 'ifconfig' is executed to get the IP address of the node. + This address derives from the 8-bit node address that was assigned + when the node was configured. + + 7. This configuration also includes the Telnet client program. This + will allow you to execute a NSH one a node from the command line on + a different node. Like: + + nsh> telnet + + Where is the IP address of the server that you got for + the ifconfig commna on the remote node. Once the telnet session + has been started, you can end the session with: + + nsh> exit + + STATUS: + + 2017-08-01: Testing began. The Spirit1 no configurations with no + errors, but there are no tests yet in place to exercise it. + + 2017-08-02: The nettest, udp, telnet test programs were added. + + + Test Matrix: + The following configurations have been tested: + + TEST DATE + COMPRESSION ADDRESSING UDP TCP + ----------- ---------- ---- ---- + hc06 short --- --- + extended --- --- + hc1 short --- --- + extended --- --- + ipv6 short --- --- + extended --- --- + telnet short N/A --- (hc06) + extended N/A --- + + Other configuration options have not been specifically addressed + (such non-compressable ports, non-MAC based IPv6 addresses, etc.) diff --git a/configs/b-l475e-iot01a/spirit-6lowpan/defconfig b/configs/b-l475e-iot01a/spirit-6lowpan/defconfig index ae3e6929cd..b2537c314a 100644 --- a/configs/b-l475e-iot01a/spirit-6lowpan/defconfig +++ b/configs/b-l475e-iot01a/spirit-6lowpan/defconfig @@ -12,16 +12,33 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH="arm" CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y -CONFIG_DISABLE_POLL=y CONFIG_DRIVERS_WIRELESS=y +CONFIG_EXAMPLES_NETTEST_DEVNAME="wpan0" +CONFIG_EXAMPLES_NETTEST_SERVER_PORTNO=61616 +CONFIG_EXAMPLES_NETTEST_SERVERIPv6ADDR_1=0xfe80 +CONFIG_EXAMPLES_NETTEST_SERVERIPv6ADDR_6=0x00ff +CONFIG_EXAMPLES_NETTEST_SERVERIPv6ADDR_7=0xfe00 +CONFIG_EXAMPLES_NETTEST_SERVERIPv6ADDR_8=0xa900 +CONFIG_EXAMPLES_NETTEST_TARGET2=y +CONFIG_EXAMPLES_NETTEST=y +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y CONFIG_EXAMPLES_NSH=y +CONFIG_EXAMPLES_UDP_CLIENT_PORTNO=61617 +CONFIG_EXAMPLES_UDP_DEVNAME="wpan0" +CONFIG_EXAMPLES_UDP_SERVER_PORTNO=61616 +CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_1=0xfe80 +CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_6=0x00ff +CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_7=0xfe00 +CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_8=0x1000 +CONFIG_EXAMPLES_UDP_TARGET2=y +CONFIG_EXAMPLES_UDP=y CONFIG_FS_PROCFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INTELHEX_BINARY=y CONFIG_IOB_BUFSIZE=96 CONFIG_IOB_NBUFFERS=32 -CONFIG_IOB_THROTTLE=0 +CONFIG_IOB_NCHAINS=16 CONFIG_LIBM=y CONFIG_MAX_TASKS=16 CONFIG_MAX_WDOGPARMS=2 @@ -29,20 +46,29 @@ CONFIG_MM_REGIONS=2 CONFIG_NET_6LOWPAN_FRAMELEN=96 CONFIG_NET_6LOWPAN=y CONFIG_NET_BROADCAST=y -CONFIG_NET_ICMPv6=y CONFIG_NET_IPv6=y +CONFIG_NET_SOCKOPTS=y +CONFIG_NET_STATISTICS=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_TCP=y +CONFIG_NET_TCPBACKLOG=y CONFIG_NET_UDP=y CONFIG_NET=y CONFIG_NETDEV_LATEINIT=y +CONFIG_NETDEV_STATISTICS=y +CONFIG_NETDEV_WIRELESS_IOCTL=y CONFIG_NETDEVICES=y +CONFIG_NETUTILS_TELNETD=y CONFIG_NFILE_DESCRIPTORS=8 CONFIG_NFILE_STREAMS=8 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_DISABLE_GET=y +CONFIG_NSH_DISABLE_PUT=y +CONFIG_NSH_DISABLE_WGET=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LINELEN=64 +CONFIG_NSH_NOMAC=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_PREALLOC_TIMERS=4 @@ -52,16 +78,18 @@ CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_LPWORK=y +CONFIG_SCHED_LPWORKPRIORITY=160 CONFIG_SCHED_WAITPID=y CONFIG_SDCLONE_DISABLE=y CONFIG_SPIRIT_NETDEV=y -CONFIG_START_DAY=6 -CONFIG_START_MONTH=12 -CONFIG_START_YEAR=2011 +CONFIG_START_DAY=2 +CONFIG_START_MONTH=8 CONFIG_STM32L4_SPI3=y CONFIG_STM32L4_USART1=y CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_WATCHDOG=y CONFIG_WIRELESS_PKTRADIO=y CONFIG_WIRELESS=y diff --git a/drivers/wireless/spirit/drivers/Kconfig b/drivers/wireless/spirit/drivers/Kconfig index 461c48e498..ed3ca35fd7 100644 --- a/drivers/wireless/spirit/drivers/Kconfig +++ b/drivers/wireless/spirit/drivers/Kconfig @@ -7,6 +7,7 @@ config SPIRIT_NETDEV bool "STMicro Spirit1-based Network Driver" default n select WL_SPIRIT + select ARCH_HAVE_NETDEV_STATISTICS ---help--- This selection enables support for the TMicro Spirit1-based device. This configuration generates an IEEE802.15.4 work-alike radio device that diff --git a/drivers/wireless/spirit/drivers/spirit_netdev.c b/drivers/wireless/spirit/drivers/spirit_netdev.c index 9e90698354..7bb4a9e55f 100644 --- a/drivers/wireless/spirit/drivers/spirit_netdev.c +++ b/drivers/wireless/spirit/drivers/spirit_netdev.c @@ -825,7 +825,7 @@ static void spirit_interrupt_work(FAR void *arg) DEBUGVERIFY(spirit_management_rxstrobe(spirit)); DEBUGVERIFY(spirit_command(spirit, CMD_RX)); - NETDEV_TXDONE(&priv->radio.r_dev) + NETDEV_TXDONE(&priv->radio.r_dev); spirit_csma_enable(spirit, S_DISABLE); /* Check if there are more packets to send */ @@ -1660,7 +1660,7 @@ static int spirit_req_data(FAR struct sixlowpan_driver_s *netdev, { /* Increment statistics */ - NETDEV_TXPACKETS(&priv->md_dev.r_dev); + NETDEV_TXPACKETS(&priv->radio.r_dev); /* Remove the IOB from the queue */