This comment adds (1) basic support for AF_BLUETOOTH sockets. The logic compiles but is still incomplete. Support for Bluetooth is general is still dependent on CONFIG_EXPERMIMENTAL because it is not yet ready for used.

Squashed commit of the following:

    wireless/bluetooth:  Some small changes that gets to a clean compile by just eliminating some incorrect implementations (still with a lot of warnings.  The logic is still incomplete but now not so lethal.
    wireless/bluetooth:  Restructuring:  Connection interfaces should internal to wireless/bluetooth.  include/nuttx/wireless/bt_conn.h removed and merged with wireless/bluetooth/bt_conn.h.  Several fix to get closer to bt_netdev.c compiling.  Need to design some not interfaces and use some existing interfaces to send and receiv packets.
    wireless/bluetooth: Some organization with some network device compile errors fixed.  Still not even close to compiling.
    net/bluetooth:  Fix numerous compile issues; Still open design issues with regard to the interface with the Bluetooth stack.
    wireless/bluetooth:  Create bt_netdev.c with a crude copy of mac802154_netdev.c.  Does not not even compile yet.
    include/nuttx/net:  Add bluetooth.h.  Content is not yet correct.
    net/netpackets:  Add bluetooth.h.  Update net/bluetooth to use new socket address definition.
    net/bluetooth:  Some fixes for initial build.
    net/bluetooth:  Add initial support for Bluetooth sockets.  The initial cut is just the a clone of the IEEE 802.15.4 socket support with name changes.
    net/ieee802154:  Fix some typos noted when cloning to create net/bluetooth.
This commit is contained in:
Gregory Nutt
2018-03-31 14:55:03 -06:00
parent fd068f17ca
commit 0c007be4bd
43 changed files with 5843 additions and 617 deletions
+14 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* net/netdev/netdev_lladdrsize.c
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2017-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -48,6 +48,7 @@
#include <nuttx/net/net.h>
#include <nuttx/net/netdev.h>
#include <nuttx/net/radiodev.h>
#include <nuttx/net/bluetooth.h>
#include <nuttx/net/sixlowpan.h>
#include "netdev/netdev.h"
@@ -62,7 +63,7 @@
* Description:
* Returns the size of the node address associated with a packet radio.
* This is probably CONFIG_PKTRADIO_ADDRLEN but we cannot be sure in the
* case that there ar mutiple packet radios. In that case, we have to
* case that there are multiple packet radios. In that case, we have to
* query the radio for its address length.
*
* Input Parameters:
@@ -127,6 +128,17 @@ int netdev_dev_lladdrsize(FAR struct net_driver_s *dev)
#endif
#ifdef CONFIG_NET_6LOWPAN
#ifdef CONFIG_WIRELESS_BLUETOOTH
case NET_LL_BLUETOOTH:
{
/* 6LoWPAN can be configured to use either extended or short
* addressing.
*/
return BLUETOOTH_HDRLEN;
}
#endif /* CONFIG_WIRELESS_BLUETOOTH */
#ifdef CONFIG_WIRELESS_IEEE802154
case NET_LL_IEEE802154:
{
@@ -140,7 +152,6 @@ int netdev_dev_lladdrsize(FAR struct net_driver_s *dev)
return NET_6LOWPAN_SADDRSIZE;
#endif
}
#endif /* CONFIG_WIRELESS_IEEE802154 */
#ifdef CONFIG_WIRELESS_PKTRADIO