Skip to content

Instantly share code, notes, and snippets.

@drewbug
Created April 18, 2021 00:47
Show Gist options
  • Save drewbug/3e7c99c2cb947e36db4c9f2b4deeaf5b to your computer and use it in GitHub Desktop.
Save drewbug/3e7c99c2cb947e36db4c9f2b4deeaf5b to your computer and use it in GitHub Desktop.
use pi as machine's bluetooth adapter
step 1, run on the client (192.168.1.11):
=========================================================================
sudo socat pty,link=vserial TCP-LISTEN:4161,reuseaddr,fork,max-children=1
=========================================================================
step 2, run on the pi:
==============================================================================
sudo socat file:/dev/serial1,raw,b115200,iexten=0,echo=0 TCP:192.168.1.11:4161
==============================================================================
step 3, run on the client:
====================================================================
sudo hciattach $PWD/vserial bcm43xx 3000000 flow - b8:27:eb:b9:1f:83
====================================================================
step 4, kill socat on the pi and rerun as:
===============================================================================
sudo socat file:/dev/serial1,raw,b3000000,iexten=0,echo=0 TCP:192.168.1.11:4161
===============================================================================
step 5, run on the client:
======================
sudo hciconfig hci1 up
======================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment