forked from nuttx/nuttx-update
6LoWPAN: Add debug statements; Update configuration, need to specific 6LoWPAN compatible port numbers.
This commit is contained in:
parent
68a2b84277
commit
6dafb4f532
6 changed files with 41 additions and 47 deletions
18
Kconfig
18
Kconfig
|
@ -848,15 +848,6 @@ config DEBUG_SYSCALL_INFO
|
||||||
|
|
||||||
endif # DEBUG_SYSCALL
|
endif # DEBUG_SYSCALL
|
||||||
|
|
||||||
config DEBUG_WIRELESS
|
|
||||||
bool "Wireless Device Debug Output"
|
|
||||||
default n
|
|
||||||
depends on WIRELESS
|
|
||||||
---help---
|
|
||||||
Enable low level debug SYSLOG output from the wireless subsystem and
|
|
||||||
device drivers. (disabled by default). Support for this debug option
|
|
||||||
is architecture-specific and may not be available for some MCUs.
|
|
||||||
|
|
||||||
comment "OS Function Debug Options"
|
comment "OS Function Debug Options"
|
||||||
|
|
||||||
config DEBUG_DMA
|
config DEBUG_DMA
|
||||||
|
@ -1107,6 +1098,15 @@ config DEBUG_ANALOG_INFO
|
||||||
|
|
||||||
endif # DEBUG_ANALOG
|
endif # DEBUG_ANALOG
|
||||||
|
|
||||||
|
config DEBUG_WIRELESS
|
||||||
|
bool "Wireless Device Debug Output"
|
||||||
|
default n
|
||||||
|
depends on WIRELESS
|
||||||
|
---help---
|
||||||
|
Enable low level debug SYSLOG output from the wireless subsystem and
|
||||||
|
device drivers. (disabled by default). Support for this debug option
|
||||||
|
is architecture-specific and may not be available for some MCUs.
|
||||||
|
|
||||||
config DEBUG_CAN
|
config DEBUG_CAN
|
||||||
bool "CAN Debug Features"
|
bool "CAN Debug Features"
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -1374,6 +1374,8 @@ CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_5=0x0000
|
||||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_6=0x00ff
|
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_6=0x00ff
|
||||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_7=0xfe00
|
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_7=0xfe00
|
||||||
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_8=0x0d00
|
CONFIG_EXAMPLES_UDP_SERVERIPv6ADDR_8=0x0d00
|
||||||
|
CONFIG_EXAMPLES_SERVER_PORTNO=61616
|
||||||
|
CONFIG_EXAMPLES_CLIENT_PORTNO=61617
|
||||||
# CONFIG_EXAMPLES_UDPBLASTER is not set
|
# CONFIG_EXAMPLES_UDPBLASTER is not set
|
||||||
# CONFIG_EXAMPLES_USBSERIAL is not set
|
# CONFIG_EXAMPLES_USBSERIAL is not set
|
||||||
# CONFIG_EXAMPLES_WATCHDOG is not set
|
# CONFIG_EXAMPLES_WATCHDOG is not set
|
||||||
|
|
|
@ -82,7 +82,8 @@ Optimal 6LoWPAN Configuration
|
||||||
fe80 0000 0000 0000 0000 00ff fe00 MMMM 2-byte short address IEEE 48-bit MAC
|
fe80 0000 0000 0000 0000 00ff fe00 MMMM 2-byte short address IEEE 48-bit MAC
|
||||||
fe80 0000 0000 0000 NNNN NNNN NNNN NNNN 8-byte extended address IEEE EUI-64
|
fe80 0000 0000 0000 NNNN NNNN NNNN NNNN 8-byte extended address IEEE EUI-64
|
||||||
|
|
||||||
4. Compressable port numbers in the rangs 0xf0b0-0xf0bf
|
4. To be compressable, port numbers must be in the range 0xf0b0-0xf0bf,
|
||||||
|
hexadecimal. That is 61616-61631 decimal.
|
||||||
|
|
||||||
5. IOBs: Must be big enough to hold one IEEE802.15.4 frame (CONFIG_NET_6LOWPAN_FRAMELEN,
|
5. IOBs: Must be big enough to hold one IEEE802.15.4 frame (CONFIG_NET_6LOWPAN_FRAMELEN,
|
||||||
typically 127). There must be enough IOBs to decompose the largest IPv6
|
typically 127). There must be enough IOBs to decompose the largest IPv6
|
||||||
|
|
|
@ -224,6 +224,8 @@ int sixlowpan_queue_frames(FAR struct ieee802154_driver_s *ieee,
|
||||||
#endif
|
#endif
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
ninfo("buflen=%lu", (unsigned long)buflen);
|
||||||
|
|
||||||
/* Initialize global data. Locking the network guarantees that we have
|
/* Initialize global data. Locking the network guarantees that we have
|
||||||
* exclusive use of the global values for intermediate calculations.
|
* exclusive use of the global values for intermediate calculations.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -182,7 +182,7 @@ static uint16_t send_interrupt(FAR struct net_driver_s *dev,
|
||||||
|
|
||||||
if ((flags & NETDEV_DOWN) != 0)
|
if ((flags & NETDEV_DOWN) != 0)
|
||||||
{
|
{
|
||||||
ninfo("Device is down\n");
|
nwarn("WARNING: Device is down\n");
|
||||||
sinfo->s_result = -ENOTCONN;
|
sinfo->s_result = -ENOTCONN;
|
||||||
goto end_wait;
|
goto end_wait;
|
||||||
}
|
}
|
||||||
|
@ -279,6 +279,8 @@ int sixlowpan_send(FAR struct net_driver_s *dev,
|
||||||
{
|
{
|
||||||
struct sixlowpan_send_s sinfo;
|
struct sixlowpan_send_s sinfo;
|
||||||
|
|
||||||
|
ninfo("len=%lu timeout=%u\n", (unsigned long)len, timeout);
|
||||||
|
|
||||||
/* Initialize the send state structure */
|
/* Initialize the send state structure */
|
||||||
|
|
||||||
sem_init(&sinfo.s_waitsem, 0, 0);
|
sem_init(&sinfo.s_waitsem, 0, 0);
|
||||||
|
@ -301,16 +303,16 @@ int sixlowpan_send(FAR struct net_driver_s *dev,
|
||||||
* device related events, no connect-related events.
|
* device related events, no connect-related events.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sinfo.s_cb = devif_callback_alloc(dev, list);
|
sinfo.s_cb = devif_callback_alloc(dev, list);
|
||||||
if (sinfo.s_cb != NULL)
|
if (sinfo.s_cb != NULL)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Set up the callback in the connection */
|
/* Set up the callback in the connection */
|
||||||
|
|
||||||
sinfo.s_cb->flags = (NETDEV_DOWN | WPAN_POLL);
|
sinfo.s_cb->flags = (NETDEV_DOWN | WPAN_POLL);
|
||||||
sinfo.s_cb->priv = (FAR void *)&sinfo;
|
sinfo.s_cb->priv = (FAR void *)&sinfo;
|
||||||
sinfo.s_cb->event = send_interrupt;
|
sinfo.s_cb->event = send_interrupt;
|
||||||
|
|
||||||
/* Notify the IEEE802.15.4 MAC that we have data to send. */
|
/* Notify the IEEE802.15.4 MAC that we have data to send. */
|
||||||
|
|
||||||
|
@ -322,6 +324,8 @@ int sixlowpan_send(FAR struct net_driver_s *dev,
|
||||||
* automatically re-enabled when the task restarts.
|
* automatically re-enabled when the task restarts.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
ninfo("Wait for send complete\n");
|
||||||
|
|
||||||
ret = net_lockedwait(&sinfo.s_waitsem);
|
ret = net_lockedwait(&sinfo.s_waitsem);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -676,27 +676,6 @@ static int macnet_txpoll_callback(FAR struct net_driver_s *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: macnet_txpoll_process
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Perform the periodic poll. This may be called either from watchdog
|
|
||||||
* timer logic or from the worker thread, depending upon the configuration.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* priv - Reference to the driver state structure
|
|
||||||
*
|
|
||||||
* Returned Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Assumptions:
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
static inline void macnet_txpoll_process(FAR struct macnet_driver_s *priv)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: macnet_txpoll_work
|
* Name: macnet_txpoll_work
|
||||||
*
|
*
|
||||||
|
@ -792,20 +771,20 @@ static int macnet_ifup(FAR struct net_driver_s *dev)
|
||||||
ret = macnet_advertise(dev);
|
ret = macnet_advertise(dev);
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
{
|
{
|
||||||
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
wlinfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
||||||
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
|
dev->d_ipv6addr[0], dev->d_ipv6addr[1], dev->d_ipv6addr[2],
|
||||||
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
|
dev->d_ipv6addr[3], dev->d_ipv6addr[4], dev->d_ipv6addr[5],
|
||||||
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
|
dev->d_ipv6addr[6], dev->d_ipv6addr[7]);
|
||||||
|
|
||||||
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR
|
||||||
ninfo(" Node: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
|
wlinfo(" Node: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||||
dev->d_mac.ieee802154.u8[0], dev->d_mac.ieee802154.u8[1],
|
dev->d_mac.ieee802154.u8[0], dev->d_mac.ieee802154.u8[1],
|
||||||
dev->d_mac.ieee802154.u8[2], dev->d_mac.ieee802154.u8[3],
|
dev->d_mac.ieee802154.u8[2], dev->d_mac.ieee802154.u8[3],
|
||||||
dev->d_mac.ieee802154.u8[4], dev->d_mac.ieee802154.u8[5],
|
dev->d_mac.ieee802154.u8[4], dev->d_mac.ieee802154.u8[5],
|
||||||
dev->d_mac.ieee802154.u8[6], dev->d_mac.ieee802154.u8[7]);
|
dev->d_mac.ieee802154.u8[6], dev->d_mac.ieee802154.u8[7]);
|
||||||
#else
|
#else
|
||||||
ninfo(" Node: %02x:%02x\n",
|
wlinfo(" Node: %02x:%02x\n",
|
||||||
dev->d_mac.ieee802154.u8[0], dev->d_mac.ieee802154.u8[1]);
|
dev->d_mac.ieee802154.u8[0], dev->d_mac.ieee802154.u8[1]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set and activate a timer process */
|
/* Set and activate a timer process */
|
||||||
|
@ -884,6 +863,8 @@ static void macnet_txavail_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct macnet_driver_s *priv = (FAR struct macnet_driver_s *)arg;
|
FAR struct macnet_driver_s *priv = (FAR struct macnet_driver_s *)arg;
|
||||||
|
|
||||||
|
wlinfo("ifup=%u\n", priv->md_bifup);
|
||||||
|
|
||||||
/* Lock the network and serialize driver operations if necessary.
|
/* Lock the network and serialize driver operations if necessary.
|
||||||
* NOTE: Serialization is only required in the case where the driver work
|
* NOTE: Serialization is only required in the case where the driver work
|
||||||
* is performed on an LP worker thread and where more than one LP worker
|
* is performed on an LP worker thread and where more than one LP worker
|
||||||
|
@ -929,6 +910,8 @@ static int macnet_txavail(FAR struct net_driver_s *dev)
|
||||||
{
|
{
|
||||||
FAR struct macnet_driver_s *priv = (FAR struct macnet_driver_s *)dev->d_private;
|
FAR struct macnet_driver_s *priv = (FAR struct macnet_driver_s *)dev->d_private;
|
||||||
|
|
||||||
|
wlinfo("Available=%u\n", work_available(&priv->md_pollwork));
|
||||||
|
|
||||||
/* Is our single work structure available? It may not be if there are
|
/* Is our single work structure available? It may not be if there are
|
||||||
* pending interrupt actions and we will have to ignore the Tx
|
* pending interrupt actions and we will have to ignore the Tx
|
||||||
* availability action.
|
* availability action.
|
||||||
|
@ -1111,6 +1094,8 @@ static int macnet_req_data(FAR struct ieee802154_driver_s *netdev,
|
||||||
FAR struct iob_s *iob;
|
FAR struct iob_s *iob;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
wlinfo("Received framelist\n");
|
||||||
|
|
||||||
DEBUGASSERT(netdev != NULL && netdev->i_dev.d_private != NULL);
|
DEBUGASSERT(netdev != NULL && netdev->i_dev.d_private != NULL);
|
||||||
priv = (FAR struct macnet_driver_s *)netdev->i_dev.d_private;
|
priv = (FAR struct macnet_driver_s *)netdev->i_dev.d_private;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue