SAMB11 : notification confirmation

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I'm using a SAMB11 to make a serial bridge between a smartphone and a SAM4L microcontroller. In order to send data, I use at_ble_characteristic_value_set() and at_ble_notification_send(), then I wait for the GATT server event AT_BLE_NOTIFICATION_CONFIRMED before sending another another frame. This seems to work well, except that the event is sometimes not received. I supposed that this meant there is an error during transfer, so I tried to resend the frame after a timeout, but that seems to make the bluetooth stack crash. So here is my question : is it normal to not receive the AT_BLE_NOTIFICATION_CONFIRMED event sometimes, and if so, what is the correct procedure to follow to continue the connection?

 

Thanks in advance for the help!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So I've dug more and here are some precisions.

 

The problem is actually not limited to notifications, but it seems to be related to all events in the queue. When two concurrent events happen approximately at the same time (for example, an AT_BLE_CHARACTERISTIC_CHANGED initiated by the remote device and an AT_PLATFORM_EVENT initiated by my GPIO interrupt using send_plf_int_msg_ind() ), only one event is recovered by at_ble_event_get(). The other event disapears completely, it's not returned by the next call to at_ble_event_get() like it should with a queue. Either I'm using something incorrectly, or there is a bug in the queue handling. And it's pretty hard to debug it since I don't have the source code. I tried increasing the size of event_pool_memory in ble_manager.c:203 but that doesn't help, so it doesn't look like memory space is the problem.

 

Any ideas?

 

It also looks like the Atmel support system which helped me once or twice is not available anymore, it redirects to some Microchip system...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So it may seem that we could be having the same problem.  I'm trying to connect two SAMB11's together through the serial chat profile.  The SAMB11 that I designated to work as a central device almost gets to the point of being able to write, but the csc_prf_write_notification_handler() never gets called at the end to be able to transmit data, instead AT_BLE_CHARACTERISTIC_CHANGED gets called and then AT_PLATFORM_EVENT gets called.  Is there anyway to actually check the queue to see what is getting pushed in in what order?

 

Thanks for any ideas!

MADEIT

Last Edited: Fri. Mar 17, 2017 - 05:01 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I'm currently in touch with an Atmel/Microchip support engineer to try and find the source of the problem, I'll let you know what is leads to