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
WIP: Use "D-Bus over TCP/IP over Ethernet over BLE" for communicating with the watch #216
base: master
Are you sure you want to change the base?
Conversation
Currently working on the |
acffbbd
to
5c85a4c
Compare
I believe the 14-bytes Ethernet frame can be shaved down to 1 byte for point-to-point (a pair of nibbles for source + destination MAC) |
import java.util.Objects | ||
|
||
class NotificationService(private val mCtx: Context, private val connectionProvider: IDBusConnectionProvider) : INotificationHandler, DBusSigHandler<NotificationClosed?> { | ||
private val mapping: BiMap<String, UInt32> = HashBiMap.create() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapping
should probably be persisted in case the application is closed…
Hi @FlorentRevest!
What a coincidence indeed…
(We came up with the same idea within the span of two weeks 😳)
Sooo this is my attempt at replacing ATT-based comms with something more streamlined (D-Bus). ✌️
The session bus is exported over TCP to the companion for seamless event transfer between the two devices.
A simplified version of asteroid-tap2ble forwards packets from a TAP interface over BLE. (since the link is relatively slow [26 kbps avg.], we should stick to lightweight protocols, so D-Bus-over-TCP, 9p, etc.; SSH is
sadlyway too bulky for this connection.)The packets should then be handled on the companion in an appropriate manner.
To achieve this on Android, I am using
libslirp
, which allows me to create a virtual network adapter that translates Ethernet packets into unprivileged calls.To do
diod
on the watch)ScreenshotService
)MediaService
NotificationService
(also made it bi-directional 😉; now it's just missing action buttons 😶🌫️)ScreenshotService
TimeService
(could be scrapped in favor of NTP)WeatherService
(could be scrapped in favor of the community daemon)