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

Setup #6

Open
spankurmonkey opened this issue Mar 4, 2019 · 27 comments
Open

Setup #6

spankurmonkey opened this issue Mar 4, 2019 · 27 comments
Assignees
Labels

Comments

@spankurmonkey
Copy link

spankurmonkey commented Mar 4, 2019

What is the setup -- any PS3 controller or official one or any knock off, etc?

I presume you need a BT dongle on the PI... is there not different versions of BT?

Is it 4.0 ? I guess if I have the latest Pi Bluetooth is built in.

Just trying to understand what hardware is need prior to attempting to use this awesome looking feature.

@MitchBradley
Copy link

I searched for "ps3 compatible bluetooth" and found a recommendation for this one

https://www.amazon.com/gp/product/B009ZIILLI

I turns out that I bought one of those awhile ago for a bluetooth on Pi job, and it worked. The job had nothing to do with PS3, but the dongle certainly was compatible with Pi 2, and talked to a BT-LE device that we had designed. Pi 3 supposedly supports BT 4.1, so one would expect it to work. But, as I said on a private message, I don't have any experience with PS3.

@spankurmonkey
Copy link
Author

I have tried following the steps. I am using a PI that does not have BT but I have installed a BT dongle.

In the pairing steps - which I have done over and over which I am not sure if that is the reason for this issue below.....

pi@cncjs:~ $ gcc -o sixpair sixpair.c -lusb
/usr/bin/ld: cannot open output file sixpair: Is a directory
collect2: error: ld returned 1 exit status

@spankurmonkey
Copy link
Author

Still messing and now I get this - seems the pairing recognizes the controller but when I get the last prompt I am not sure what to do.

pi@cncjs:~ $ bluetoothctl
[NEW] Controller 5C:F3:70:64:B3:61 cncjs #1 [default]
[NEW] Device F6:48:8C:7E:C1:0B One
[NEW] Controller B8:27:EB:A7:85:74 cncjs
[NEW] Device 03:A4:98:78:63:25 PLAYSTATION(R)3 Controller
[PLAYSTATION(R)3 Controller]#

@spankurmonkey
Copy link
Author

spankurmonkey commented Mar 6, 2019

So I started with a fresh install of Noobs/Raspbian and even before installing CNCjs - I tried doing the bluetooth connect. I get a bit farther but never get the Authorization request for Y or N.....

pi@cncjs:~ $ bluetoothctl
[NEW] Controller B8:27:EB:A7:85:74 cncjs [default]
[NEW] Device 03:A4:98:78:63:25 PLAYSTATION(R)3 Controller
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[bluetooth]# pairable on
Changing pairable on succeeded
[CHG] Controller B8:27:EB:A7:85:74 Discoverable: no
[bluetooth]# devices
Device 03:A4:98:78:63:25 PLAYSTATION(R)3 Controller
[CHG] Device 03:A4:98:78:63:25 Connected: yes
[PLAYSTATION(R)3 Controller]# 

@spankurmonkey
Copy link
Author

I can type in the trust command but then if I check for paired-devices it does not show up.

[bluetooth]# trust 03:A4:98:78:63:25
Changing 03:A4:98:78:63:25 trust succeeded
[bluetooth]# paired-devices
[bluetooth]#

I have no clue what I am doing ... trying to follow the steps and best as possible but I continue to fail

@spankurmonkey
Copy link
Author

I think I know the flow now to get the authoriztion to come up and even if I type in yes and enter and the trust and the ps3 address - it still does not pair. It shows trusted but that is it.... no pairing...

[bluetooth]# info 03:A4:98:78:63:25
Device 03:A4:98:78:63:25
        Name: PLAYSTATION(R)3 Controller
        Alias: PLAYSTATION(R)3 Controller
        Class: 0x000540
        Icon: input-keyboard
        Paired: no
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        Modalias: usb:v054Cp0268d0000
[bluetooth]# agent on
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller B8:27:EB:A7:85:74 Discoverable: yes
[bluetooth]# pairable on
Changing pairable on succeeded
[CHG] Device 03:A4:98:78:63:25 Connected: yes
[PLAYSTATION(R)3 Controller]# devices
Device 03:A4:98:78:63:25 PLAYSTATION(R)3 Controller
[CHG] Device 03:A4:98:78:63:25 Connected: no
[CHG] Device 03:A4:98:78:63:25 Connected: yes
Authorize service
[agent] Authorize service 00001124-0000-1000-8000-00805f9b34fb (yes/no): yes
[PLAYSTATION(R)3 Controller]# trust 03:A4:98:78:63:25
[CHG] Device 03:A4:98:78:63:25 Trusted: yes
Changing 03:A4:98:78:63:25 trust succeeded
[PLAYSTATION(R)3 Controller]# quit
Agent unregistered
[DEL] Controller B8:27:EB:A7:85:74 cncjs [default]
pi@cncjs:~ $


