Wednesday, October 23, 2024

Understanding LE Audio: BIS and CIS Explored

 
















LE Audio, introduced with Bluetooth 5.2, brings significant advancements to audio technology by using the Low Complexity Communication Codec (LC3)
Compared to older codecs like SBC, LC3 provides better audio quality while reducing power consumption, making it ideal for devices like wireless earphones and hearing aids.

In this article, we’ll explore two key modes in LE Audio: Broadcast Isochronous Stream (BIS) and Connected Isochronous Stream (CIS). These modes cater to different use cases, offering flexible audio experiences.

Friday, September 6, 2024

Secure DFU OTA for nRF52832 solution modules: Creating hex/zip file for implementation – Part 2(Combining/merging built files)

 Following up – Part 1: Bootloader & Application (Click for article link),

We will be focusing on:

in this article.

IC: nRF52832
DK: PCA10040 (for nRF52832)
SDK: 16.0.0
Softdevice: s132_nrf52_7.0.1_softdevice.hex
IDE: Keil C
PC: Win 10


Wednesday, August 28, 2024

Secure DFU OTA for nRF52832 solution modules: Guide to create hex/zip file for implementation – Part 1(Bootloader & Application)

Here are the guidelines for users to implement Secure DFU OTA(over-the-air) while using nRF52832 Solution modules. (Click on link for Raytac nRF52832 module series)

Below are the guidelines to implement Secure DFU OTA by using Raytac’s nRF52832 modules, SDK16.0.0.
It consists of 2 parts:

Part 1: Bootloader & Application


Part 2: Combining and merging built files (Article link)

In this article, we will be focusing on Part 1: Bootloader & Application.


Monday, August 12, 2024

FAQ: How to write MAC address into the OTP memory of Raytac’s AN7002Q Wi-Fi module/AN7002Q-DB-5340 DevKit

Recently we have received the FAQ: how to write MAC address into the OTP memory of AN7002Q-P Wi-Fi module? In this article, we’ll get this question explained to give customers a more smooth experience using the AN7002Q-nRF5340 Demo Board(AN7002Q-DB-5340).


Is there an existing Wi-Fi MAC address in the AN7002Q part on the DevKit?

Currently, the AN7002Q module on Raytac’s AN7002Q-DB-5340 board isn’t loaded with a Wi-Fi MAC address.


When running Wi-Fi Scan code/Station code/Shell code…etc. on NCS v2.6.0 (and later versions), the AN7002Q module must have a programed Wi-Fi MAC address to function properly.

Therefore, it’s necessary to follow the below process:
1. Program the original Wi-Fi radio test code (..\nrf\samples\wifi\radio_test) into the MDBT53 section,
2. Then write the Wi-Fi MAC address in to the AN7002Q section via command.

After this, program the original Wi-Fi Scan code/Station code /Shell code … into the 5340, and it will function properly.


*Raytac will assign 2 MAC addresses(for both 2.4GHz & 5GHz) to every AN7002Q module.

*If customers don't have MAC addresses for DevKit development yet, please reach out to
service@raytac.com


=========================================================

Case study 1. SCAN code example


Scenario:
Following error occurred when building the SCAN example code, flash it onto the AN7002Q-DB-5340 board, and run the test.

Solution:

When running Wi-Fi scan code on NCS v.2.6.0 or later version, the OTP memory in the AN7002Q module must have a Wi-Fi MAC address programmed in for the Wi-Fi scan functionality to work properly.

(Note: OTP is a One-Time programmable memory, which means the value can only be written once.
The customer must aware of this before performing the OTP operation.)

1. Program the original Wi-Fi radio test code (..\nrf\samples\wifi\radio_test) into the MDBT53 section,
then manually input and execute the following OTP read command.

wifi_radio_ficr_prog otp_read_params

If you see both MAC0 and MAC1 display a value of 0xFF, as shown in above, it means that you haven’t written the Wi-Fi MAC address into the AN7002Q’s OTP.

2. Manually issue the OTP write command to write the Wi-Fi MAC address into the OTP.

