https://github.com/sha0coder/rfcommraw
Send raw bytes to an rfcomm channel, AT commands or whatever.
https://github.com/sha0coder/rfcommraw
Last synced: 9 months ago
JSON representation
Send raw bytes to an rfcomm channel, AT commands or whatever.
- Host: GitHub
- URL: https://github.com/sha0coder/rfcommraw
- Owner: sha0coder
- Created: 2023-11-30T10:03:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-19T14:48:24.000Z (over 1 year ago)
- Last Synced: 2025-02-06T11:46:43.627Z (11 months ago)
- Language: C
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Install
```bash
sudo apt install libbluetooth-dev
pip install RFCommRAW
```
# Usage
```python
>>> RFCommRAW.interfaces()
[0]
>>> RFCommRAW.scan(0)
['A0:94:1A:87:50:E7']
for channel in range(0,0xffff):
try:
r = RFCommRAW.communicate('A0:94:1A:87:50:E7', channel, read_sz, timeout, b'AT\r\n')
# params: bssid, channel, recv-size, bytes-to-send
if r:
print(f'channel {channel}: {r}')
except:
pass
```