Avatar for PapaTech

PapaTech

Member since Aug 2018 • Last active Nov 2018
  • 1 conversations
  • 17 comments

Keep learning and keep trying new projects!

Most recent activity

  • in General
    Avatar for PapaTech

    Gordon,

    I reinstalled everything, one more time...slowly and checked for errors. There were a couple of path errors but once I went through the complete process for the 4th or 5th time (I am a bit slow)... I then started everything...and it finally worked for me.

    Thank you so much for hanging with me on this. I appreciate it. Now I need to learn more about the programming side and sending information back to a main server for access in a dashboard.

    Looking forward to getting it going.

    Tom

  • in General
    Avatar for PapaTech

    Found that perhaps I needed another source/library so I ran the following to take a shot.

    $ sudo apt install libudev-dev

    Once I did that there was some warning messages about deprecated modules and some skipping optional dependency but it got past the errors.

    I started everything and under Status I could see Bluetooth items including the puck but when I ran the ide it said NO PORTS FOUND...OMG! I am sure it is something I am doing or not doing but I have followed the instructions 10 times and still...

  • in General
    Avatar for PapaTech

    Here is where I did the nmp install

    npm install

    usb@1.3.3 install /home/pi/EspruinoHub/node_modules/usb
    node-pre-gyp install --fallback-to-build

    node-pre-gyp WARN Using needle for node-pre-gyp https download
    node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/relea­ses/download/1.3.3/usb_bindings-v1.3.3-n­ode-v57-linux-arm.tar.gz
    node-pre-gyp WARN Pre-built binaries not found for usb@1.3.3 and node@8.11.4 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
    make: Entering directory '/home/pi/EspruinoHub/node_modules/usb/b­uild'
    CC(target) Release/obj.target/libusb/libusb/libusb/­core.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­descriptor.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­hotplug.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­io.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­strerror.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­sync.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­os/poll_posix.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­os/threads_posix.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­os/linux_usbfs.o
    CC(target) Release/obj.target/libusb/libusb/libusb/­os/linux_udev.o
    ../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory
    #include

                     ^
    

    compilation terminated.
    libusb.target.mk:132: recipe for target 'Release/obj.target/libusb/libusb/libusb­/os/linux_udev.o' failed
    make: *** [Release/obj.target/libusb/libusb/libusb­/os/linux_udev.o] Error 1
    make: Leaving directory '/home/pi/EspruinoHub/node_modules/usb/b­uild'
    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:258:23)
    gyp ERR! stack at emitTwo (events.js:126:13)
    gyp ERR! stack at ChildProcess.emit (events.js:214:7)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    gyp ERR! System Linux 4.14.50+
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/­node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/EspruinoHub/node_modu­les/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/pi/EspruinoHub/node­_modules/usb/src/binding" "--napi_version=3" "--node_abi_napi=napi"
    gyp ERR! cwd /home/pi/EspruinoHub/node_modules/usb
    gyp ERR! node -v v8.11.4
    gyp ERR! node-gyp -v v3.6.2
    gyp ERR! not ok
    node-pre-gyp ERR! build error
    node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/n­ode-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/EspruinoHub/node_modul­es/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/EspruinoHub/node_­modules/usb/src/binding --napi_version=3 --node_abi_napi=napi' (1)
    node-pre-gyp ERR! stack at ChildProcess. (/home/pi/EspruinoHub/node_modules/node-­pre-gyp/lib/util/compile.js:83:29)
    node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
    node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
    node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
    node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    node-pre-gyp ERR! System Linux 4.14.50+
    node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/EspruinoHub/node_modules/.bin/­node-pre-gyp" "install" "--fallback-to-build"
    node-pre-gyp ERR! cwd /home/pi/EspruinoHub/node_modules/usb
    node-pre-gyp ERR! node -v v8.11.4
    node-pre-gyp ERR! node-pre-gyp -v v0.10.3
    node-pre-gyp ERR! not ok
    Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/n­ode-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/EspruinoHub/node_modul­es/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/pi/EspruinoHub/node_­modules/usb/src/binding --napi_version=3 --node_abi_napi=napi' (1)

    bluetooth-hci-socket@0.5.1 install /home/pi/EspruinoHub/node_modules/blueto­oth-hci-socket
    node-gyp rebuild

    make: Entering directory '/home/pi/EspruinoHub/node_modules/bluet­ooth-hci-socket/build'
    CXX(target) Release/obj.target/binding/src/Bluetooth­HciSocket.o
    ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
    ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value* ’ is deprecated [-Wdeprecated-declarations]
    back(Nan::New

  • in General
    Avatar for PapaTech

    Here are some errors when I started the service...

    sudo systemctl start EspruinoHub.service && sudo journalctl -f -u EspruinoHub
    -- Logs begin at Thu 2016-11-03 17:16:43 UTC. --
    Sep 01 19:36:03 raspberrypi systemd[1]: Started EspruinoHub BLE -> MQTT bridge.
    Sep 01 19:36:04 raspberrypi EspruinoHub[17254]: setterm: $TERM is not defined.
    Sep 01 19:36:04 raspberrypi sudo[17266]: pi : TTY=unknown ; PWD=/home/pi/EspruinoHub ; USER=root ; COMMAND=/sbin/setcap cap_net_raw+eip /usr/bin/node
    Sep 01 19:36:04 raspberrypi sudo[17266]: pam_unix(sudo:session): session opened for user root by (uid=0)
    Sep 01 19:36:04 raspberrypi sudo[17266]: pam_unix(sudo:session): session closed for user root
    Sep 01 19:36:05 raspberrypi EspruinoHub[17254]: Config loaded
    Sep 01 19:36:07 raspberrypi EspruinoHub[17254]: Connecting...
    Sep 01 19:36:08 raspberrypi EspruinoHub[17254]: Server is listening on http://localhost:1888
    Sep 01 19:36:08 raspberrypi EspruinoHub[17254]: www directory found at /home/pi/EspruinoHub/www. Web server at http://localhost:1888
    Sep 01 19:36:08 raspberrypi EspruinoHub[17254]: log directory found at /home/pi/EspruinoHub/log. Enabling logging.
    Sep 01 19:36:08 raspberrypi EspruinoHub[17254]: Bleno State poweredOn
    Sep 01 19:36:08 raspberrypi EspruinoHub[17254]: Bleno.startAdvertising Success
    Sep 01 19:36:08 raspberrypi EspruinoHub[17254]: Bleno.setServices Success
    Sep 01 19:36:09 raspberrypi EspruinoHub[17254]: Starting scan...
    Sep 01 19:36:09 raspberrypi EspruinoHub[17254]: Scanning started.
    Sep 01 19:36:17 raspberrypi EspruinoHub[17254]: NOT CONNECTED AFTER 10 SECONDS
    Sep 01 19:40:06 raspberrypi EspruinoHub[17254]: Serving /home/pi/EspruinoHub/www/index.html
    Sep 01 19:40:07 raspberrypi EspruinoHub[17254]: Serving /home/pi/EspruinoHub/www/favicon.ico
    Sep 01 19:40:43 raspberrypi EspruinoHub[17254]: Serving /home/pi/EspruinoHub/www/ide.html
    Sep 01 19:40:43 raspberrypi EspruinoHub[17254]: Serving /home/pi/EspruinoHub/www/paho-mqtt.js
    Sep 01 19:40:46 raspberrypi EspruinoHub[17254]: Sat Sep 01 2018 19:40:46 GMT+0000 (UTC) Connection accepted.
    Sep 01 19:40:46 raspberrypi EspruinoHub[17254]: events.js:183
    Sep 01 19:40:46 raspberrypi EspruinoHub[17254]: throw er; // Unhandled 'error' event
    Sep 01 19:40:46 raspberrypi EspruinoHub[17254]: ^
    Sep 01 19:40:46 raspberrypi EspruinoHub[17254]: Error: connect ECONNREFUSED 127.0.0.1:1883
    Sep 01 19:40:46 raspberrypi EspruinoHub[17254]: at Object._errnoException (util.js:992:11)
    Sep 01 19:40:46 raspberrypi EspruinoHub[17254]: at _exceptionWithHostPort (util.js:1014:20)
    Sep 01 19:40:46 raspberrypi EspruinoHub[17254]: at TCPConnectWrap.afterConnect as oncomplete
    Sep 01 19:40:46 raspberrypi systemd[1]: EspruinoHub.service: Main process exited, code=exited, status=1/FAILURE
    Sep 01 19:40:46 raspberrypi systemd[1]: EspruinoHub.service: Unit entered failed state.
    Sep 01 19:40:46 raspberrypi systemd[1]: EspruinoHub.service: Failed with result 'exit-code'.
    Sep 01 19:40:46 raspberrypi systemd[1]: EspruinoHub.service: Service hold-off time over, scheduling restart.
    Sep 01 19:40:46 raspberrypi systemd[1]: Stopped EspruinoHub BLE -> MQTT bridge.
    Sep 01 19:40:46 raspberrypi systemd[1]: Started EspruinoHub BLE -> MQTT bridge.
    Sep 01 19:40:46 raspberrypi EspruinoHub[17290]: setterm: $TERM is not defined.
    Sep 01 19:40:46 raspberrypi sudo[17297]: pi : TTY=unknown ; PWD=/home/pi/EspruinoHub ; USER=root ; COMMAND=/sbin/setcap cap_net_raw+eip /usr/bin/node
    Sep 01 19:40:46 raspberrypi sudo[17297]: pam_unix(sudo:session): session opened for user root by (uid=0)
    Sep 01 19:40:46 raspberrypi sudo[17297]: pam_unix(sudo:session): session closed for user root
    Sep 01 19:40:48 raspberrypi EspruinoHub[17290]: Config loaded
    Sep 01 19:40:49 raspberrypi EspruinoHub[17290]: Connecting...
    Sep 01 19:40:50 raspberrypi EspruinoHub[17290]: Server is listening on http://localhost:1888
    Sep 01 19:40:50 raspberrypi EspruinoHub[17290]: www directory found at /home/pi/Espruino

  • in General
    Avatar for PapaTech

    Well finally got some time to work on this project again. I bought a Pi Zero W and installed everything on it. I can run the software just like before but I still get no ports. I do however get the following when I look at status:

    Config loaded
    Connecting...
    Server is listening on http://localhost:1888
    www directory found at /home/pi/EspruinoHub/www. Web server at http://localhost:1888
    log directory found at /home/pi/EspruinoHub/log. Enabling logging.
    Bleno State poweredOn
    Bleno.startAdvertising Success
    Bleno.setServices Success
    Starting scan...
    Scanning started.
    NOT CONNECTED AFTER 10 SECONDS

    Sat Sep 01 2018 19:54:01 GMT+0000 (UTC)

    1d:48:7c:0a:04:d4 - ? (RSSI -60)
    60:2c:9e:64:15:f6 - ? (RSSI -88)
    c3:c9:01:13:06:cd - Charge 2 (RSSI -95)
    180a => [22,4,16,83,3]
    c4:72:74:93:c8:0e - Tile (RSSI -89)
    cf:8b:e0:99:e5:b9 - Puck.js e5b9 (RSSI -52)

    So that is good. Just don't know why I can't connect on the IDE running on the Pi. Really just want to start learning how to program this Puck...

  • in General
    Avatar for PapaTech

    Back on the road this week...might take it along with me. I tried the above and find the same issue. Thinking I might format the SD card and start from scratch.
    Have a great weekend.

  • in General
    Avatar for PapaTech

    Thanks...again...
    When I run rf -rf node_modules I get an -bash: rf: command not found.

    I hate being a noob...but I guess you have to start at the beginning.

  • in General
    Avatar for PapaTech

    Thanks for the suggestions Gordon. I ran the which mode line above and nothing seemed to change. I then ran sudo hcitool lescan and got the following:

    pi@EspruinoHub:~ $ sudo hcitool lescan
    LE Scan ...
    3F:4E:22:64:AE:A0 (unknown)
    09:EA:10:86:4C:DA (unknown)
    CF:8B:E0:99:E5:B9 Puck.js e5b9
    CF:8B:E0:99:E5:B9 (unknown)
    C3:C9:01:13:06:CD (unknown)
    C3:C9:01:13:06:CD Charge 2
    53:45:03:DC:09:3C (unknown)
    53:45:03:DC:09:3C (unknown)

    So at least it is seeing the Puck.js...right?

  • in General
    Avatar for PapaTech

    When I run systemctl status bluetooth on the Pi this is what I get.

    bluetooth.service - Bluetooth service
    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
    Active: active (running) since Sat 2018-08-11 05:03:36 UTC; 4 days ago

     Docs: man:bluetoothd(8)
    

    Main PID: 467 (bluetoothd)
    Status: "Running"
    CGroup: /system.slice/bluetooth.service

           └─467 /usr/lib/bluetooth/bluetoothd
    

    Aug 11 05:03:36 EspruinoHub systemd[1]: Starting Bluetooth service...
    Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Bluetooth daemon 5.43
    Aug 11 05:03:36 EspruinoHub systemd[1]: Started Bluetooth service.
    Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Starting SDP server
    Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Bluetooth management interface 1.14
    Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Failed to obtain handles for "Servi
    Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Sap driver initialization failed.
    Aug 11 05:03:36 EspruinoHub bluetoothd[467]: sap-server: Operation not permitted
    ...skipping...

Actions