Skip to content
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

App not detecting phone being plugged in #20

Closed
Tigo2000 opened this issue Nov 30, 2022 · 12 comments
Closed

App not detecting phone being plugged in #20

Tigo2000 opened this issue Nov 30, 2022 · 12 comments

Comments

@Tigo2000
Copy link

Tigo2000 commented Nov 30, 2022

App does not recognize/detect phone, following message is shown: "Connect iPhone to begin CarPlay". After a few seconds the following is output to the console:

volvo@raspberrypi:~ $ sudo /home/volvo/Desktop/Carplay.AppImage --no-sandbox

/root/.config/ReactCarplay
spawning carplay {
dpi: 240,
nightMode: 0,
hand: 0,
boxName: 'nodePlay',
width: 800,
height: 480,
fps: 30
}
directory found
device not connected
Socket connected. sending data...

14 0.225 0.7032967032967034
(node:1762) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'transfer' of null
at /tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:247:29
at new Promise ()
at /tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:246:13
at new Promise ()
at DongleHandler.serialise (/tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:237:16)
at DongleHandler.sendTouch (/tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:145:14)
at Carplay.sendTouch (/tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/Carplay.js:25:22)
at IpcMainImpl. (/tmp/.mount_CarplaAMpFNp/resources/app.asar/build/electron/main.js:99:17)
at IpcMainImpl.emit (events.js:315:20)
at Object. (electron/js2c/browser_init.js:161:9492)
(Use carplay --trace-warnings ... to show where the warning was created)
(node:1762) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:1762) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
16 0.225 0.7032967032967034
(node:1762) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'transfer' of null
at /tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:247:29
at new Promise ()
at /tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:246:13
at new Promise ()
at DongleHandler.serialise (/tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:237:16)
at DongleHandler.sendTouch (/tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:145:14)
at Carplay.sendTouch (/tmp/.mount_CarplaAMpFNp/resources/app.asar/node_modules/node-carplay/modules/Carplay.js:25:22)
at IpcMainImpl. (/tmp/.mount_CarplaAMpFNp/resources/app.asar/build/electron/main.js:99:17)
at IpcMainImpl.emit (events.js:315:20)
at Object. (electron/js2c/browser_init.js:161:9492)
(node:1762) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

Tried connecting the phone using Wi-Fi, BlueTooth, a lightning cable plugged in the Carlinkit adapter, and a lightning cable plugged in the rpi itself. Also created the udev rules using the setup-pi.sh script from this repo.

Raspberry Pi 3b+ (Linux raspberrypi 5.15.76-v7+ #1597 SMP Fri Nov 4 12:13:17 GMT 2022 armv7l GNU/Linux)
react-carplay release v1.0.4.
Carlinkit CPC200-CCPA
iPhone 6S
ffplay version 4.3.5-0+deb11u1+rpt2
ffmpeg version 4.3.5-0+deb11u1+rpt2

Any ideas? Let me know if any more info is needed.

Thanks!

@rhysmorgan134
Copy link
Owner

It doesn’t appear to be detecting your dongle at all, device not connected should read device connected.

which dongle are you using and is it genuine? If you can send the pid and vid of it from lsusb when it’s connected, that may help

@Tigo2000
Copy link
Author

Bought the dongle directly from https://carlinkit.store, it's the CPC200-CCPA.

lsusb:

Bus 001 Device 006: ID 1314:1521
Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Just spoke with LRYMND as well, he mentioned downgrading to raspbian buster so currently testing that.

It should recognize the dongle even if there's no phone plugged in, correct?

@rhysmorgan134
Copy link
Owner

Yeah so it has got the same values so “should” work. Agree with trying on buster, the appimage was packaged on that version so is the best step to try first.

Please feedback if it works, and I will rebuild.

@Tigo2000
Copy link
Author

Tigo2000 commented Dec 1, 2022

Hi Rhys,

Just tested with Buster:

volvo@raspberrypi:~ $ uname -a
raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
volvo@raspberrypi:~ $ cat /etc/udev/rules.d/52-nodecarplay.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="1314", ATTR{idProduct}=="1520", MODE="0660", GROUP="plugdev"
volvo@raspberrypi:~ $ lsusb
Bus 001 Device 006: ID 1314:1521
Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Starting app:

volvo@raspberrypi:~ $ sudo /home/volvo/Desktop/React-Carplay/Carplay.AppImage --no-sandbox
/root/.config/ReactCarplay
spawning carplay {
dpi: 240,
nightMode: 0,
hand: 0,
boxName: 'nodePlay',
width: 800,
height: 480,
fps: 30
}
directory found
device not connected
Socket connected. sending data...
14 0.591743119266055 0.02923076923076923
(node:976) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'transfer' of null
at /tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:247:29
at new Promise ()
at /tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:246:13
at new Promise ()
at DongleHandler.serialise (/tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:237:16)
at DongleHandler.sendTouch (/tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:145:14)
at Carplay.sendTouch (/tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/Carplay.js:25:22)
at IpcMainImpl. (/tmp/.mount_CarplaUhegXx/resources/app.asar/build/electron/main.js:99:17)
at IpcMainImpl.emit (events.js:315:20)
at Object. (electron/js2c/browser_init.js:161:9492)
(Use carplay --trace-warnings ... to show where the warning was created)
(node:976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:976) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
16 0.591743119266055 0.02923076923076923
(node:976) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'transfer' of null
at /tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:247:29
at new Promise ()
at /tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:246:13
at new Promise ()
at DongleHandler.serialise (/tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:237:16)
at DongleHandler.sendTouch (/tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/DongleHandler.js:145:14)
at Carplay.sendTouch (/tmp/.mount_CarplaUhegXx/resources/app.asar/node_modules/node-carplay/modules/Carplay.js:25:22)
at IpcMainImpl. (/tmp/.mount_CarplaUhegXx/resources/app.asar/build/electron/main.js:99:17)
at IpcMainImpl.emit (events.js:315:20)
at Object. (electron/js2c/browser_init.js:161:9492)
(node:976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

Same error sadly.

@Tigo2000
Copy link
Author

Tigo2000 commented Dec 2, 2022

Just picked up a secondhand Carlinkit adapter (CPC200-CCPM) and that one is recognized in the app:

directory found
device connected and ready
starting projection

lsusb shows ID 1314:1520 on this new dongle rather than ID 1314:1521 on the 'old' dongle.

Glad that this works, but it would be great to get the original dongle (CPC200-CCPA) working since that one supports Wi-Fi/BT and this dongle only supports a wired connection. Do you have any ideas as to why the original dongle doesn't work?

Let me know if you need any more info.

Thanks!

@rhysmorgan134
Copy link
Owner

Great news, should be a straight forward fix, just need to add in the extra product ID or maybe just search by vendor ID, the. The new dongle should work (if it uses the same protocol)

thanks for figuring it out!

@LRYMND
Copy link

LRYMND commented Dec 4, 2022

I investigated now a bit and figured that 3 months ago, the necessary changes were already made to node-carplay (Added support for CPC200-CCPA).

Dependencies for my own app are at ^2.0.8 and it is downloading 2.0.9 after inspecting the package.json in the node-carplay folder. However the code for Donglehandler.js ist still the outdated version and the commit from above is missing. Do you eventually need to update the NPM package or should it pick up the changes from the git repo automatically?

@Tigo2000
Copy link
Author

Tigo2000 commented Dec 4, 2022

Tested earlier today and by editing the DongleHandler.js to reflect the changes in the commit that LRYMND mentioned above, the CCPA dongle is recognized by the app.

Agreed with LRYMND to check the npm package/installation process. After that I think this issue can be closed :)

@rhysmorgan134
Copy link
Owner

I’ll get package.json update and rebuild, thanks guys.

@rhysmorgan134
Copy link
Owner

latest release should fix above issues

@Nickelpick12
Copy link

Hello, I am having the same issue as what was described before. Here is the link to the dongle I got.

When I run lsusb:

raspberry@raspberrypi:~/Desktop $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 007: ID 05ac:12a8 Apple, Inc. iPhone 5/5C/5S/6/SE
Bus 001 Device 004: ID 0461:4e66 Primax Electronics, Ltd HP USB Optical Mouse
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I belive Device 007 is the dongle. Any advise?

@kostasfe
Copy link

kostasfe commented Sep 2, 2023

@Nickelpick12 , unfortunately you've got the wrong dongle. There's another thread (#32) specifying which of them work. Your dongle is just for making CarPlay functionality you already from wired into wireless. Instead you need to get one that gives you CarPlay functionality in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants