matlo / l2cap_proxy Goto Github PK
View Code? Open in Web Editor NEWA l2cap proxy
A l2cap proxy
The /var/lib/bluetooth/<dongle addr>/linkkeys file does not seem to work in "recent" distributions (tested on Ubuntu 20 and Raspberry Pi OS). Instead, link keys have to be stored in an ini-like file in a subdirectory (at least that's what works for me on said distros). The file is named "info" and resides in /var/lib/bluetooth/<dongle addr>/<device addr>/. It has the following format:
[LinkKey]
Key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Type=4
PINLength=0
I think this behavior dates back to Ubuntu 14 but I'm not sure.
Hi,
Just wanted to open separate thread from DS4Windows.
So what I am using right now is:
I setup link key for PS5 like this:
[LinkKey]
Key=PS_LINK_KEY_HERE
Type=4
PINLength=0
[General]
Name=
SupportedTechnologies=
Trusted=true
Blocked=false
DS5 was paired using share+options method and this file was generated, unmodified, it is paiered with internal
BT on RPi (hci0)
[General]
Name=Wireless Controller
Class=0x002508
SupportedTechnologies=BR/EDR;
Trusted=true
Blocked=false
Services=00001124-0000-1000-8000-00805f9b34fb;00001200-0000-1000-8000-00805f9b34fb;
[DeviceID]
Source=2
Vendor=1356
Product=3302
Version=256
[LinkKey]
Key=DS5_KEY_HERE
Type=4
PINLength=0
hcitool
is not available instead there is btmgmt
on latest distro
sudo btmgmt --index 1 power off
sudo btmgmt --index 1 public-addr {DS5_PAIRED_WITH_PS5}
This changes the BT dongle address to DS5 address that I paired with PS5
sudo systemctl stop bluetooth
sudo btmgmt --index 0 power on
sudo btmgmt --index 1 power on
sudo ./l2cap_proxy {PS5_BT_ADDR} {DS5_PAIRED_WITH_PS5} 0x002508
Initially I was able to get some connection established, but I can't replicate that anymore.
During that time it seems that it was not being reset by PS5
Now I am always getting this:
listening on psm: 0x0001
listening on psm: 0x0005
listening on psm: 0x0007
listening on psm: 0x000f
listening on psm: 0x0011
listening on psm: 0x0013
listening on psm: 0x0015
listening on psm: 0x0017
listening on psm: 0x0019
listening on psm: 0x001b
listening on psm: 0x001d
listening on psm: 0x001f
listening on psm: 0x0021
accepted connection from DS5_ADDR (psm: 0x0001)
connecting with DONGLE_ADDR to PS5_ADDR (psm: 0x0001)
connected to PS5_ADDR (psm: 0x0001)
poll error from SLAVE (psm: 0x0001)
accepted connection from DS5_ADDR (psm: 0x0011)
connecting with DONGLE_ADDR to PS5_ADDR (psm: 0x0011)
accepted connection from DS5_ADDR (psm: 0x0013)
connecting with DONGLE_ADDR to PS5_ADDR(psm: 0x0013)
connection failed: Connection reset by peer
connection failed: Connection reset by peer
connected to PS5_ADDR (psm: 0x0011)
connected to PS5_ADDR (psm: 0x0013)
poll error from MASTER (psm: 0x0011)
poll error from MASTER (psm: 0x0013)
accepted connection from DS5_ADDR (psm: 0x0001)
connecting with DONGLE_ADDR to PS5_ADDR (psm: 0x0001)
connected to PS5_ADDR (psm: 0x0001)
poll error from SLAVE (psm: 0x0001)
accepted connection from DS5_ADDR (psm: 0x0011)
connecting with DONGLE_ADDR to PS5_ADDR (psm: 0x0011)
accepted connection from DS5_ADDR (psm: 0x0013)
connecting with DONGLE_ADDR to PS5_ADDR (psm: 0x0013)
connection failed: Connection refused
connected to PS5_ADDR (psm: 0x0011)
connection failed: Connection refused
poll error from MASTER (psm: 0x0011)
connected to PS5_ADDR (psm: 0x0013)
poll error from MASTER (psm: 0x0013)
I have met a problem when running proxy.
I have paired DS4 and ps4 with my ubuntu in the first.
Then I got ds4 link key and store it in file "linkkkeys".
After that, I run "sudo ./l2cap_proxy " and push the DS4 home button to pair.
[master-bdaddr]: ps4 bdaddr
[dongle-bdaddr]: my dongle-bdaddr
[device-class]: 0x2508
then I got message from the terminal
"
accepted connection from 30:0E:D5:8D:83:70 (psm: 0x0001)
connecting with 00:02:72:DA:2A:7B to 8C:FE:57:45:4B:4C (psm: 0x0001)
connected to 8C:FE:57:45:4B:4C (psm: 0x0001)
poll error from SLAVE (psm: 0x0001)
"
I dumped the the information and found out that the PS4 and DS4 once connect first but disconnect in the end.
I am confused with the procedure the order of pairing. Turn on DS4 first or connect to PS4 first?
Did I need to pair DS4 with PS4 before running proxy?
Thank for your great works and hope for your reply, thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.