mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
Spirit + 6LoWPAN: In STAR configuration, Spirit must use a configured well known hub address. 6LoWPAN cannot assume that the PAN coordinator is the STAR hub; it must ask the radio to provide it with the address of the star hub
This commit is contained in:
@@ -75,4 +75,12 @@ config SPIRIT_CRCDISABLE
|
||||
---help---
|
||||
Disables CRC calculation and filtering. Default is enabled.
|
||||
|
||||
config SPIRIT_HUBNODE
|
||||
hex "Address of hub node"
|
||||
default 0x34
|
||||
depends on NET_STAR
|
||||
---help---
|
||||
Provides the "well known" address of the hub node in the
|
||||
star configuration.
|
||||
|
||||
endif # SPIRIT_NETDEV
|
||||
|
||||
@@ -148,7 +148,11 @@
|
||||
|
||||
/* Default node address */
|
||||
|
||||
#define SPIRIT_NODE_ADDR 0x34
|
||||
#if defined(CONFIG_NET_STARHUB) && defined(CONFIG_SPIRIT_HUBNODE)
|
||||
# define SPIRIT_NODE_ADDR CONFIG_SPIRIT_HUBNODE
|
||||
#else
|
||||
# define SPIRIT_NODE_ADDR 0x34
|
||||
#endif
|
||||
|
||||
/* TX poll delay = 1 seconds. CLK_TCK is the number of clock ticks per second */
|
||||
|
||||
@@ -1995,6 +1999,14 @@ static int spirit_properties(FAR struct sixlowpan_driver_s *netdev,
|
||||
|
||||
properties->sp_bcast.nv_addrlen = 1;
|
||||
properties->sp_bcast.nv_addr[0] = SPIRIT_BCAST_ADDRESS;
|
||||
|
||||
#ifdef CONFIG_NET_STARPOINT
|
||||
/* Star hub node address */
|
||||
|
||||
properties->sp_hubnode.nv_addrlen = 1;
|
||||
properties->sp_hubnode.nv_addr[0] = CONFIG_SPIRIT_HUBNODE;
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user