Commit Graph

32047 Commits

Author SHA1 Message Date
Gregory Nutt
265b5d7dc6 wireless/bluetooth: A few trivial fixes from initial testing with the simulator. The simulated Bluetooth device is probably going to be in adequate for any level of testing. 2018-04-03 16:28:22 -06:00
Gregory Nutt
6962f6886c configs/sim: Add a configuration that will support some limited testing of the Bluetooth stack. 2018-04-03 10:07:15 -06:00
Gregory Nutt
0142a5ad13 arch/sim/src: Variable fixes to get a Bluetooth simulation build. 2018-04-03 10:00:56 -06:00
Gregory Nutt
15d033e32b drivers/wireless/bluetooth: Add a NULL device to support some very low level testing on the Simulator. 2018-04-03 09:00:18 -06:00
Gregory Nutt
a91edf7f3c net/Kconfig: Remove some trivial kruft from Kconfig file. 2018-04-03 08:13:11 -06:00
Gregory Nutt
49644be9a5 include/nuttx/wireless and wireless/bluetooth: Add support for an IOCTL command to enable Bluetooth security. 2018-04-02 17:34:41 -06:00
Gregory Nutt
9d3a06e55d include/nuttx/wireless: Remove const from some members of IOCTL structures. The const makes it awkward to initialize the structure. 2018-04-02 14:42:01 -06:00
Gregory Nutt
bf23588a41 include/nuttx/wireless: Another correction to a Bluetooth IOCTL command structure. 2018-04-02 14:20:01 -06:00
Gregory Nutt
15c7886fad include/nuttx/wireless: All Bluetooth IOCTL command data must begin with the interface name string. 2018-04-02 13:03:46 -06:00
Gregory Nutt
4ee0917789 wireless/bluetooth: Completes basic Rx/Tx data paths. Still missing: device address discovery and pairing logic. 2018-04-02 06:38:31 -06:00
Gregory Nutt
5dd11f465b net/bluetooth: Add support for connection to any address and any channel. 2018-04-01 17:53:07 -06:00
Vinicius Maciel
3ba6cc7921 arch/arm/src/tiva: Fix compilation errors on Tiva ADC code when ADC is enable. Please several cosmetic changes to files made during code review. 2018-04-01 17:52:37 -06:00
Gregory Nutt
3a0f3d4be8 wireless/bluetooth: Buffer allocation was always allocationg a new buffer, even if one was provided.. causing data loss. Correct initialization of lengths: IOB lenth includes data offset. Bluetooth buffer length does not. 2018-04-01 15:46:11 -06:00
Gregory Nutt
aae0d92598 wireless/bluetooth and net/bluetooth: Clean up some garbage left in Kconfig file that broke 'make menuconfig'. Clean up some craziness with Bluetooth frame length definitions. 2018-04-01 15:21:58 -06:00
Gregory Nutt
7e05d5e9c7 wireless/bluetooth: Adds most of the logic to get the Tx path working. Still missing the logic to recover the Bluetooth connection structure given the destination address in the socket address. 2018-04-01 14:00:40 -06:00
Gregory Nutt
29a4a80f8c Squashed commit of the following:
wireless/bluetooth:  This completes the basic logic path that gets frames from the Bluetooth stack and into the network layer.
    wireless/bluetooth:  Fleshes out some of the network packet receive logic.
    wireless/bluetooth:  Replace buffer allocated with primitive allocator from ieee 802.15.4.
    wireless/ieee802154:  Fix a few typos.
    wireless/bluetooth:  More renaming in preparation for some real work.
    wireless/bluetooth:  Some trivial renaming; update comments