pi@cncjs:~ $ bluetoothctl
[NEW] Controller B8:27:EB:A7:85:74 cncjs [default]
[NEW] Device 03:A4:98:78:63:25 PLAYSTATION(R)3 Controller
[CHG] Device 03:A4:98:78:63:25 Connected: yes
[PLAYSTATION(R)3 Controller]# info
Device 03:A4:98:78:63:25
        Name: PLAYSTATION(R)3 Controller
        Alias: PLAYSTATION(R)3 Controller
        Class: 0x000540
        Icon: input-keyboard
        Paired: no
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        Modalias: usb:v054Cp0268d0000
[PLAYSTATION(R)3 Controller]#

@spankurmonkey
Copy link
Author

@cheton @AustinSaintAubin
I gave up... sent the controller back to Amazon......would never pair

@AustinSaintAubin
Copy link
Collaborator

Sorry, I was working to reply. Just getting lunch break now, forgot to reply yesterday.


Looks like it did connect.

Device 03:A4:98:78:63:25 PLAYSTATION(R)3 Controller
[CHG] Device 03:A4:98:78:63:25 Connected: yes

What is the output when you run:

# List Devices
ls /dev/input

Also, try testing with

## Get Battery Level
cat "/sys/class/power_supply/sony_controller_battery_03:a4:98:78:63:25/capacity"

## Joystick Application
# Install
sudo apt-get -y install joystick

# Usage / Test
jstest /dev/input/js0

@spankurmonkey
Copy link
Author

spankurmonkey commented Mar 6, 2019

@AustinSaintAubin

I am not sure if it was the controller or what.

This is the controller I was trying to connect : https://www.amazon.com/gp/product/B06XDPQYB9

When I would run thels /dev/inputit only ever return mice .

Never made a return where I think it should have said also js0 ?

I never went past the connectivity test so I didn't install the ## Joystick Application or ## Get Battery Level, etc.

@AustinSaintAubin Out of curiosity do you think it may have been the type of controller I had or the fact I am using a USB dongle since the PI does not have on board Bluetooth or more likely just user error?

I would love to get a controller to work so any additional advice you can share would be appreciated. . I did find two used controllers that appear to be genuine PS3 on ebay.. will give them a try.

Thx.

@AustinSaintAubin
Copy link
Collaborator

@spankurmonkey
It was likely the controller. It seems like you did all the testing to validate.

This is what i have/bought in 2017: PlayStation 3 Dualshock 3 Wireless Controller (Urban Camouflage)

@spankurmonkey
Copy link
Author

spankurmonkey commented Mar 7, 2019

@AustinSaintAubin
Ok good to know. The controllers I have coming look just like the Sony one you listed. So I am hoping it was just the controller.

I didn't mention but the USB Bluetooth dongle was this one - https://www.amazon.com/gp/product/B007Q45EF4

I am hoping this didn't have anything to do with it also. I am guessing not otherwise it would have never showed the controller during the bluetoothctl discovery.

@spankurmonkey
Copy link
Author

spankurmonkey commented Mar 9, 2019

@AustinSaintAubin
Austin - I got my controllers today and I am still having issues but I do think this controller is being recognized.

pi@cncjs:~ $ ls /dev/input
event0  js0  mice

This is after I do the bluetoothctl and then say yes to the authorization.

I can never get the trust to work....

