Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get Coded PHY type(S2 or S8) #29274

Closed
nearwall opened this issue Oct 16, 2020 · 6 comments
Closed

Can't get Coded PHY type(S2 or S8) #29274

nearwall opened this issue Oct 16, 2020 · 6 comments
Assignees

Comments

@nearwall
Copy link
Contributor

Hi,
I use Zephyr from the master branch and struggle with Coded PHY type detection in created connection.
I can't find anything except bt_conn_get_info to get the PHY type, but unfortunately the bt_conn_le_phy_info structure from this function doesn't contain any information about S2 or S8, only Coded or not.

Is there any opportunity to get all information about used PHY?

Thanks in advance,
Sergey

@joerchan
Copy link
Contributor

When LE Coded PHY is used then both S2 and S8 can be used, the connection can switch coding per PDU sent.

@nearwall
Copy link
Contributor Author

Shame on me =(
I didn't know about it.

I try to understand a case when I have a peripheral device(nRf52840), that get PHY update request from the Central(nRf52840) and update own PHY after it.
I found only void (*le_phy_updated)(struct bt_conn *conn, struct bt_conn_le_phy_info *param) callback and bt_conn_get_info function, that can return bt_conn_le_phy_info.
But bt_conn_le_phy_info can't get default or current tx Code PHY type(I mean S2 or S8).

  1. Is there any opportunity to check PHY update request parameters before setting, or only after?
  2. Is it possible to get default or current tx Coded PHY type(S2 or S8) for the connection?

@joerchan
Copy link
Contributor

@ustinov-dev You cannot know if S2 or S8 is used, you can only know that LE Coded PHY is used, and then both S2 and S8 will be used.

  1. No there is no way in zephyr to get PHY update request parameters (if you have used softdevice before there might be something like that, but that is not here).
  2. No, but you can set it using bt_conn_le_phy_update.

@nearwall
Copy link
Contributor Author

Ok. I see.

Thanks a lot guys!

@Arjun765
Copy link

Arjun765 commented Nov 2, 2021

you can only know that LE Coded PHY is used, and then both S2 and S8 will be used.

Will the controller automatically switch between the two?

@joerchan
Copy link
Contributor

joerchan commented Nov 2, 2021

Will the controller automatically switch between the two?

The controller is free to do that. Behavior will vary depending on the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants