Photon having serial terminal issues

I’m having a lot of weird issues with my new Photon. I really hate using smart-devices so I tried to avoid using the app, I instead used particle-cli, which thought my Photon was a Spark Core. It couldn’t connect over /dev/ttyACM0, nor could PuTTY (I run Linux, PuTTY is cross-platform). /dev/ttyACM0 exists in my filesystem. I couldn’t connect at all via the serial terminal over USB, so I tried the app, and it connected to the wifi signal out of the photon (Photon-XYZ) and it failed when trying to disconnect, said it was an internal problem with the device. The photon at this point, was blinking green, and hasn’t stopped since. I tried setting it up with the app again, and it did the same thing. The photon starts blinking green on every reset or unplug/plug.

EDIT: /dev/ttyACM0 no longer exists in my filesystem, after trying to set it up with the app. My photon is currently connected and blinking green very fast. The WiFi access point no longer exists and my device is still blinking green.

$ node --version
v0.12.7
$ uname -a
Linux wn-hpe 3.16.7.16-1-MANJARO #1 SMP PREEMPT Thu Aug 20 16:47:29 UTC 2015 x86_64 GNU/Linux
$ lsusb
Bus 002 Device 008: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 002 Device 003: ID 0d8c:0031 C-Media Electronics, Inc. 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0a5c:217d Broadcom Corp. HP Bluethunder
Bus 001 Device 003: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 1058:0748 Western Digital Technologies, Inc. My Passport (WDBKXH, WDBY8L)
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0461:0010 Primax Electronics, Ltd HP PR1101U / Primax PMX-KPR1101U Keyboard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Hi @concerned,

What do you get when you run a

particle serial list

edit: Also, the serial device will only show up when your photon / core / etc is in “Setup Mode” or “Listening Mode” (blinking blue, hold down Setup for 3 seconds to put it back into listening mode), or when you have Serial.begin(...) in your firmware. :slight_smile:

Thanks!
David

$ particle serial list
Error listing serial ports:  { [Error: ENOENT, scandir '/dev/serial/by-id'] errno: -2, code: 'ENOENT', path: '/dev/serial/by-id' }
No devices available via serial

Holding the Setup button doesn’t change anything, if I hold it for ~20 seconds, the light freezes on whichever state it was in. It’s still blinking green.

Hi @concerned,

Hmm, holding it for long enough should do a fast-blue, which should clear any stored credentials. You can also do a factory reset which should get you back to setup mode:

Thanks,
David

Thanks, it’s back to normal, though I still can’t connect to the serial terminal.

$ particle serial list
Found 1 device connected via serial:
/dev/ttyACM0 - Core
$ particle setup
                  _   _      _        _
 _ __   __ _ _ __| |_(_) ___| | ___  (_) ___
| '_ \ / _` | '__| __| |/ __| |/ _ \ | |/ _ \
| |_) | (_| | |  | |_| | (__| |  __/_| | (_) |
| .__/ \__,_|_|   \__|_|\___|_|\___(_)_|\___/
|_|                     https://particle.io/

> Setup is easy! Let's get started...
> It appears as though you are already logged in as concerned@airmail.cc
? Would you like to log in with a different account? No

! PROTIP: Hold the MODE/SETUP button on your device until it blinks blue!
! PROTIP: Please make sure you are connected to the internet. 

> I have detected a Core connected via USB.
? Would you like to continue with this one? Yes
Serial err: Error: Cannot open /dev/ttyACM0
Serial problems, please reconnect the device.
? Is your core blinking BLUE: Yes
Great! Lets give this another try...
Serial err: Error: Cannot open /dev/ttyACM0
Serial problems, please reconnect the device.
? Is your core blinking BLUE: Yes
Great! Lets give this another try...
Serial err: Error: Cannot open /dev/ttyACM0
Serial problems, please reconnect the device.
? Is your core blinking BLUE: Yes
Great! Lets give this another try...
! Something went wrong
! Out of tries Serial problems, please reconnect the device.

My device is a Particle Photon.

Running sudo particle setup works. Of course I should have tried that in the first place :laughing:

1 Like

Hi @concerned,

Hmm, maybe this needs to be run as root? Some linux installs protect access to serial devices, can you try it with a sudo in front?

edit: beat me to it. :slight_smile:

Thanks,
David

Thanks, but there is another problem:

                  _   _      _        _
 _ __   __ _ _ __| |_(_) ___| | ___  (_) ___
| '_ \ / _` | '__| __| |/ __| |/ _ \ | |/ _ \
| |_) | (_| | |  | |_| | (__| |  __/_| | (_) |
| .__/ \__,_|_|   \__|_|\___|_|\___(_)_|\___/
|_|                     https://particle.io/

> Setup is easy! Let's get started...
> It appears as though you are already logged in as concerned@airmail.cc
? Would you like to log in with a different account? No

! PROTIP: Hold the MODE/SETUP button on your device until it blinks blue!
! PROTIP: Please make sure you are connected to the internet. 

> I have detected a Core connected via USB.
? Would you like to continue with this one? Yes
? Should I scan for nearby Wi-Fi networks? Yes
? Select the Wi-Fi network with which you wish to connect your device: (Use arro? Select the Wi-Fi network with which you wish to connect your device: THE.WIFI.SSID
? Security Type: WPA2
? Wi-Fi Password: the-wifi-password
Attempting to configure Wi-Fi on /dev/ttyACM0
I said: w
Serial said: SSID: 
I said: THE.WIFI.SSID

Serial said: THE.WIFI.SSID
Security 0=unsecured, 1=WEP, 2=WPA, 3=WPA2: 
I said: 3

Serial said: 3
Password: 
I said: the-wifi-password

Serial said: the-wifi-password
Thanks! Wait while I save those credentials...
timed out on Spark <3 you!
Something went wrong Serial prompt timed out - Please try restarting your device
! Something went wrong
! Serial prompt timed out - Please try restarting your device
Potentially unhandled rejection [2] Serial prompt timed out - Please try restarting your device (WARNING: non-Error used)
Potentially unhandled rejection [4] Serial prompt timed out - Please try restarting your device (WARNING: non-Error used)

I try to use sudo putty and connect to /dev/ttyACM0 and it works, I hit w, enter the needed info, it starts flashing green and it hangs on Thanks! Wait while I save those credentials.... It continues to flash green while the terminal is frozen and then after ~20 seconds, it goes back into listening mode, and the terminal is still frozen.

Hmm, as the device attempts to connect to the network, the serial terminal will stop running, that’s normal. It’s strange to me that your photon isn’t connecting. That makes me think there is a problem with those wifi settings. Can you try setting up with the mobile app, or attaching an antenna to your photon?

Thanks,
David