SparkFun Forums 

Where electronics enthusiasts find answers.

User avatar
By ricozinn
Hi, I'm using the Artemis and am wondering how to call the HCI driver's set_tx_power(). I think I'm seeing the function I wan to call documented here: ... Driver.cpp But the HCI driver is opaque to me. I'm using the ArduinoBLE library, so maybe I need to customize that a little to be able to call this? Let me know if anyone has tried to do this or has a good guess on how to do this.

By paulvha
This is always a vendor-specific command. Your link shows how it is implemented on an STM32WB. The implementation for HCI in Apollo3 is different. You can not change it with ArduinoBLE library as that only uses (part of) the standard defined BLE instruction.

For Apollo3 by default, it is set at 0db in the HCI-driver. But there is a call in the Apollo3 BLE-HCI driver you can use to select -10db, 0db or +3db. Below is an example of how you can use that from a sketch.
Code: Select all
#include "wsf_types.h"
#include "wsf_msg.h"
#include "hci_drv_apollo3.h"

void setup() {

  /* Set the TX power,  allowed options:
   * TX_POWER_LEVEL_MINUS_10P0_dBm  sets at -10 DB
   * TX_POWER_LEVEL_0P0_dBm         sets at   0 DB  (default)
   * TX_POWER_LEVEL_PLUS_3P0_dBm    Sets at   3 DB


void loop() {
  // put your main code here, to run repeatedly:

 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum