headless mode
Closed this issue · 13 comments
I need to use it in headless mode, I want to connect to server over wifi, so, can you add ability to change webusb to local usb?
The CarPlay node without audio example does what you need, I believe
it works good on mac, but not work on rPi
Error: close error: Error: Can't close device with a pending request
carplay-node-server@0.1.0 start
node server/index.js
Server listening on http://localhost:3000/
Error initializing server {
err: Error: reset error: Error: LIBUSB_ERROR_NOT_FOUND
at WebUSBDevice.reset (/home/orangepi/node-CarPlay/examples/carplay-node-without-audio/node_modules/usb/dist/webusb/webusb-device.js:276:19)
at async CarplayNode.start (/home/orangepi/node-CarPlay/examples/carplay-node-without-audio/server/index.js:922:5)
at async main (/home/orangepi/node-CarPlay/examples/carplay-node-without-audio/server/index.js:1047:3)
}
$ lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 007: ID 1314:1521 Magic Communication Tec. Auto Box
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
it works if I disable
carplay.open()
caplay.reset()
carplay.close()
in CarplayNode.ts
By doing that I would guess you are disabling all communication to the dongle. When you say it works, do you get carplay?
Have you set up the usb permissions?
Yea, I have setup udev permissions
and carplay now worked (not bad at 25fps and 1920x720), so, I still testing it, because sometimes it disconnects
I have android HeadUnit in the car, but for some reason official Autokit app disconnects often and no way to manage it.
That is the reasin why I use your solution (thank & respect) as autonomous solution with separate power supply (not from car builtin usb, I think it disconnects) and wifi access point
so, the next question is the how to restart node-carplay app every time, when it lost wifi connection (command 1010) or for some usb error,
i think if it possible to keep latest PNG on the screen while app reconnects in background - it may looks good
for now - restarting dongle connection programmatically causes same error: err: Error: reset error: Error: LIBUSB_ERROR_NOT_FOUND
but restarting via npm start - works
Thanks for your comments here @abuharsky. We can add an option that disables the built-in USB reset during initialization