> Am 24.03.2021 um 18:34 schrieb Tim: > > > I can also build in Bluetooth support and the demo app, but as far as > > I can tell there are no actual Bluetooth host drivers in NuttX to > > properly support a detected Bluetooth device. My custom board actually > > has a SiLabs Bluetooth module on it (connected to the SAM via UART and > > proven to work) but I quite like the idea of just using plug-in > > Bluetooth devices instead :) > > Bluetooth is quite complex. You will have to deal with several layers: > > 1. Hardware driver (like Ethernet Hardware driver) 2. Low Level Protocol > Stack (HCI, like network TCP/IP layer) 3. High Level Protocol Stack ("Profiles", > like network mail, web, ntp, nfs application protocols) > > USB dongles usually implement the hardware driver and the low-level > protocol stack (HCI). The computer has to run the high level protocol stack.
[>] Understood, of course. The documentation in NuttX regarding Bluetooth is superficial and I am probably guilty of assumption and naivety! Because there is Host device support, and there are Bluetooth tools and drivers, and because Linux itself has a Bluetooth stack I leapt to the conclusion that Nuttx probably had a stack, just not the "link" between it and the detected USB device (i.e. a relevant USB driver, which are available in the Linux source trees). > > Other modules, especially the serial ones, implement the whole stack: > hardware driver, low-level stack, and one or more profiles (SPP, audio,...). If > you only need SPP, you really should use these modules. > This allows you to write only 100 lines of code instead of 10000. [>] My custom board has a SiLabs SoC on-board. I have developed LE applications using custom GATT on these before very successfully and it has a UART link to my SAM processor running NuttX. I will probably stick with that. The reasons for considering using a USB Bluetooth device: a) reduces unit costs, when not everyone wants to use Bluetooth b) existence of (proven working on my custom board, using USB C) host support so it's over the first hurdle compared to the Bare Metal approach I had been taking c) Trying to steer through the Bluetooth SIG nightmare of registrations and fees...but that's another story! > > fchk