zephyr: Bluetooth: bt_att: ATT Timeout

Describe the bug Local device performing ATT write cmds, generates <wrn> bt_att: Ignoring unexpected request when peer device send an ATT request. The peer then gets <err> bt_att: ATT timeout

To Reproduce Use the branch: https://github.com/cvinayak/zephyr/commit/b4939f526a9c1c86a88fd55810ed85e1ecaaf46d

Steps to reproduce the behavior: Build and flash peripheral:

  1. mkdir -p build/peripheral; cd build/peripheral
  2. cmake -GNinja -DBOARD=nrf52dk_nrf52832 …/…/samples/bluetooth/peripheral
  3. ninja
  4. ninja flash

Build and flash central_hr: 5. mkdir -p build/central_hr; cd build/central_hr 6. cmake -GNinja -DBOARD=nrf52dk_nrf52832 …/…/samples/bluetooth/central_hr 7. ninja 8. ninja flash

  1. Open two terminals, minicom -D /dev/ttyACMx
  2. Observe both peripheral and central_hr fail with respective warning and error messages in the console.

Expected behavior ATT request from peer device shall not be dropped. ATT bearer shall not timeout.

Impact showstopper

Screenshots or console output image

Environment (please complete the following information):

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 35 (18 by maintainers)

Commits related to this issue

Most upvoted comments

@mhx yep, that is exactly what I see as well with the latest commit.

This looks really good! I’m unable to reproduce the problem with the latest changes. I saw a bus fault once, but can’t reproduce it:

No, that doesn’t seem related. We have a couple of deadlocks that need fixing (they have PRs) which might fix the issue you are seeing.

Ive update the set, it is now possible to flood the stack with write without response like before and as a bonus I adds support for doing it using the shell.

@mfiumara If I’m reading that stack-trace right it appears the ASSERT came from zephyr_i2c_read and then got a usage-fault in the assert_post_action handler. The fact that you get a similar ATT timeout on 2.2.0 must mean that it is a different problem, because this one is a regression since 2.2.0.

Can you create a separate bug-report for it?

@Vudentz This is looking like a regression, no-one has reported it before. Any ideas on why it would need a queue/list now when we didn’t before?

This was introduced with EATT support since bt_l2cap_chan_send cannot rely on setting callbacks per buffer like we used to do with bt_l2cap_send_cb, anyway I working on a fix for this.