rhysmorgan134/node-CarPlay

Copy of your library on mac/android

abuharsky opened this issue · 2 comments

Hello and thank you so much for your project; it has been very helpful to me. I've encountered an issue with the default autokit app on the main unit in my car - it consistently loses connection. Using additional applications, I noticed that the device disconnects and reconnects to USB, leading me to initially think the problem was with the hardware of my head unit.

Then I came across your project, ran it on my Mac and Raspberry Pi, and conducted numerous experiments. I appreciate your algorithm, the implementation of the protocol, and the comments, which have greatly helped me understand how the adapter works.

I noticed that the behavior of the adapter when working with your code matches its behavior when using the original autokit app. It sometimes disconnects and may not connect on the first attempt. This indicates that a more suitable approach for me would be to write my own Android app and use it instead of the standard autokit. I have done this, even implemented it in Flutter, and it can be tested on both Mac and Android (I haven't tested it on other platforms, but I don't anticipate any issues).

At the moment, it only implements the protocol (I have ported your classes for working with the adapter, but haven't implemented video output yet; that will come a bit later). However, I've encountered some issues. Your code works perfectly and connects to the device every time, but my code (which I'm testing on a Mac) works up to a certain point and then loses connection. I can't figure out the reason. I've provided logs with binary data and message names; perhaps you can help me understand what's going wrong?

Repo available here ->
abuharsky/carplay#1

Got it!

problem was in usb driver, so, I have fixed it

Снимок экрана 2024-01-24 в 11 10 24

last step - make it work on android)