2018-04-01 12:25:30 -06:00
Gregory Nutt
f7bcad502a Bluetooth: Bring in some definitions from NetBSD. Update some usage and naming to be more consistent. 2018-03-31 16:31:51 -06:00
Gregory Nutt
0c007be4bd 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.
2018-03-31 14:55:03 -06:00
Gregory Nutt
fd068f17ca wireless/ieee802154: Some trivial typos fixed while working with Bluetooth port 2018-03-31 10:38:07 -06:00
Gregory Nutt
c78b53a74c net/ieee802154: Add some missing logic in connect(). 2018-03-31 09:28:24 -06:00
Gregory Nutt
de7000ee3e wireless/ieee802154: Fix a few typos 2018-03-30 17:44:25 -06:00
Gregory Nutt
57f7677128 net/udp: Fix another related error in UDP condition compilatino (was actually using TCP setting, not UDP setting). 2018-03-30 15:30:45 -06:00
Gregory Nutt
2796b0245c net/ieee802154 and include/net/ieee802154: Fix a few more trivial typos. 2018-03-30 15:20:51 -06:00
Gregory Nutt
1a70e0b15e net/ieee802154: Fix more typos and cosmetic problems. 2018-03-30 13:42:55 -06:00
Gregory Nutt
2bb6ec41d1 net/: Trivial fix for a typo. 2018-03-30 12:27:04 -06:00
Gregory Nutt
51ee2cdd86 net/udp: Fix some errors in conditional compilation. 2018-03-30 12:08:53 -06:00
Gregory Nutt
a2f237065c net/ieee802154: Fix some typos noted when cloning to create net/bluetooth. 2018-03-30 12:08:29 -06:00
Gregory Nutt
d62649757c wireless/bluetooth and include/nutt/net: Add support for Bluetooth IOCTL commands. 2018-03-30 10:50:44 -06:00
Gregory Nutt
380d558795 Adds re-architected Bluetooth UART driver from the Intel/Zephyr arduino101_firmware_source-v1.tar package.
Squashed commit of the following:

    drivers/bluetooth:  Re-architect Bluetooth UART driver to follow upper/lower half model.  Completely untested.
    drivers/bluetooth:  Grr..  Another band-aid commit to stay in sync with master.  Why is this so difficult
    drivers/bluetooth:  Band-aid commit to stay in sync with master.  Lost it somehow.
    drivers/wireless/bluetooth:  A few changes, mostly thought experiments.
    drivers/wireless/bluetooth:  UART-based Bluetooth driver ported from the Intel/Zephyr arduino101_firmware_source-v1.tar package.  This initial commit is the original files in the NuttX build environment with changes to conform with the coding standard.  It should not even build.
2018-03-29 18:36:03 -06:00
Gregory Nutt
aaf5fee1e6 wireless/bluetooth: Add driver object in all driver methods so that the driver has a way of maintaingin context. 2018-03-29 15:12:00 -06:00
Gregory Nutt
accef0ca9e This commit brings in the Bluetooth stack from the Intel/Zephyr arduino101_firmware_source-v1.tar package.
NOTE: This selection is marked EXPERIMENTAL.  It is incomplete and, hence, untested.  It still lacks any low-level Bluetooth drivers and is missing the network interface driver.

Squashed commit of the following:

    wireless/bluetooth:  Fixe last of compile issues.  Now compiles without errors or warnings.
    wireless/blutooth:  Add macros BT_GETUINT16() and BT_PUTUINT16().  Fix more compile errors.  Only one file now generates compile errors.
    wireless/bluetooth:  Add macros BT_LE162HOST() and BT_HOST2LE16().
    wireless/bluetooth:  Add bt_queue.c; begin fixing comple errors.  Many more compile problems yet to resolve.
    Kconfig edited online with Bitbucket
    wireless/bluetooth:  Struggling to remove nano_fifo logic:  Replace buffer management with IOB allocate... this changes some logic and might have some side effects.  Use messages queues instead of nano-fifos to inter-task communications.  nano-fifos still used in 'frag' logic... whatever that is.
    wireless/bluetooth:  Fix numerous typos introduced by an ill conceived search-and-replace.
    wireless/bluetooth:  Add message queue support to manage interthread buffer transfers.
    wireless/bluetooth:  Replace fibers with kernel threads.
    wireless/bluetooth:  Fix a few initial compile errors.  Just the tip of the iceberg.
    wireless/bluetooth:  Complete leveage of the bluetooth stack including public header files.
    wireless/bluetooth:  Complete leverage of all Bluetooth source files.  Still missing header files that defines the driver interface.  Also missing the network driver implementation.
    wireless/bluetooth:  Fix some naming of static global variables.
    wireless/bluetooth:  Adds three more files ported from the Intel/Zephyr arduino101_firmware_source-v1.tar package (plus two original files).
    wireless/bluetooth:  Adds five more files ported from the Intel/Zephyr arduino101_firmware_source-v1.tar package.
    wireless/bluetooth:  Adds three more files ported from the Intel/Zephyr arduino101_firmware_source-v1.tar package.
    wireless/bluetooth:  First few files ported from the Intel/Zephyr arduino101_firmware_source-v1.tar package.
2018-03-29 12:39:22 -06:00
Anthony Merlino
5e1f54ddc3 Merged in antmerlino/nuttx/mac802154_primitivebug (pull request #620)
mac802154: Fixes bug where primitive was freed when it shouldn't have been, causing double free call

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-28 15:50:41 +00:00
Anthony Merlino
ec4bb7b990 Merged in antmerlino/nuttx/mac802154_ackhandling (pull request #619)
mac802154: Adds ackreq flag to TX descriptor for use by radio driver.

The radio layer is responsible for a full "transaction". Because of
differences in radio capabilites, the radio must be responsible for
the handling of acks and retransmissions. This commit simply passes
the ackreq meta-data flag along to the radio.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-28 15:50:11 +00:00
Anthony Merlino
62e89e0f8d Merged in antmerlino/nuttx/mac802154_rxenable (pull request #618)
mac802154: Adds basic support for RX-ENABLE.request primitive

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-28 15:49:34 +00:00
Gregory Nutt
8d5b225928 arch/arm/src/stm32: If Ethernet initialization failures (per previous commit), then do not register the uninitialized Ethernet device. Ths prevents any use of the badly initialized interface. 2018-03-27 15:33:59 -06:00
Sebastien Lorquet
7019d561b1 On STM32, in case of PHY failure, usually because of the lack of 25/50 MHz REFCLK input, the Ethernet block would lock up in a while loop waiting for readiness, which will never happened. This prevented the board from starting at all in the case of a PHY failure. This commit adds a retry loop to avoid bricking the board if the Ethernet block is unable to start. 2018-03-27 08:14:39 -06:00
Janne Rosberg
296a7d33b0 configs/nrf52-pca10040: Add support for buttons 2018-03-27 07:41:46 -06:00
Janne Rosberg
99e04a2d39 arch/arm/src/nrf52: Add nrf52_gpio_read 2018-03-27 07:41:46 -06:00
Masayuki Ishikawa
d393f43caa Merged in masayuki2009/nuttx.nuttx/network_test (pull request #617)
Fix some bugs in networking

* netdb: Fix boundary conditions in dns_recv_response()

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* Fix typos in include/nuttx/net/dns.h

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-03-27 01:31:06 +00:00
Gregory Nutt
759e510c28 Per Matias Edlund: I recently used the tcflush function and found that it failed with ENOTTY. The reason is that the TCFLSH case in the function uart_ioctl in the file drivers/serial/serial.c does not update the ret value." On success, the TCFLSH IOCTL logic needs to explicitly set the return value (ret) to zero. 2018-03-26 13:54:47 -06:00
Janne Rosberg
e4d43e8b87 arch/arm/src/nrf52: Better uart handling and some cleanup. 2018-03-26 12:50:06 -06:00
Janne Rosberg
d608f6943b arch/arm/src/nrf52: Initial support for the NRF52 2018-03-26 10:37:32 -06:00
Gregory Nutt
dc8941e958 configs/: Add definition of strip to many Make.defs files. 2018-03-25 09:25:37 -06:00
Gregory Nutt
db3b507a41 tools/gencromfs.c: Was duplicating all mode bits in source directory in CROMFS directory. Some make no sense. In particular, all write-able bits are cleard unconditionally. Executable bits are still copying because there is really no way for the tool to know if the file is executable or not. 2018-03-24 15:05:22 -06:00
Gregory Nutt
67e0603b5a fs/cromfs: Block length only needs to be uint16_t, not uint32_t. Add pading to node structure to assue that alignment is the same on all platforms. tools/gencromfs.c: Fix the target offset of the '.' hard link. 2018-03-24 14:44:38 -06:00
Gregory Nutt
853c1234ac tools/gencromfs.c: Missing 'const'. CROMFS file system was ending up in data, not FLASH 2018-03-24 11:54:01 -06:00
Gregory Nutt
8b4b61f140 fs/cromfs: Fix a error in reading partial compressed blocks. The LZF decompressor does not support that operation. Instead we have to decompress full block into a temporary buffer and copy out the parts that we need. To compensate for the performance hit, a caching mechanism was added so that we do not have to read the same block repeatedly. Unrelated: Also updates some README files. 2018-03-24 11:30:35 -06:00
Gregory Nutt
e35228ece9 arch/arm/src/imx6: Bring in a few i.MX6 fixes that were committed on the i.MX RT branch. 2018-03-23 16:55:12 -06:00
Gregory Nutt
d107ef6d54 configs/cc3200-launchpad: I don't think that there is any reason for BINFS to be enabled in the NSH configuration. 2018-03-23 11:05:53 -06:00
Juha Niskanen
0f03ffc745 STM32, STM32L4: add one bit read and write to 1-wire interface. This is needed for devices that require single bit timeslot generation and for 1-Wire search algorithm triplets. 2018-03-23 08:07:20 -06:00