How to setup photon username and password credentials[solved]

I am using a photon, and can;t seem to get it to connect to my school’s wifi. Although I can just use a new router to connect it to, I would like to set it up using my school’s username and password.

Steps taken:

  1. Use PArticle app
  2. Connect to Photon wifi
  3. Put password only for Photon set up
  4. Failed to set up

Steps taken (2/2)

  1. Go to website https://docs.particle.io/guide/getting-started/connect/photon/
  2. Install Node.js
  3. Type npm install -g particle-cli in terminal for OSX
  4. Error when terminal reads:

npm WARN engine particle-cli@1.6.9: wanted: {“node”:"^0.10.0"} (current: {“node”:“4.0.0”,“npm”:“2.14.2”})
npm ERR! tar.unpack untar error /Users/jjwInNY/.npm/particle-cli/1.6.9/package.tgz
npm ERR! Darwin 14.4.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” "particle-cli"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! path /usr/local/lib/node_modules/particle-cli
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/particle-cli’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/particle-cli’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘mkdir’,
npm ERR! path: ‘/usr/local/lib/node_modules/particle-cli’,
npm ERR! fstream_type: ‘Directory’,
npm ERR! fstream_path: ‘/usr/local/lib/node_modules/particle-cli’,
npm ERR! fstream_class: ‘DirWriter’,
npm ERR! fstream_stack:
npm ERR! [ ‘/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25’,
npm ERR! ‘/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53’,
npm ERR! ‘FSReqWrap.oncomplete (fs.js:82:15)’ ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/jjwInNY/npm-debug.log
acd4130242937635:~ jjwInNY$ npm install -g particle-cli
npm WARN engine particle-cli@1.6.9: wanted: {“node”:"^0.10.0"} (current: {“node”:“4.0.0”,“npm”:“2.14.2”})
npm ERR! tar.unpack untar error /Users/jjwInNY/.npm/particle-cli/1.6.9/package.tgz
npm ERR! Darwin 14.4.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” "particle-cli"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! path /usr/local/lib/node_modules/particle-cli
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/particle-cli’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/particle-cli’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘mkdir’,
npm ERR! path: ‘/usr/local/lib/node_modules/particle-cli’,
npm ERR! fstream_type: ‘Directory’,
npm ERR! fstream_path: ‘/usr/local/lib/node_modules/particle-cli’,
npm ERR! fstream_class: ‘DirWriter’,
npm ERR! fstream_stack:
npm ERR! [ ‘/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25’,
npm ERR! ‘/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53’,
npm ERR! ‘FSReqWrap.oncomplete (fs.js:82:15)’ ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/jjwInNY/npm-debug.log
acd4130242937635:~ jjwInNY$

@woofwarrior, when you say “username and password”, do you mean the wifi credentials? The Photon doesn’t support an enterprise type wifi setup where you need to have network username and password (at least not right now).

As for the CLI issues, you need nodeJS version 0.10.0 and you are using v4.0.0 which is the latest which obviously breaks something! :smile:

@peekay123 Yes, I was using wifi credential when trying to set up the photon with wi-fi.
However, I do believe that it is a much better way. Can you help with the second part, too please? I went to the website, and downloaded the nodeJS version 0.10.0 and it still broke with this error:

acd4130242937635:~ jjwInNY$ npm install -g particle-cli
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/particle-cli’
npm ERR! { [Error: EACCES, mkdir ‘/usr/local/lib/node_modules/particle-cli’]
npm ERR! errno: 3,
npm ERR! code: ‘EACCES’,
npm ERR! path: ‘/usr/local/lib/node_modules/particle-cli’,
npm ERR! fstream_type: ‘Directory’,
npm ERR! fstream_path: ‘/usr/local/lib/node_modules/particle-cli’,
npm ERR! fstream_class: ‘DirWriter’,
npm ERR! fstream_stack:
npm ERR! [ ‘/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23’,
npm ERR! ‘/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53’,
npm ERR! ‘Object.oncomplete (fs.js:108:15)’ ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 14.4.0
npm ERR! command “node” “/usr/local/bin/npm” “install” “-g” "particle-cli"
npm ERR! cwd /Users/jjwInNY
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! path /usr/local/lib/node_modules/particle-cli
npm ERR! fstream_path /usr/local/lib/node_modules/particle-cli
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/particle-cli’
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jjwInNY/npm-debug.log
npm ERR! not ok code 0
acd4130242937635:~ jjwInNY$ npm install -g particle-cli
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/particle-cli’
npm ERR! { [Error: EACCES, mkdir ‘/usr/local/lib/node_modules/particle-cli’]
npm ERR! errno: 3,
npm ERR! code: ‘EACCES’,
npm ERR! path: ‘/usr/local/lib/node_modules/particle-cli’,
npm ERR! fstream_type: ‘Directory’,
npm ERR! fstream_path: ‘/usr/local/lib/node_modules/particle-cli’,
npm ERR! fstream_class: ‘DirWriter’,
npm ERR! fstream_stack:
npm ERR! [ ‘/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23’,
npm ERR! ‘/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53’,
npm ERR! ‘Object.oncomplete (fs.js:108:15)’ ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 14.4.0
npm ERR! command “node” “/usr/local/bin/npm” “install” “-g” "particle-cli"
npm ERR! cwd /Users/jjwInNY
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! path /usr/local/lib/node_modules/particle-cli
npm ERR! fstream_path /usr/local/lib/node_modules/particle-cli
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/particle-cli’
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jjwInNY/npm-debug.log
npm ERR! not ok code 0

@woofwarrior, did you try runninng with sudo?

Actually, this line of code fixed that problem:

Update: When turning over the laptop’s network to the photon, it requires a “non-enterprise type.” If I am not mistaken, I believe I can’t use the set up by usb either.

First things first, have you managed to install the CLI correctly? If not, try running the install command again, with sudo, that should help.
Then, what kind of network are you trying to connect your Photon to? If it’s an enterprise network it wont work.

1 Like

Yes, unfortunately it is. I already solved the sudo problem.