Hi,
I have a CY8CKIT-062-WIFI-BT board and would like to read temperature values from another controller (ESP32 conroller+BME280Sensor), for example.
I use the standard UUIDs (Environmental Sensing Service 0x181a and then the characteristic properties temperature 0x2a6e, humidity 0x2a6F and pressure 0x2a6d). To learn, I use the examples from the ModusToolbox™ Software Training Level 3 - Bluetooth® (e.g. key_ch06_ex04_connect_notify). I don't want to control an LED, just read values.
The GATT database is on.
******************** Application Start ********************
******************** Read BLE Devices ********************
*******************************************************************
Bluetooth Stack Initialization Successful
Bluetooth Management Event: 0x16 BTM_LOCAL_IDENTITY_KEYS_REQUEST_EVT
Bluetooth Management Event: 0x0 BTM_ENABLED_EVT
Bluetooth Enabled
Local Bluetooth Device Address: 00:A0:50:1D:95:63
Commands:
? Help (this message)
s Start scanning and connect
S Stop scanning
d Disconnect
n Turn on Button Count notifications
N Turn off Button Count notifications
0...7 Control LED
r Read LED value
Bluetooth Management Event: 0x17 BTM_BLE_SCAN_STATE_CHANGED_EVT
High duty scanning.
scan_callback function
Device = 30:24:A9:1C:30:6B
scan_callback function
Device = 14:CB:19:E3:C5:BE
scan_callback function
Device = 24:62:AB:F1:F8:2A
scan_callback function
Found Device "ESP32S_BME280" with BD Address: 24:62:AB:F1:F8:2A
RAW Data:
Len = 31 02 01 06 0E 09 45 53 50 33 32 53 5F 42 4D 45 32 38 30 02 0A 03 03 03 1A 18 05 12 12 00 40 00 BB
scan_callback function
Bluetooth Management Event: 0x17 BTM_BLE_SCAN_STATE_CHANGED_EVT
Scanning stopped.
Bluetooth Management Event: 0x14 BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT
Bluetooth GATT Callback Event: 0x0
GATT_CONNECTION_STATUS_EVT
GATT_CONNECTION_STATUS_EVT: Connect BDA 24:62:AB:F1:F8:2A
Connection ID 32768
Bluetooth Management Event: 0xb BTM_PAIRING_IO_CAPABILITIES_BLE_REQUEST_EVT
Bluetooth Management Event: 0x14 BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT
Bluetooth Management Event: 0x20 BTM_BLE_CONNECTION_PARAM_UPDATE
Bluetooth Management Event: 0xd BTM_ENCRYPTION_STATUS_EVT
Encrypt status: 0
Bluetooth Management Event: 0x14 BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT
Bluetooth Management Event: 0x13 BTM_PAIRED_DEVICE_LINK_KEYS_UPDATE_EVT
Bluetooth Management Event: 0xc BTM_PAIRING_COMPLETE_EVT
Pairing complete: 0
Bluetooth Management Event: 0x20 BTM_BLE_CONNECTION_PARAM_UPDATE
I understand the process so far. Now the services should be read in and I can't get any further.
When I press r for read LED value, a ledHandler = 0x09u is used, where does this value come from (or cccdHandle = 0x0Cu;)?
If I use 0x181a (Environmental Sensing UUID) there is an error.
When I press n or r the following comes up
Bluetooth GATT Callback Event: 0x7
GATT_APP_BUFFER_TRANSMITTED_EVT
Bluetooth GATT Callback Event: 0x1
GATT_OPERATION_CPLT_EVT
p_event_data->operation_complete.status: 0x1
GATT operation failed with status: 1
I don't know how to contact the services to read the value. it works on the smarphone.
Show Less
I am having trouble with extracting a .tar.gz file and accessing its files on a docker image. I've tried looking around Stackoverflow, but the solutions didn't fix my problem... Below is my folder structure and my Dockerfile. I've made an image called modus
.
Folder structure:
- modus
Dockerfile
ModusToolbox_2.1.0.1266-linux-install.tar.gz
Dockerfile:
FROM ubuntu:latest
USER root
RUN apt-get update -y && apt-get upgrade -y && apt-get install git -y
COPY ./ModusToolbox_2.1.0.1266-linux-install.tar.gz /root/
RUN cd /root/ && tar -C /root/ -zxzf ModusToolbox_2.1.0.1266-linux-install.tar.gz
I've been running the commands below, but when I try to check /root/ the extracted files aren't there...
docker build .
docker run -it modus
root@e19d081664e4:/# cd root
root@e19d081664e4:/# ls
<prints nothing>
There should be a folder called ModusToolBox, but I can't find it anywhere. Any help is appreciated.
P.S I have tried changing ADD to COPY, but both don't work.
Show LessHello Infineon support team.
We are evaluating a sample application "Audio_Headset_and_Speaker" using CYW920721B2EVK-02.
<Board configuration>
-CYW9BTAUDIO2(J9) <-- Mic
-CYW9BTAUDIO2(J10) --> Headphone
-CYW9BTAUDIO2(J6 position)
short: 9-10, 11-12
open: 1~9
<Test Environment>
MIC/Headphone <--> CYW920721B2EVK-02 <--BT Connection--> pair device(mobile phone A) <--Calling--> mobile phone B
Now we are facing following phenomenon during calling.
- The headphone output works file.
- However, No voice output from mobile phone B. We suspected the mic input does not work well.
■Questions
1) Are the mic/J9 connection and J6 configuration is correct?
2) To enable line input path for the mic, we guess some registers of audio codec "CS47L35" need to configure.
Ex) "R768(0x0300) Input_Enables" register .
Does this sample application configure those registers?
Thanks,
Tayo
We are using the HCI UART of the CYW20719B2 chip in Raw Mode. We have the communication working , but have noticed that there is a delay of ~ 50ms from when data is placed on the CYW20719's RX Pin to when the RX Interrupt is registered with the Application-Level code (i.e. the callback handler registered at: wiced_transport_cfg_t.p_data_handler ). This amount of delay seems excessive and is impacting the responsiveness of our system.
What controls the delay from the Hardware Block to the Application Level, ... and can this delay be reduced?
These are our configurations for the HCI UART:
wiced_transport_init(&(wiced_transport_cfg_t) {
.type = WICED_TRANSPORT_UART,
.cfg = {
.uart_cfg = {
.mode = WICED_TRANSPORT_UART_RAW_MODE,
.baud_rate = M_HCI_UART_BAUD_RATE (230400),
},
},
.rx_buff_pool_cfg = {
.buffer_size = RX_BUFFER_SIZE (2000),
.buffer_count = RX_BUFFER_COUNT (2)
},
.p_data_handler = m_hci_uart_rx_handler__,
.p_status_handler = m_hci_uart_status_handler__,
.p_tx_complete_cback = m_hci_uart_tx_complete__,
});
I am using the EZ-Serial Host API Protocol Library with the CYBT-343026-01.
App: 1.2.29 build 29
Stack: 5.2.0 build 22
Protocol: 1.3
HW: CYBT-343026-01
I have found other posts asking about this same issue but none that lead to a solution.
Sometimes the module shows up (broadcasts) as type 2 (BLE) and sometimes as type 3 (Dual Mode). When it shows up as dual mode, I can connect with BT Classic but when it shows up as BLE, I cannot connect in classic mode.
I only require BT Classic. Is there a way to setup for BR/EDR only or force Dual Mode every time? Once connected, I am only using SPP.
Thank you.
Show LessHi,
编程环境ModusToolbox,芯片cyw20719b2,运行于BLE server状态,
(1)程序片段如下:
APPLICATION_START()
{
...
pImgSemaphore = wiced_rtos_create_semaphore();//线程同步信号量
wiced_rtos_init_semaphore(pImgSemaphore);
spi1_thread_pointer = wiced_rtos_create_thread();//初始化线程
wiced_rtos_init_thread(spi1_thread_pointer, SPI1_THREAD_PRIORITY, NULL, spi1_thread_func, THREAD_STACK_MIN_SIZE, NULL) ;
...
}
static wiced_bt_gatt_status_t
tput_gatts_callback(wiced_bt_gatt_evt_t event, wiced_bt_gatt_event_data_t *p_data)
{
...
switch(event)
{
...
case GATT_ATTRIBUTE_REQUEST_EVT://判断client向server的写入值,增加信号量,触发线程函数运行
{
wiced_rtos_set_semaphore(pImgSemaphore);
break;
}
...
}
...
}
static void spi1_thread_func(uint32_t arg )//线程函数
{
wiced_rtos_get_semaphore(pImgSemaphore, 0xffffffff);//等待信号量
//通知外设发送数据
//通过SPI1口连续读入数据,SPI1工作于Slave方式,读入数据错误!
...
}
上述程序的线程函数spi1_thread_func()从读入SPI1读入的数据不正常。
(2)
经调试发现:如果去掉同步信号量,改为如下程序;APPLICATION_START()中初始化的线程函数,直接读入的SPI1数据,数据始终保持正常:
APPLICATION_START()
{
...
//去掉同步信号量
//pImgSemaphore = wiced_rtos_create_semaphore();//线程同步信号量
//wiced_rtos_init_semaphore(pImgSemaphore);
spi1_thread_pointer = wiced_rtos_create_thread();//初始化线程
wiced_rtos_init_thread(spi1_thread_pointer, SPI1_THREAD_PRIORITY, NULL, spi1_thread_func, THREAD_STACK_MIN_SIZE, NULL) ;
...
}
static wiced_bt_gatt_status_t
tput_gatts_callback(wiced_bt_gatt_evt_t event, wiced_bt_gatt_event_data_t *p_data)
{
...
switch(event)
{
...
case GATT_ATTRIBUTE_REQUEST_EVT://判断client向server的写入值,增加信号量,触发线程函数运行
{
//wiced_rtos_set_semaphore(pImgSemaphore);//去掉set semaphore操作
break;
}
...
}
...
}
static void spi1_thread_func(uint32_t arg )//线程函数
{
//wiced_rtos_get_semaphore(pImgSemaphore, 0xffffffff);//去掉等待信号量,APPLICATION_START()中初始化的线程函 //数,直接读入的SPI1数据
//通知外设发送数据
//通过SPI1口连续读入数据,SPI1工作于Slave方式,读入数据保持正确!
...
}
(3)
如果将wiced_rtos_init_thread() 函数从APPLICATION_START()中移至tput_gatts_callback(),同时spi1_thread_func()去除等待信号量,SPI1读入的数据也是错误的。
请问,该问题是由于同步信号量使用不当,还是线程函数错误引起的?应该怎样修改?
万分感谢!
Show LessI am evaluating the CYW20706 and the AIROC solutions as a replacement for our existing IoT Bluetooth functionality. It is essential for the operation of our system that we have access to the Bluetooth clock. We do that currently using the HCI command HCI_READ_CLOCK because we have a 2 chip solution with an HCI bus in between. I do not see any API support for this functionality in AIROC and wondered if you had any advice or suggestions.
Show LessHello,
I would like to use Quad SPI Master with CYBT-413061-02 (CYW20721).
I plan to use the Modus Tool Box / Bluetooth SDK.
However, in the 20719/20721 Hardware Driver's SPI peripheral API, I can only find the Standard SPI setting.
I recognize that the 20719/20721 supports Quad SPI.
Why isn't there an API?
Thanks
Show LessDear all,
I already own a CYW20706B2 Evaluation KIT. I want to connect it to an Audio codec and use the share-clock feature on CYW20706(GPIO BT_CLK_REQ/P4/P24) as MCLK (Master clock) for driving the Audio codec.
As i know, the default state of this GPIO is BT_CLK_REQ enabled, with double checking i can make sure that no more configurations for this GPIO in my project. However, when i connect the Logic Analyzer to pin 3 (J19) or pin 5 (J21) to visualize the output clock then nothing happen, there is no clock pulse.
I would really appreciate if anyone could give me a hand on how to reconfigure this Share-clock feature.
Show Less