(self, cmd)
| 3152 | sock_address=sa) |
| 3153 | |
| 3154 | def send_command(self, cmd): |
| 3155 | opcode = cmd[HCI_Command_Hdr].opcode |
| 3156 | self.send(cmd) |
| 3157 | while True: |
| 3158 | r = self.recv() |
| 3159 | if r.type == 0x04 and r.code == 0xe and r.opcode == opcode: |
| 3160 | if r.status != 0: |
| 3161 | raise BluetoothCommandError("Command %x failed with %x" % (opcode, r.status)) # noqa: E501 |
| 3162 | return r |
| 3163 | |
| 3164 | def recv(self, x=MTU): |
| 3165 | return HCI_Hdr(self.ins.recv(x)) |
nothing calls this directly
no test coverage detected