https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/wifi/radio_test/ficr.html

wifi_radio_ficr_prog otp_write_params 0x120 0xDDCCBBAA 0xFFEE

wifi_radio_ficr_prog otp_write_params 0x128 0xDDCCBBAA 0xFFEE


After you complete the above, use the OTP read command in below to check if the Wi-Fi MAC address value was written.
The MAC0 and MAC1 should display the value you’ve input from the OTP write command.

wifi_radio_ficr_prog otp_read_params

3. Program the original Wi-Fi SCAN code back into the MDBT53, the Wi-Fi scan functionality should work properly.

==================================================================

Case study 2. Shell code example

SDK Wi-Fi example test – Running Shell Code on AN7002Q-DB-5340:

Scenario:
An error occurs while running Shell code on AN7002Q-DB-5340.

Solution:
The AN7002Q-DB-5340 is paired with nRF5340 DK for development,
but neither of the 2 boards has an external MX25R64 (Serial NOR Flash) component.
So far, only the nRF7002DK board is equipped with the MX25R64.

Therefore, while running the original Wi-Fi shell code, the program will enable SPI NOR.

When using AN7002Q-DB-5340, you should add CONFIG_SPI_NOR=n in the prj.conf file to disable SPI NOR, to turn off any configurations related to it.

After recompiling and flashing, the shell code function
( e.g., Wi-Fi scan/Wi-Fi connect/net ping ..) should work properly.


Wednesday, July 17, 2024

Transition tips for program from MDBT50Q-RX (USB-A) to MDBT50Q-CX (USB-C)  with current NRF52840 project

 Intro:

This is a guidance provided for those who are going to transit (or replicate) their project from Raytac MDBT50Q-RX (USB-A Dongle) to MDBT50Q-CX(USB-C Dongle).  In addition to the hardware spec change (Compact Size , LED, Button, Pin definition change) , the key firmware configuration should be made with changes to fit new USB-C Dongle MDBT50Q-CX.

 


RX-1                    CX-1

MDBT50Q-RX                             MDBT50Q-CX

  

Table of Contents:

1. Comparison chart: MDBT50Q-RX(USB-A) & MDBT50Q-CX(USB-C)

2. Firmware configuration

3. Create a merged hex file (2 in 1 or 4 in 1)

4. Firmware flashing process

 


1. Comparison chart: MDBT50Q-RX & MDBT50Q-CX

Comparison chart


2. Firmware configuration : MDBT50Q-RX → MDBT50Q-CX

Edit your current MDBT50Q-RX firmware with configuration change to align the PIN change to accommodate the hardware change.

Option 1. Using nRF5 SDK:

Make the definition set up of LED, BUTTON pin in the highlighted 4 sections.

Firmware configuration-nRF5

 


Option 2. Using NCS V2.6.X:

Use the board name: nrf52840dongle_nrf52840 and add the overlay file:

nrf52840dongle_nrf52840.overlay to the program (Devicetree Overlays),

then configure the below code definition into the overlay file:

/ {
   leds {
             compatible = "gpio-leds";
             led0_green: led_0 {
                      gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
                      label = "Green LED 0";
             };
             led1_red: led_1 {
                     gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                     label = "Red LED 1";
             };
};

  buttons {
  compatible = "gpio-keys";
  button0: button_0 {
                  gpios = <&gpio1 6(GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
                  label = "Push button switch 0";
                                   };
};
};

Firmware configuration-NCS

 


3. Create a merged hex file (2-in-1 or 4-in-1 hex file)


3A. Bootloader public key product

nrfutil keys generate public_key.pem → for zipping new firmware

nrfutil keys display --key pk --format code public_key.pem --out_file public_key.c

→ include public key to compile bootloader hex file

3A-1

3A-2

 


3B. Examples Demo

nRF5 SDK: nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\pca10056\s140

NCS V2.6.X: ncs\v2.6.0\nrf\samples\bluetooth\peripheral_uart

 


3C. How to generate bootloader setting file (if you need bootloader):

nrfutil.exe settings generate --family NRF52840 --application nrf52840_xxaa.hex --application-version 255 --bootloader-version 2 --bl-settings-version 1 bootloader_settings.hex

 


3D. Merge and create a 2-in-1 or 4-in-1 hex file

a). Merge 2-in-1 (no Bootloader file required):

mergehex.exe -m s140_nrf52_7.2.0_softdevice.hex nrf52840_xxaa.hex -o merge.hex

3D-a

 


b). Merge 4-in-1 (with Bootloader file & Bootloader settings file required):

mergehex.exe -m bootloader.hex bootloader_settings.hex  s140_nrf52_7.2.0_softdevice.hex nrf52840_xxaa.hex -o merge.hex

3D-b

 


4. Firmware flashing process

MDBT50Q-RX(USB-A):Manual wiring is required to have the firmware uploaded.

Please refer to the article: Firmware Coding & DFU onto MDBT50Q-RX

MDBT50Q-CX(USB-C):Built-in open bootloader included for simple DFU process..

Please refer to the article: User Manual of MDBT50Q-CX (nRF52840/nRF52833-based USB-C Dongle)

 





Edited by Sales Manager:
 Ms. Jocelyn Tsai
Technical guidance provided by Firmware Deputy Manager: Mr. Stanley Huang

Wednesday, July 10, 2024

User Manual of MDBT50Q-CX (nRF52840/nRF52833-based USB-C Dongle)

Intro:

MDBT50Q-CX is an advanced version of Raytac’s MDBT50Q-RX(USB-A Dongle).

MDBT50Q-CX has a more compact size, equips an up-to-date Type C USB Connector, and it has a built-in open bootloader for simple DFU process.

If you’ve been developing projects using MDBT50Q-RX in the past, you can find out in this manual how MDBT50Q-CX makes firmware compiling and loading much easier than before.

If you want to load firmware into MDBT50Q-CX, no wiring is needed. 

Simply plug the dongle into your device and USB DFU will be available.

MDBT50Q-CX (USB-C Dongle, nRF52840/nRF52833 solution): Product link

image

Size: 15.10 x32.85mm (0.59x1.29inches)


Table of Contents

A. Hardware intro

B. Software development environment setup

C. Firmware Implementation with NCS (nRF Connect SDK) or NRF5 SDK

D. Execute DFU (Device Firmware Update)


A. Hardware Intro

 <Pin Allocation>

2

< Schematic> (Click on the image to redirect to product page for Higher resolution photo)





B.  Software development environment setup

Option 1. Compile in NCS(nRF Connect SDK)

(1) Install nRF Connect for Desktop:

B1


(2) Install Toolchain Manager and Programmer

B2


(3) Install nRF Connect SDK (NCS) → V2.6.0 is recommended.

B3


Option2. Compile in nRF5 SDK

(1) Download open source nRF5 SDK (Recommend: download the latest version:  17.1.0)

B4


(2) Install Segger Embedded Studio v5.42a (Recommended version)

https://www.segger.com/downloads/embedded-studio/

B5

※Welcome to contact Raytac sales team for v5.42a file of Segger Embedded Studio.


C. Implement firmware in NCS (nRF Connect SDK) or NRF5 SDK

We will use the two example codes below for this demo:

C1. NCS (nRF Connect SDK):

Example code path: \v2.6.0\nrf\samples\bluetooth\peripheral_uart


Thursday, June 20, 2024

How to Set Up the Development and Programming Environment for Raytac’s AN7002Q-nRF5340 Demo Board (AN7002Q-DB-5340)?

 To help you quickly get started with Raytac’s AN7002 Wi-Fi module and nRF5340 module, here’s a simple guide on how to set up the development and programming environment using AN7002Q-nRF5340 Demo Board(AN7002Q-DB-5340)and nRF5340 DK.


This article will cover the 4 sections below:
1. Hardware setup
2. Software Development Kit and Environment setup
3. Programming/Development
4. Flashing/Uploading firmware