cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I tried to mix BLE+mesh using IDB05A1 and stm32L4. I used light demo example and added a custom service, but I cannot interact with it because I cannot find the way for integrating my custom service callback. Is it possible? Thank you

mavv
Associate
 
1 ACCEPTED SOLUTION

Accepted Solutions
mavv
Associate

Finally I solved it by calling "user_notify()" at HCI_Process():

void HCI_Process(void)

{

 tHciDataPacket * hciReadPacket = NULL;

  

 Disable_SPI_IRQ();

 uint8_t list_empty = list_is_empty(&hciReadPktRxQueue);     

 /* process any pending events read */

 while(list_empty == FALSE)

 {

  list_remove_head (&hciReadPktRxQueue, (tListNode **)&hciReadPacket);

  Enable_SPI_IRQ();

  HCI_Event_CB(hciReadPacket->dataBuff);

user_notify(hciReadPacket->dataBuff);

  Disable_SPI_IRQ();

  list_insert_tail(&hciReadPktPool, (tListNode *)hciReadPacket);

  list_empty = list_is_empty(&hciReadPktRxQueue);

 }

 /* Explicit call to HCI_Isr(), since it cannot be called by ISR if IRQ is kept high by

 BlueNRG. */

 HCI_Isr();

 Enable_SPI_IRQ();   

}

View solution in original post

2 REPLIES 2
mavv
Associate

Finally I solved it by calling "user_notify()" at HCI_Process():

void HCI_Process(void)

{

 tHciDataPacket * hciReadPacket = NULL;

  

 Disable_SPI_IRQ();

 uint8_t list_empty = list_is_empty(&hciReadPktRxQueue);     

 /* process any pending events read */

 while(list_empty == FALSE)

 {

  list_remove_head (&hciReadPktRxQueue, (tListNode **)&hciReadPacket);

  Enable_SPI_IRQ();

  HCI_Event_CB(hciReadPacket->dataBuff);

user_notify(hciReadPacket->dataBuff);

  Disable_SPI_IRQ();

  list_insert_tail(&hciReadPktPool, (tListNode *)hciReadPacket);

  list_empty = list_is_empty(&hciReadPktRxQueue);

 }

 /* Explicit call to HCI_Isr(), since it cannot be called by ISR if IRQ is kept high by

 BlueNRG. */

 HCI_Isr();

 Enable_SPI_IRQ();   

}

GF
Associate II

Hi mavv !

When you say "mix BLE + mesh" do you mean that you can communicate with (for example) a PC by BLE and then transfert this message to Mesh network, like that, you can act on Mesh with a computer ?

If yes, is that possible to explain me how you construct your custom ble service pls