element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Test & Tools
  • Technologies
  • More
Test & Tools
Blog Bluetooth LE Transmit Testing with the FPC1500 - CYW43 Measurements
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Test & Tools to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 18 Jul 2022 2:16 PM Date Created
  • Views 1560 views
  • Likes 8 likes
  • Comments 0 comments
  • ble transmitter testing
  • cyw43 ble
  • BLEFPC1500
  • Rohde&Schwarz FPC1500
Related
Recommended

Bluetooth LE Transmit Testing with the FPC1500 - CYW43 Measurements

ralphjy
ralphjy
18 Jul 2022

Table of Contents
Blog 1: Bluetooth LE Transmit Testing with the FPC1500
Blog 2: Getting Started
Blog 3: BLE Development Boards
Blog 4: Test Development
Blog 5: ESP32 Measurements
Blog 6: nRF52 Measurements
Blog 7: CYW43-measurements
Blog 8: Summary

CYW43 boards

Measurements on 2 CYW43 boards shown below. 

Top to bottom

  • Arduino Portenta H7 with external BLE antenna (CYW4343W) [there is an Ethernet/camera shield mounted on top that I didn't want to disassemble].
  • Raspberry Pi 3A+ (CYW43455)

image

BLE libraries

The Arduino IDE supports the Portenta H7 using the ArduinoBLE library with the Mbed OS.  I had some difficulty getting a working iBeacon program in this configuration even though I had used a similar setup with the nRF52840 boards.  I managed to kill the Mbed OS in a couple of attempts (compiled fine, just wouldn't execute and required the "double reset" to recover).  I didn't want to spend a lot of time debugging, so I used a BLE advertising program that just set up an LED service.  Again, I was not able to adjust the BLE TX power.  This particular chipset is supposed to default to 4 dBm for BLE, but I haven't been able to find what power levels are available for programming (spec max is 12 dBm).  For the Raspberry Pi, I used BlueZ with the Linux HCI (Host Control Interface) service to set up the iBeacon - specifically the hcitool which unfortunately has been deprecated.

Arduino Portenta H7

portenta_ble_ledservice.ino  (unmodified example from ArduinoBLE that advertises a service)

/*
  LED

  This example creates a Bluetooth® Low Energy peripheral with service that contains a
  characteristic to control an LED.

  The circuit:
  - Arduino MKR WiFi 1010, Arduino Uno WiFi Rev2 board, Arduino Nano 33 IoT,
    Arduino Nano 33 BLE, or Arduino Nano 33 BLE Sense board.

  You can use a generic Bluetooth® Low Energy central app, like LightBlue (iOS and Android) or
  nRF Connect (Android), to interact with the services and characteristics
  created in this sketch.

  This example code is in the public domain.
*/

#include <ArduinoBLE.h>

BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // Bluetooth® Low Energy LED Service

// Bluetooth® Low Energy LED Switch Characteristic - custom 128-bit UUID, read and writable by central
BLEByteCharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);

const int ledPin = LED_BUILTIN; // pin to use for the LED

void setup() {
  Serial.begin(9600);
  while (!Serial);

  // set LED pin to output mode
  pinMode(ledPin, OUTPUT);

  // begin initialization
  if (!BLE.begin()) {
    Serial.println("starting Bluetooth® Low Energy module failed!");

    while (1);
  }

  // set advertised local name and service UUID:
  BLE.setLocalName("LED");
  BLE.setAdvertisedService(ledService);

  // add the characteristic to the service
  ledService.addCharacteristic(switchCharacteristic);

  // add service
  BLE.addService(ledService);

  // set the initial value for the characeristic:
  switchCharacteristic.writeValue(0);

  // start advertising
  BLE.advertise();

  Serial.println("BLE LED Peripheral");
}

void loop() {
  // listen for Bluetooth® Low Energy peripherals to connect:
  BLEDevice central = BLE.central();

  // if a central is connected to peripheral:
  if (central) {
    Serial.print("Connected to central: ");
    // print the central's MAC address:
    Serial.println(central.address());

    // while the central is still connected to peripheral:
    while (central.connected()) {
      // if the remote device wrote to the characteristic,
      // use the value to control the LED:
      if (switchCharacteristic.written()) {
        if (switchCharacteristic.value()) {   // any value other than 0
          Serial.println("LED on");
          digitalWrite(ledPin, HIGH);         // will turn the LED on
        } else {                              // a 0 value
          Serial.println(F("LED off"));
          digitalWrite(ledPin, LOW);          // will turn the LED off
        }
      }
    }

    // when the central disconnects, print it out:
    Serial.print(F("Disconnected from central: "));
    Serial.println(central.address());
  }
}

I was surprised at the received power value (if the default power really is 4 dBm then the performance is quite a bit better than the RAK4631 [nRF52840] by > 7 dBm).  It is using a different antenna (quite a bit smaller) which may make a difference. I need to try changing that. 

image

.

Raspberry Pi 3A+

The Linux hcitool is somewhat cryptic to use.  I found the commands to set up an iBeacon on the raspberry pi forum.

hcitool iBeacon

// Set up iBeacon advertising data
sudo hcitool cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 E2 0A 39 F4 73 F5 4B C4 A1 2F 17 D1 AD 07 A9 61 00 00 00 00 C8 00

// Start BLE advertising
sudo hcitool cmd 0x08 0x000A 01

// Query transmit power
sudo hcitool -i hci0 cmd 0x08 0x007

I remotely connected to the RPi using two puTTy terminals.  The first one is used to issue the hcitool commands and the second is running btmon, so that I could see the response in a human readable format. 

image

image

The TX power of -56 dB in the first response is a data field in the iBeacon data - this tells the receiver of the beacon what the expected RSSI is at 1 meter and is used for determining proximity.

The TX power of 12 dBm in response to the TX power setting query is somewhat confusing.  This is the default value for Bluetooth BDR (and is the max power setting).  The default for BLE should be 4 dBm.  The command to set TX power using hcitool is vendor specific and it did not work.  Google searches show that others have also not been able to get it to work for the Infineon (Cypress) chipsets.

Whatever the default is, the RPi has about 7 dBm less received carrier power than the Portenta - probably due to external antenna on the Portenta.

image

.

This concludes the testing that I had planned for this special project.  A summary post will follow shortly.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube