Skip to content

Add some commands in Chapter 7.4 #4107

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions scapy/layers/bluetooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,52 @@ class HCI_Cmd_Write_LE_Host_Support(Packet):


# 7.4 INFORMATIONAL PARAMETERS, the OGF is defined as 0x04
class HCI_Cmd_Read_Local_Version_Information(Packet):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packet is missing the corresponding binding.

"""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In previous PRs the class docstring was added but without newlines. Should the empty lines be removed?

7.4.1 Read Local Version Information command

"""
name = "HCI_Read_Local_Version_Information"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packets don't have a field_desc. Why are they useful for you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because they set an opcode or ogf and ocf in the parent packet.

They are part of the Bluetooth specification and have a function.



class HCI_Cmd_Read_Local_Supported_Commands(Packet):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packet is missing the corresponding binding.

"""

7.4.2 Read Local Supported Commands command

"""
name = "HCI_Read_Local_Supported_Commands"


class HCI_Cmd_Read_Local_Supported_Features(Packet):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packet is missing the corresponding binding.

"""

7.4.3 Read Local Supported Features command

"""
name = "HCI_Read_Local_Supported_Features"


class HCI_Cmd_Read_Local_Extended_Features(Packet):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packet is missing the corresponding binding.

"""

7.4.4 Read Local Extended Features command

"""
name = "HCI_Read_Local_Extended_Features"
fields_desc = [ByteField("page_number", 0), ]


class HCI_Cmd_Read_BD_Addr(Packet):
"""

7.4.6 Read BD_ADDR command

"""
name = "HCI_Read_BD_ADDR"


# 7.5 STATUS PARAMETERS, the OGF is defined as 0x05


Expand Down