Wireless Uart demo question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wireless Uart demo question

1,388 Views
koonlee
Contributor I

Hi,

I have a FRDM-KW41Z running hci_app and I am able to connect to a Ubuntu machine via the UART_RX/TX pins (RS232) on FRDM-KW41Z to send hci command using BlueZ.

However, when I run the wireless_uart demo program, the board doesn't accept hci command via the UART interface. Is it possible for me to send hci command to the wireless_uart demo program? I would like to send LE Set Host Channel Classification command for co-existence test.

Thanks.

Koon

Tags (1)
0 Kudos
Reply
2 Replies

993 Views
andrei_f
NXP Employee
NXP Employee

Hi,

The hci_app is indeed the application to use when you want to send HCI packets to the controller. What you are trying to do with the Wireless UART application is not applicable.

The Wireless UART application is (basically) an UART bridge over BLE. What you send to one KW41Z board via UART is forwarded to another board over a BLE connection and is written to the console (via UART).

If you want to embed some HCI code directly into the application, then you need some minor adjustments to your code. You are using Hcit_SendPacket which is the serial (UART) interface for sending HCI data. While this works for an HCI application, the Wireless UART application uses a full BLE stack (host and controller) so there is no need for a serial communication between layers. Try this:

#include "controller_interface.h"

hciPacketType_t packetType = (hciPacketType_t) 0x01;


uint16_t packetSize = 8;


uint8_t pPacket[8] = {0x14, 0x20, 0x05, 0x00, 0x00, 0xFF, 0x00, 0x00};


Controller_RecvPacket(packetType, pPacket, packetSize);

0 Kudos
Reply

993 Views
koonlee
Contributor I

Hi,

In wireless_uart demo app.c program, I add the following:

#include "hci_transport.h"

hciPacketType_t packetType = (hciPacketType_t) 0x01;

uint16_t       packetSize = 8;

uint8_t         pPacket[8] = {0x14, 0x20, 0x05, 0x00, 0xF0, 0xFF, 0xFF, 0x1F};

and the following line inside BleApp_ConnectionCallback:

Hcit_SendPacket(packetType, pPacket, packetSize);

But it doesn't appear BLE transmission avoid the channels. Did I miss some steps?

Thanks.

0 Kudos
Reply