Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: No more gamepad ? Why not use the phone ? #94724
    miroof
    Participant

    Hi Herbfargus,

    Thanks a lot for your video, I will update the Github page to add it. I’m very happy to see that this project interests you :)

    About emulationStation I was sure that the config was saved … So I will take a look very soon.

    Miroof

    in reply to: No more gamepad ? Why not use the phone ? #93395
    miroof
    Participant

    Hi Herbfargus,

    Thanks a lot for the explanations :)

    To launch a node.js application at startup, I use the amazing project pm2:

    https://github.com/Unitech/pm2

    Simply run these commands:

    # Install globally pm2
    sudo npm install pm2 -g
    # Launch virtual gamepads application with pm2
    sudo pm2 start main.js
    # Configure pm2 to launch at startup
    sudo pm2 startup
    # Save the current state of pm2 
    # to reload all current applications at startup
    sudo pm2 save
    

    Normally it should launch the application again at startup. PM2 will also relaunch automatically the application in case of crash.

    I highly recommand it for all node.js projects !


    @zombiebraut
    I hope it’s OK for you now ?

    Miroof

    in reply to: No more gamepad ? Why not use the phone ? #92731
    miroof
    Participant

    You got an EACCESS error because by default the application listens on port 80 and without root privileges you can’t listen on ports below 1024.

    So you have two solutions :

    The first one is to launch the application with sudo (sudo node main.js) and this page can help you : http://stackoverflow.com/questions/4976658/on-ec2-sudo-node-command-not-found-but-node-without-sudo-is-ok

    The second solution is to edit the file config.json by changing the port 80 for a port above 1024 (like 3000). In this case the application will be reachable at http://localhost:3000.

    I never tried the application without root privileges so I hope you will not have other issues … The first solution is the best one for me.

    And about installing node-gyp it’s the same, you can’t do that without root privileges.

    Miroof

    in reply to: No more gamepad ? Why not use the phone ? #92697
    miroof
    Participant

    Hi Zombiebraut,

    What is your node and npm version ?

    You can check it with:

    node --version
    npm --version
    

    Here are the steps I followed to install Node and npm:

    
    # Download and unpack Node.js
    wget http://nodejs.org/dist/v0.10.28/node-v0.10.28-linux-arm-pi.tar.gz
    tar -xvzf node-v0.10.28-linux-arm-pi.tar.gz
    rm -r node-v0.10.28-linux-arm-pi.tar.gz
    
    # Move sources and create sym links
    sudo mv node-v0.10.28-linux-arm-pi /opt/node
    
sudo mkdir /opt/bin

    sudo ln -s /opt/node/bin/* /opt/bin/
    
    # Add binaries to the PATH, add this line at the end of '/etc/profile' file
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
    
    # test
    npm --version
    
    # Install node-gyp
    npm install -g node-gyp
    

    I remember that I encountered some issues by installing nodeJS and npm directly with aptitude.

    Miroof

    in reply to: Smartphone as bluetooth controller #92191
    miroof
    Participant

    Hi t-m

    This post may interest you. The way is different (Wi-Fi instead of Bluetooth) but the result is the same :)

Viewing 5 posts - 1 through 5 (of 5 total)