Authorize service
o): yes Authorize service 00001124-0000-1000-8000-00805f9b34fb (yes/no
[bluetooth]# trust 03:A4:98:78:63:25
Device 03:A4:98:78:63:25 not available
[bluetooth]# trust FC:62:B9:72:BA:BE
Device FC:62:B9:72:BA:BE not available
[bluetooth]# trust 00:1B:FB:AA:33:F6
Device 00:1B:FB:AA:33:F6 not available

If I then quit and try the next

Get Battery Level

cat "/sys/class/power_supply/sony_controller_battery_03:a4:98:78:63:25/capacity"

i get

pi@cncjs:~ $ cat "/sys/class/power_supply/sony_controller_battery_03:a4:98:78:63                                                             :25/capacity"
cat: '/sys/class/power_supply/sony_controller_battery_03:a4:98:78:63:25/capacity                                                             ': No such file or directo
```ry



Lastly if I try this

# Usage / Test
jstest /dev/input/js0

I can see the buttons and joysticks work.


After that I tried the rest of the steps but cannot get it to work -

@spankurmonkey
Copy link
Author

spankurmonkey commented Mar 9, 2019

@AustinSaintAubin
tried again after fresh reboot.... the controller lights blink fast......

after the following only one light stays on... constant.

[agent] Authorize service 00001124-0000-1000-8000-00805f9b34fb (yes/no): yes
[bluetooth]# trust FC:62:B9:72:BA:BE
Device FC:62:B9:72:BA:BE not available
[bluetooth]# connect FC:62:B9:72:BA:BE
Device FC:62:B9:72:BA:BE not available

Again, I cannot get it to trust or pair, etc.

pi@cncjs:~ $ cat "/sys/class/power_supply/sony_controller_battery_FC:62:B9:72:BA:BE/capacity"
cat: '/sys/class/power_supply/sony_controller_battery_FC:62:B9:72:BA:BE/capacity': No such file or directory

Can't get this to work either.

@spankurmonkey
Copy link
Author

This certainly does not look good ---

pi@cncjs:~ $ sudo su
root@cncjs:/home/pi# sudo touch /etc/udev/rules.d/61-dualshock.rules
root@cncjs:/home/pi# dir
cncjs-pendant-tinyweb-1.2.4  cncjs-shopfloor-tablet  Desktop  Documents  Downloads  Gcode  Music  Pictures  Public  python_games  sixad  sixpair  sixpair.c  sixpair.c.1  sixpair.c.2  Templates  tinyweb  Videos
root@cncjs:/home/pi# sudo cat <<EOT >> /etc/udev/rules.d/61-dualshock.rules
> SUBSYSTEM=="input", GROUP="input", MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE:="666", GROUP="plugdev"
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
>
> SUBSYSTEM=="input", GROUP="input", MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE:="666", GROUP="plugdev"
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
> EOT
root@cncjs:/home/pi# sudo udevadm control --reload-rules
root@cncjs:/home/pi# exit
exit
pi@cncjs:~ $ dir
cncjs-pendant-tinyweb-1.2.4  cncjs-shopfloor-tablet  Desktop  Documents  Downloads  Gcode  Music  Pictures  Public  python_games  sixad  sixpair  sixpair.c  sixpair.c.1  sixpair.c.2  Templates  tinyweb  Videos
pi@cncjs:~ $ ls /dev/input
mice
pi@cncjs:~ $ sudo npm install -g cncjs-pendant-ps3 --unsafe-perm
npm WARN deprecated joi@6.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated topo@1.1.0: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
/usr/bin/cncjs-pendant-ps3 -> /usr/lib/node_modules/cncjs-pendant-ps3/bin/cncjs-pendant-ps3

> node-hid@0.5.7 install /usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.15.2 runtime=node arch=arm platform=linux)
make: Entering directory '/usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid/build'
  CC(target) Release/obj.target/hidapi/hidapi/libusb/hid.o
../hidapi/libusb/hid.c: In function ‘hid_read_timeout’:
../hidapi/libusb/hid.c:1078:6: warning: variable ‘bytes_read’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
  int bytes_read = -1;
      ^~~~~~~~~~
  AR(target) Release/obj.target/hidapi.a
  COPY Release/hidapi.a
  CXX(target) Release/obj.target/HID/src/HID.o
../src/HID.cc: In member function ‘void HID::readResultsToJSCallbackArguments(HID::ReceiveIOCB*, v8::Local<v8::Value>*)’:
../src/HID.cc:207:74: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
     Local<Object> buf = nodeBufConstructor->NewInstance(1, nodeBufferArgs);
                                                                          ^
In file included from /root/.node-gyp/10.15.2/include/node/node.h:63:0,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.2/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.2/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.2/include/node/v8.h:3996:44: note:   candidate expects 1 argument, 2 provided
../src/HID.cc: In static member function ‘static void HID::recvAsyncDone(uv_work_t*)’:
../src/HID.cc:231:32: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   iocb->_callback->Call(2, argv);
                                ^
In file included from ../src/HID.cc:31:0:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::sendFeatureReport(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:363:72: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
                                                                        ^
In file included from /root/.node-gyp/10.15.2/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.2/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:404:46: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t vendorId = info[0]->Int32Value();
                                              ^
In file included from /root/.node-gyp/10.15.2/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.2/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:405:47: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t productId = info[1]->Int32Value();
                                               ^
In file included from /root/.node-gyp/10.15.2/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.2/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:409:62: warning: ‘v8::String::Value::Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
         serialPointer = (wchar_t*) *v8::String::Value(info[2]);
                                                              ^
In file included from /root/.node-gyp/10.15.2/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.2/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:2916:51: note: declared here
     V8_DEPRECATED("Use Isolate version", explicit Value(Local<v8::Value> obj));
                                                   ^
/root/.node-gyp/10.15.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::setNonBlocking(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:443:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   blockStatus = info[0]->Int32Value();
                                     ^
In file included from /root/.node-gyp/10.15.2/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.2/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::write(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:471:74: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
                                                                          ^
In file included from /root/.node-gyp/10.15.2/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.2/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::devices(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:535:38: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       vendorId = info[0]->Int32Value();
                                      ^
In file included from /root/.node-gyp/10.15.2/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.2/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:536:39: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       productId = info[1]->Int32Value();
                                       ^
In file included from /root/.node-gyp/10.15.2/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.2/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.2/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.2/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
HID.target.mk:110: recipe for target 'Release/obj.target/HID/src/HID.o' failed
make: *** [Release/obj.target/HID/src/HID.o] Error 1
make: Leaving directory '/usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.9.80-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-hid@0.5.7 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-hid@0.5.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-10T01_58_45_709Z-debug.log

@spankurmonkey
Copy link
Author

@AustinSaintAubin
I am beginning to believe that cncjs-pendant-ps3 does not work for the lay person......

@spankurmonkey
Copy link
Author

Wiped the SD card again... fresh install of CNCjs 1.9.16 --- Will try the PS3 again tomorrow.

@spankurmonkey
Copy link
Author

spankurmonkey commented Mar 10, 2019

@AustinSaintAubin

Well I am convinced... PS3 does not work for the layperson.

I was able to get a trust succeeded this time and the joystick showed int he ls /dev/input and the js0 test worked.

I then moved onto the rest of the steps... some of them I was not sure if they should be ran or not given they had the # symbol which

Here is the results..... does not even look like the cncjs-pendant-ps3 was even installed... don't see a directory for it much like I would when I did the tinyweb install or the shopfloor install.

Axes:  0:     0  1:     0  2:     0  3:     0  4:-32767  5:-32767  6:-32767  7:-32767  8:-32767  9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 2Axes:  0:     0  1:     0  2:     0  3:     0  4:-32767  5:-32767  6:-32767  7:-32767  8:-32767  9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 2Axes:  0:     0  1:     0  2:     0  3:     0  4:-32767  5:-32767  6:-32767  7:-32767  8:-32767  9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 2Axes:  0:     0  1:     0  2:     0  3:     0  4:-32767  5:-32767  6:-32767  7:-32767  8:-32767  9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 23:     0 24:     0 25: -4001 26:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off 11:off 12:off 13:off 14:off 15:off 16:off 17:off 18:off
jstest /dev/input/js0
Axes:  0:     0  1:     0  2:     0  3:     0  4:-32767  5:-32767  6:-32767  7:-32767  8:-32767  9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 2Axes:  0:     0  1:     0  2:     0  3:     0  4:-32767  5:-32767  6:-32767  7:-32767  8:-32767  9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 23:     0 24:     0 25: -4001 26:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off 11:off 12:off 13:off 14:off 15:off 16:off 17:off 18:off ^C
pi@cncpi:~ $ clear
pi@cncpi:~ $ sudo apt-get install -y libudev-dev libusb-1.0-0 libusb-1.0-0-dev build-essential git
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.3).
libusb-1.0-0 is already the newest version (2:1.0.21-1).
libusb-1.0-0 set to manually installed.
The following additional packages will be installed:
  git-man liberror-perl libudev1 libusb-1.0-doc udev
Suggested packages:
  git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  git git-man liberror-perl libudev-dev libusb-1.0-0-dev libusb-1.0-doc
The following packages will be upgraded:
  libudev1 udev
2 upgraded, 6 newly installed, 0 to remove and 92 not upgraded.
Need to get 6,378 kB of archives.
After this operation, 28.3 MB of additional disk space will be used.
Get:1 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf udev armhf 232-25+deb9u9 [1,073 kB]
Get:2 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf libudev1 armhf 232-25+deb9u9 [120 kB]
Get:3 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf liberror-perl all 0.17024-1 [26.9 kB]
Get:4 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf git-man all 1:2.11.0-3+deb9u4 [1,433 kB]
Get:5 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf git armhf 1:2.11.0-3+deb9u4 [3,390 kB]
Get:6 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf libudev-dev armhf 232-25+deb9u9 [91.9 kB]
Get:7 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf libusb-1.0-0-dev armhf 2:1.0.21-1 [63.6 kB]
Get:8 http://mirror.sjc02.svwh.net/raspbian/raspbian stretch/main armhf libusb-1.0-doc all 2:1.0.21-1 [180 kB]
Fetched 6,378 kB in 6s (912 kB/s)
apt-listchanges: Reading changelogs...
(Reading database ... 38735 files and directories currently installed.)
Preparing to unpack .../udev_232-25+deb9u9_armhf.deb ...
Unpacking udev (232-25+deb9u9) over (232-25+deb9u2) ...
Preparing to unpack .../libudev1_232-25+deb9u9_armhf.deb ...
Unpacking libudev1:armhf (232-25+deb9u9) over (232-25+deb9u2) ...
Setting up libudev1:armhf (232-25+deb9u9) ...
Selecting previously unselected package liberror-perl.
(Reading database ... 38735 files and directories currently installed.)
Preparing to unpack .../0-liberror-perl_0.17024-1_all.deb ...
Unpacking liberror-perl (0.17024-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../1-git-man_1%3a2.11.0-3+deb9u4_all.deb ...
Unpacking git-man (1:2.11.0-3+deb9u4) ...
Selecting previously unselected package git.
Preparing to unpack .../2-git_1%3a2.11.0-3+deb9u4_armhf.deb ...
Unpacking git (1:2.11.0-3+deb9u4) ...
Selecting previously unselected package libudev-dev:armhf.
Preparing to unpack .../3-libudev-dev_232-25+deb9u9_armhf.deb ...
Unpacking libudev-dev:armhf (232-25+deb9u9) ...
Selecting previously unselected package libusb-1.0-0-dev:armhf.
Preparing to unpack .../4-libusb-1.0-0-dev_2%3a1.0.21-1_armhf.deb ...
Unpacking libusb-1.0-0-dev:armhf (2:1.0.21-1) ...
Selecting previously unselected package libusb-1.0-doc.
Preparing to unpack .../5-libusb-1.0-doc_2%3a1.0.21-1_all.deb ...
Unpacking libusb-1.0-doc (2:1.0.21-1) ...
Setting up git-man (1:2.11.0-3+deb9u4) ...
Setting up liberror-perl (0.17024-1) ...
Setting up libusb-1.0-doc (2:1.0.21-1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up udev (232-25+deb9u9) ...
addgroup: The group `input' already exists as a system group. Exiting.
update-initramfs: deferring update (trigger activated)
Setting up libusb-1.0-0-dev:armhf (2:1.0.21-1) ...
Processing triggers for systemd (232-25+deb9u2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libudev-dev:armhf (232-25+deb9u9) ...
Setting up git (1:2.11.0-3+deb9u4) ...
Processing triggers for initramfs-tools (0.130) ...
pi@cncpi:~ $ sudo apt-get install -y libudev-dev libusb-1.0-0 libusb-1.0-0-dev build-essential git
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.3).
git is already the newest version (1:2.11.0-3+deb9u4).
libudev-dev is already the newest version (232-25+deb9u9).
libusb-1.0-0 is already the newest version (2:1.0.21-1).
libusb-1.0-0-dev is already the newest version (2:1.0.21-1).
0 upgraded, 0 newly installed, 0 to remove and 92 not upgraded.
pi@cncpi:~ $ #npm install node-gyp node-pre-gyp
pi@cncpi:~ $ npm install node-gyp node-pre-gyp
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

+ node-gyp@3.8.0
+ node-pre-gyp@0.12.0
added 119 packages from 80 contributors and audited 278 packages in 22.342s
found 0 vulnerabilities

pi@cncpi:~ $ npm install node-hid --driver=hidraw --build-from-source --unsafe-perm


> node-hid@0.7.7 install /home/pi/node_modules/node-hid
> prebuild-install || node-gyp rebuild

make: Entering directory '/home/pi/node_modules/node-hid/build'
  CC(target) Release/obj.target/hidapi/hidapi/linux/hid.o
  AR(target) Release/obj.target/hidapi.a
  COPY Release/hidapi.a
  CXX(target) Release/obj.target/HID/src/HID.o
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::sendFeatureReport(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:364:72: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
                                                                        ^
In file included from /home/pi/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:405:46: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t vendorId = info[0]->Int32Value();
                                              ^
In file included from /home/pi/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:406:47: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t productId = info[1]->Int32Value();
                                               ^
In file included from /home/pi/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::setNonBlocking(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:446:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   blockStatus = info[0]->Int32Value();
                                     ^
In file included from /home/pi/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::write(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:474:74: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
                                                                          ^
In file included from /home/pi/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::devices(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:538:38: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       vendorId = info[0]->Int32Value();
                                      ^
In file included from /home/pi/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:539:39: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       productId = info[1]->Int32Value();
                                       ^
In file included from /home/pi/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /home/pi/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/home/pi/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/home/pi/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/HID.node
  COPY Release/HID.node
make: Leaving directory '/home/pi/node_modules/node-hid/build'
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

+ node-hid@0.7.7
added 29 packages from 31 contributors and audited 842 packages in 93.279s
found 0 vulnerabilities

pi@cncpi:~ $
pi@cncpi:~ $ sudo npm install -g cncjs-pendant-ps3 --unsafe-perm  # Install Globally
npm WARN deprecated joi@6.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated topo@1.1.0: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
/usr/bin/cncjs-pendant-ps3 -> /usr/lib/node_modules/cncjs-pendant-ps3/bin/cncjs-pendant-ps3

> node-hid@0.5.7 install /usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.15.3 runtime=node arch=arm platform=linux)
make: Entering directory '/usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid/build'
  CC(target) Release/obj.target/hidapi/hidapi/libusb/hid.o
../hidapi/libusb/hid.c: In function ‘hid_read_timeout’:
../hidapi/libusb/hid.c:1078:6: warning: variable ‘bytes_read’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
  int bytes_read = -1;
      ^~~~~~~~~~
  AR(target) Release/obj.target/hidapi.a
  COPY Release/hidapi.a
  CXX(target) Release/obj.target/HID/src/HID.o
../src/HID.cc: In member function ‘void HID::readResultsToJSCallbackArguments(HID::ReceiveIOCB*, v8::Local<v8::Value>*)’:
../src/HID.cc:207:74: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
     Local<Object> buf = nodeBufConstructor->NewInstance(1, nodeBufferArgs);
                                                                          ^
In file included from /root/.node-gyp/10.15.3/include/node/node.h:63:0,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.3/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.3/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.3/include/node/v8.h:3996:44: note:   candidate expects 1 argument, 2 provided
../src/HID.cc: In static member function ‘static void HID::recvAsyncDone(uv_work_t*)’:
../src/HID.cc:231:32: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   iocb->_callback->Call(2, argv);
                                ^
In file included from ../src/HID.cc:31:0:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::sendFeatureReport(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:363:72: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
                                                                        ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:404:46: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t vendorId = info[0]->Int32Value();
                                              ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:405:47: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t productId = info[1]->Int32Value();
                                               ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:409:62: warning: ‘v8::String::Value::Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
         serialPointer = (wchar_t*) *v8::String::Value(info[2]);
                                                              ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2916:51: note: declared here
     V8_DEPRECATED("Use Isolate version", explicit Value(Local<v8::Value> obj));
                                                   ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::setNonBlocking(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:443:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   blockStatus = info[0]->Int32Value();
                                     ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::write(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:471:74: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
                                                                          ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::devices(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:535:38: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       vendorId = info[0]->Int32Value();
                                      ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:536:39: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       productId = info[1]->Int32Value();
                                       ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
HID.target.mk:110: recipe for target 'Release/obj.target/HID/src/HID.o' failed
make: *** [Release/obj.target/HID/src/HID.o] Error 1
make: Leaving directory '/usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.9.80-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-hid@0.5.7 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-hid@0.5.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-10T11_49_36_573Z-debug.log
pi@cncpi:~ $ sudo su
root@cncpi:/home/pi# sudo touch /etc/udev/rules.d/61-dualshock.rules
root@cncpi:/home/pi# sudo cat <<EOT >> /etc/udev/rules.d/61-dualshock.rules
> SUBSYSTEM=="input", GROUP="input", MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE:="666", GROUP="plugdev"
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
>
> SUBSYSTEM=="input", GROUP="input", MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE:="666", GROUP="plugdev"
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
> EOT
root@cncpi:/home/pi# sudo udevadm control --reload-rules
root@cncpi:/home/pi# sudo cat <<EOT >> /etc/udev/rules.d/61-dualshock.rules
> exit
> SUBSYSTEM=="input", GROUP="input", MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE:="666", GROUP="plugdev"
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
>
> SUBSYSTEM=="input", GROUP="input", MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE:="666", GROUP="plugdev"
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
> EOT
root@cncpi:/home/pi# sudo cat <<EOT >> /etc/udev/rules.d/61-dualshock.rules
> SUBSYSTEM=="input", GROUP="input", MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE:="666", GROUP="plugdev"
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
>
> SUBSYSTEM=="input", GROUP="input", MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE:="666", GROUP="plugdev"
> KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
> EOT
root@cncpi:/home/pi# sudo udevadm control --reload-rules
root@cncpi:/home/pi# exit
exit
pi@cncpi:~ $ npm install pm2 -g
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/pm2/node_modules/cron
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/pm2
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/pm2/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules/pm2/node_modules/cron
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/pm2/node_modules/cron'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/lib/node_modules/pm2/node_modules/cron']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/lib/node_modules/pm2/node_modules/cron\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules/pm2/node_modules/cron' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-03-10T11_52_34_447Z-debug.log
pi@cncpi:~ $ pm2 startup debian
[PM2] Init System found: systemd
-----------------------------------------------------------
 PM2 detected systemd but you precised debian
 Please verify that your choice is indeed your init system
 If you arent sure, just run : pm2 startup
-----------------------------------------------------------
[PM2] To setup the Startup Script, copy/paste the following command:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup debian -u pi --hp /home/pi
pi@cncpi:~ $ sudo su
root@cncpi:/home/pi# sudo su -c "env PATH=$PATH:/home/pi/.nvm/versions/node/v4.5.0/bin pm2 startup debian -u pi --hp /home/pi"
[PM2] Init System found: systemd
-----------------------------------------------------------
 PM2 detected systemd but you precised debian
 Please verify that your choice is indeed your init system
 If you arent sure, just run : pm2 startup
-----------------------------------------------------------
/usr/lib/node_modules/pm2/lib/API/Startup.js:304
      throw new Error('Unknown platform / init system name');
      ^

Error: Unknown platform / init system name
    at API.CLI.startup (/usr/lib/node_modules/pm2/lib/API/Startup.js:304:13)
    at Command.<anonymous> (/usr/lib/node_modules/pm2/bin/pm2:700:9)
    at Command.listener (/usr/lib/node_modules/pm2/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:189:13)
    at Command.parseArgs (/usr/lib/node_modules/pm2/node_modules/commander/index.js:651:12)
    at Command.parse (/usr/lib/node_modules/pm2/node_modules/commander/index.js:474:21)
    at Timeout._onTimeout (/usr/lib/node_modules/pm2/bin/pm2:208:15)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
root@cncpi:/home/pi# pm2 start $(which cncjs-pendant-ps3) -- -p "/dev/ttyUSB0"
[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
[PM2] PM2 Successfully daemonized
[PM2][ERROR] File ecosystem.config.js not found
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬─────┬─────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴─────┴─────┴──────┴──────────┘
 Use `pm2 show <id|name>` to get more details about an app
root@cncpi:/home/pi# exit
exit
pi@cncpi:~ $ pm2 start $(which cncjs-pendant-ps3) -- -p "/dev/ttyUSB0"
[PM2][ERROR] File ecosystem.config.js not found
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬──────┬───────────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu  │ mem       │ user │ watching │
├──────────┼────┼─────────┼──────┼─────┼────────┼─────────┼────────┼──────┼───────────┼──────┼──────────┤
│ cncjs    │ 0  │ N/A     │ fork │ 705 │ online │ 0       │ 8h     │ 1.4% │ 56.7 MB   │ pi   │ disabled │
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴──────┴───────────┴──────┴──────────┘
 Use `pm2 show <id|name>` to get more details about an app
pi@cncpi:~ $ pm2 save
[PM2] Saving current process list...
[PM2] Successfully saved in /home/pi/.pm2/dump.pm2
pi@cncpi:~ $ pm2 list
┌──────────┬────┬─────────┬──────┬─────┬────────┬─────────┬────────┬──────┬───────────┬──────┬──────────┐
│ App name │ id │ version │ mode │ pid │ status │ restart │ uptime │ cpu  │ mem       │ user │ watching │
├──────────┼────┼─────────┼──────┼─────┼────────┼─────────┼────────┼──────┼───────────┼──────┼──────────┤
│ cncjs    │ 0  │ N/A     │ fork │ 705 │ online │ 0       │ 8h     │ 1.2% │ 56.7 MB   │ pi   │ disabled │
└──────────┴────┴─────────┴──────┴─────┴────────┴─────────┴────────┴──────┴───────────┴──────┴──────────┘
 Use `pm2 show <id|name>` to get more details about an app
pi@cncpi:~ $ dir
node_modules  package-lock.json  sixpair  sixpair.c
pi@cncpi:~ $

@spankurmonkey
Copy link
Author

spankurmonkey commented Mar 10, 2019

@AustinSaintAubin

These are the lines I am questioning.

#npm install node-gyp node-pre-gyp
#npm install node-hid --driver=hidraw --build-from-source --unsafe-perm

Not to mention the errors found in the cncjs-pendant-ps3 install

pi@cncpi:~ $ sudo npm install -g cncjs-pendant-ps3 --unsafe-perm  # Install Globally
npm WARN deprecated joi@6.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated topo@1.1.0: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
/usr/bin/cncjs-pendant-ps3 -> /usr/lib/node_modules/cncjs-pendant-ps3/bin/cncjs-pendant-ps3

> node-hid@0.5.7 install /usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.15.3 runtime=node arch=arm platform=linux)
make: Entering directory '/usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid/build'
  CC(target) Release/obj.target/hidapi/hidapi/libusb/hid.o
../hidapi/libusb/hid.c: In function ‘hid_read_timeout’:
../hidapi/libusb/hid.c:1078:6: warning: variable ‘bytes_read’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
  int bytes_read = -1;
      ^~~~~~~~~~
  AR(target) Release/obj.target/hidapi.a
  COPY Release/hidapi.a
  CXX(target) Release/obj.target/HID/src/HID.o
../src/HID.cc: In member function ‘void HID::readResultsToJSCallbackArguments(HID::ReceiveIOCB*, v8::Local<v8::Value>*)’:
../src/HID.cc:207:74: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
     Local<Object> buf = nodeBufConstructor->NewInstance(1, nodeBufferArgs);
                                                                          ^
In file included from /root/.node-gyp/10.15.3/include/node/node.h:63:0,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.3/include/node/v8.h:3993:44: note:   candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.15.3/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
   V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
                                            ^~~~~~~~~~~
/root/.node-gyp/10.15.3/include/node/v8.h:3996:44: note:   candidate expects 1 argument, 2 provided
../src/HID.cc: In static member function ‘static void HID::recvAsyncDone(uv_work_t*)’:
../src/HID.cc:231:32: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   iocb->_callback->Call(2, argv);
                                ^
In file included from ../src/HID.cc:31:0:
../../nan/nan.h:1674:3: note: declared here
   Call(int argc, v8::Local<v8::Value> argv[]) const {
   ^~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::sendFeatureReport(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:363:72: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
     message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
                                                                        ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:404:46: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t vendorId = info[0]->Int32Value();
                                              ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:405:47: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       int32_t productId = info[1]->Int32Value();
                                               ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:409:62: warning: ‘v8::String::Value::Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
         serialPointer = (wchar_t*) *v8::String::Value(info[2]);
                                                              ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2916:51: note: declared here
     V8_DEPRECATED("Use Isolate version", explicit Value(Local<v8::Value> obj));
                                                   ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::setNonBlocking(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:443:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   blockStatus = info[0]->Int32Value();
                                     ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::write(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:471:74: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       message.push_back((unsigned char) messageArray->Get(i)->Int32Value());
                                                                          ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE HID::devices(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/HID.cc:535:38: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       vendorId = info[0]->Int32Value();
                                      ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/HID.cc:536:39: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
       productId = info[1]->Int32Value();
                                       ^
In file included from /root/.node-gyp/10.15.3/include/node/v8.h:26:0,
                 from /root/.node-gyp/10.15.3/include/node/node.h:63,
                 from ../src/HID.cc:30:
/root/.node-gyp/10.15.3/include/node/v8.h:2478:46: note: declared here
   V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                              ^
/root/.node-gyp/10.15.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
HID.target.mk:110: recipe for target 'Release/obj.target/HID/src/HID.o' failed
make: *** [Release/obj.target/HID/src/HID.o] Error 1
make: Leaving directory '/usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.9.80-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/cncjs-pendant-ps3/node_modules/node-hid
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-hid@0.5.7 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-hid@0.5.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-10T11_49_36_573Z-debug.log

@spankurmonkey
Copy link
Author

@AustinSaintAubin

Ok I give up and I am out ... probably ... most likely ..... user error ... maybe....

you can close or delete this thread .. its of no use to anyone else.

@AustinSaintAubin
Copy link
Collaborator

AustinSaintAubin commented Mar 11, 2019

Looks like an issue with depreciated dependancies in node-hid.
Looks like controller is connected and working though.

jstest /dev/input/js0
Axes:  0:     0  1:     0  2:     0  3:     0  4:-32767  5:-32767  6:-32767  7:-32767  8:-32767  9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 2Axes:  0:     0  1:     0  2:     0  3:     0  4:-32767  5:-32767  6:-32767  7:-32767  8:-32767  9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 23:     0 24:     0 25: -4001 26:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off 11:off 12:off 13:off 14:off 15:off 16:off 17:off 18:off ^C

I will try to do some testing of my own and see what has changed.
Likly some of the node package dependancies need to be updated.

@spankurmonkey
Copy link
Author

@AustinSaintAubin Yes, the controller connected but was really hit and miss getting it too.

While I understand very little of this I would ask... wouldn't having a USB controller that is 2.4ghz based or even wired be a better solution that bluetooth since bluetooth can be not as reliable?

@AustinSaintAubin
Copy link
Collaborator

To be honest. At the time, the full scope of the project was to simply get the wireless PS3 controller that I had on hand to work with CNCJs, then share the code.

@spankurmonkey
Copy link
Author

@AustinSaintAubin
all of the joystick code is in index.js? What format is used to send data from the joystick into the web socket?

@tawera
Copy link

tawera commented Mar 15, 2019

FWIW: A few days ago I also tried to install the cncjs-pendant-ps3 but I never got it working. This was on Rasbpian Stretch with Node 10. I did try updating all the dependencies and managed to install it but got some runtime error on startup. The installation instructions are a bit unclear and I suspect they do not work on Node 10.

@spankurmonkey
Copy link
Author

spankurmonkey commented Mar 15, 2019

@tawera Can you elaborate on what you did ? I would still love to get this working but as for a novice and someone who dumbed down level of instructions I am at a total loss of trying for a few days to get it to work.

I did try updating all the dependencies and managed to install it

@tawera
Copy link

tawera commented Mar 15, 2019

The problem, I believe, is that this pendant depends on libraries that are not compatible with Node 10. Looking at the errors logs above I think you encountered the same problem as I did. I tried changing to Node 8 and it works, so you should change to Node 8 and it should work.

I have only verified that I can build and start the pendant, I have a PS4 controller (which I'm not sure is supported) and I haven't configured the bluetooth connection yet so I haven't got it all up and running.

I suggest you use NVM for managing node versions. Then you can try

nvm install 8
nvm use 8

Then you can install the pendant with

npm install -g cncjs-pendant-ps3

Which worked for me atleast, the additional npm commands mentioned in the README was not needed for me.

@williamkapke
Copy link

Confirmed. This module is not compatible with Node > 8.

Switch to Node 8 and it will install.

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

No branches or pull requests

5 participants