Other Parts Discussed in Thread: WL1835
Hello,
I'm working with the Wl1835 chipset and with bluetopia stack found here: www.ti.com/.../TI-BT-4-2-STACK-LINUX-ADDON
I need to set a random address for the Bluetooth hardware address and I can see that this is an option in GAPAPI.h with GAP_LE_Generate_Static_Address(unsigned int BluetoothStackID, BD_ADDR_t *StaticAddress_Result);
To get a BluetoothStackID, one must call BSC_Initialize which returns the id. I ran into this issue a while back and opened a ticket: https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1021524/wl1837mod-bluetopia-bsc_initialize
I am encountering the same issue here. Running the following snippet of code yields the following result:
HCI_DriverInformation_t driverInfo;
char portName[32] = "/dev/ttymxc4";
driverInfo.DriverType = hdtCOMM;
driverInfo.DriverInformation.COMMDriverInformation.COMPortNumber = -1;
driverInfo.DriverInformation.COMMDriverInformation.DriverInformationSize = sizeof(driverInfo.DriverInformation.COMMDriverInformation);
driverInfo.DriverInformation.COMMDriverInformation.Protocol = cpUART;
driverInfo.DriverInformation.COMMDriverInformation.BaudRate = 115200;
driverInfo.DriverInformation.COMMDriverInformation.InitializationDelay = 100;
driverInfo.DriverInformation.COMMDriverInformation.COMDeviceName = portName;
driverInfo.DriverInformation.COMMDriverInformation.Flags = 0;
int btStackId = BSC_Initialize(&driverInfo, 0);
printf("application: bt stackid: %d\n\n", btStackId);
Executing:
root@QConnect:~# ./blooTest
Error: Can't open /proc/device-tree/tibt/dev_nameError: Can't open /proc/device-tree/tibt/baud_rateError: Can't open /proc/device-tree/tibt/flow_cntrlError: Can't open /proc/device-tree/tibt/nshutdown_gpioecho 0 > /sys/class/gpio/export
sh: write error: Resource busy
echo out > /sys/class/gpio/gpio0/direction
echo 0 > /sys/class/gpio/gpio0/value
echo 1 > /sys/class/gpio/gpio0/value
echo 0 > /sys/class/gpio/gpio0/value
echo 1 > /sys/class/gpio/gpio0/value
BT COMM PORT (): -5
application: bt stackid: -14
I'm unsure why its attempting to toggle gpio 0 when there is not a parameter to provide a gpio number.