[Resolved] Photon doesn't report MAC address (stops responding after 'm' command) and doesn't connect to cloud

My Photon doesn’t report its MAC address.

When in Listening Mode (flashing blue LED) running photon setup yields the error Potentially unhandled rejection [2] Unable to find mac address in response (WARNING: non-Error used).

When in Listening Mode, sending ‘m’ over serial yields Your core MAC address, with nothing else printed . Photon stops responding after this (e.g. sending ‘i’ to get device information does not get a response).

I tried configuring the WiFi over serial (option ‘w’) but still could not read the MAC address. The Photon never stopped blinking green (Connecting to WiFi network).

The Photon-XXXX SSID can be seen by the Particle Android app but it also never successfully connects (tries indefinitely to connect)…

1 Like

Is this a totally new Photon that you are trying to setup? There’s some issues with serial and a system firmware update can resolve that.

Or try this: [Howto] Setup photon if docs step fail

1 Like

Yes it is. Should I clone the "develop" branch from GitHub - particle-iot/device-os: Device OS (Firmware) for Particle Devices and build the system-part?-?.?.?-photon.bin? Or is there a pre-built binary available?

I tried using particle serial wifi (previously I used a serial terminal manually) and the Photon is stuck at the "Connecting to Particle Cloud" step (blinking Cyan).

No you should not use develop. The stable branch is latest but a user should not need to go to that extend to get a Photon running.

Does it keep blinking cyan? any other colours?

Ping @mdma

The pre-compiled binaries are on the github releases page to save you having to setup a local toolchain.

Blinking cyan only. I know it's connected to the WiFi router; it blinks green before blinking cyan and I can see the device's MAC address on my router's status page.

Now, if I power cycle the Photon, it will alternate (randomly) between high-speed flashing cyan and red before going into fast cyan. I have not changed the firmware.

I used the pre-compiled binaries referred to by @mdma and the following procedure.

  1. Put Photon in DFU mode

  2. cd ~/Downloads

  3. $ sudo dfu-util --list
    dfu-util 0.5

    (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
    (C) 2010-2011 Tormod Volden (DfuSe support)
    This program is Free Software and has ABSOLUTELY NO WARRANTY

    dfu-util does currently only support DFU version 1.0

    Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03016Ka,01016Kg,01064Kg,07128Kg"
    Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=1, name="@DCT Flash /0x00000000/01*016Kg"

  4. $ sudo dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.4.3-photon.bin
    dfu-util 0.5

    (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
    (C) 2010-2011 Tormod Volden (DfuSe support)
    This program is Free Software and has ABSOLUTELY NO WARRANTY

    dfu-util does currently only support DFU version 1.0

    Filter on vendor = 0x2b04 product = 0xd006
    Opening DFU USB device... ID 2b04:d006
    Run-time device DFU version 011a
    Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03016Ka,01016Kg,01064Kg,07128Kg"
    Claiming USB DFU Interface...
    Setting Alternate Setting #0 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 011a
    Device returned transfer size 4096
    No valid DFU suffix signature
    Warning: File has no DFU suffix
    DfuSe interface name: "Internal Flash "

  5. $ sudo dfu-util -d 2b04:d006 -a 0 -s 0x8060000 -D system-part2-0.4.3-photon.bin (Note: I removed :leave because it is not supported by dfu-util 0.5. Instead, I manually reset the Photon after flashing).
    dfu-util 0.5

    (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
    (C) 2010-2011 Tormod Volden (DfuSe support)
    This program is Free Software and has ABSOLUTELY NO WARRANTY

    dfu-util does currently only support DFU version 1.0

    Filter on vendor = 0x2b04 product = 0xd006
    Opening DFU USB device... ID 2b04:d006
    Run-time device DFU version 011a
    Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03016Ka,01016Kg,01064Kg,07128Kg"
    Claiming USB DFU Interface...
    Setting Alternate Setting #0 ...
    Determining device status: state = dfuDNLOAD-IDLE, status = 0
    aborting previous incomplete transfer
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 011a
    Device returned transfer size 4096
    No valid DFU suffix signature
    Warning: File has no DFU suffix
    DfuSe interface name: "Internal Flash "

  6. Pressed the RESET button.

The Photon reset, reconnected to the WiFi, and again occasionally high-speed flashed red and cyan before simply flashing cyan indefinitely.

Ok it sounds like the core is unable to connect to the :cloud: based on red flashes.

I had this issue before.

Try this:

Can you tell from this output if dfu-util was able to flash that file?

$ sudo dfu-util -d 2b04:d006 -a 1 -s 2082 -D cloud_public.der

dfu-util 0.5

(C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
(C) 2010-2011 Tormod Volden (DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Filter on vendor = 0x2b04 product = 0xd006
Opening DFU USB device... ID 2b04:d006
Run-time device DFU version 011a
Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=1, name="@DCT Flash   /0x00000000/01*016Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "DCT Flash   "

hmm…not 100% but looks ok to me. How’s the Photon behaving? Was it claimed already?

@lucasrangit it looks like you are using a very old version of dfu-util, you will need to update to 0.8 to get it to work properly

1 Like

Same results. Blinking cyan. No, it's not registered, as far as I know it's brand new.

You're right. I'm using Ubuntu Linux 12.04 64-bit. I used the following to upgrade the software.

  1. $ wget https://launchpad.net/~tormodvolden/+archive/ubuntu/ppa/+files/dfu-util_0.8-0~lucid_amd64.deb

  2. $ sudo dpkg --install dfu-util_0.8-0~lucid_amd64.deb

  3. $ dfu-util --version

  4. Put Photon into DFU mode

  5. $ dfu-util --list
    dfu-util 0.8

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2014 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to dfu-util@lists.gnumonks.org

    Found DFU: [2b04:d006] ver=0200, devnum=8, cfg=1, intf=0, alt=1, name="@DCT Flash /0x00000000/01016Kg", serial="00000000010C"
    Found DFU: [2b04:d006] ver=0200, devnum=8, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03
    016Ka,01016Kg,01064Kg,07*128Kg", serial="00000000010C"

  6. $ sudo dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.4.3-photon.bin
    dfu-util 0.8

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2014 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to dfu-util@lists.gnumonks.org

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 2b04:d006
    Run-time device DFU version 011a
    Claiming USB DFU Interface...
    Setting Alternate Setting #0 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 011a
    Device returned transfer size 4096
    DfuSe interface name: "Internal Flash "
    Downloading to address = 0x08020000, size = 248732
    Download [=========================] 100% 248732 bytes
    Download done.
    File downloaded successfully

  7. $ sudo dfu-util -d 2b04:d006 -a 0 -s 0x8060000:leave -D system-part2-0.4.3-photon.bin
    dfu-util 0.8

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2014 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to dfu-util@lists.gnumonks.org

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 2b04:d006
    Run-time device DFU version 011a
    Claiming USB DFU Interface...
    Setting Alternate Setting #0 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 011a
    Device returned transfer size 4096
    DfuSe interface name: "Internal Flash "
    Downloading to address = 0x08060000, size = 151192
    Download [=========================] 100% 151192 bytes
    Download done.
    File downloaded successfully
    dfu-util: Error during download get_status

  8. Photon reset automatically and showed similar high-speed blink between cyan and red followed by continuous cyan blink.

  9. $ sudo dfu-util -d 2b04:d006 -a 1 -s 2082 -D cloud_public.der
    dfu-util 0.8

    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2014 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to dfu-util@lists.gnumonks.org

    dfu-util: Invalid DFU suffix signature
    dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
    Opening DFU capable USB device...
    ID 2b04:d006
    Run-time device DFU version 011a
    Claiming USB DFU Interface...
    Setting Alternate Setting #1 ...
    Determining device status: state = dfuIDLE, status = 0
    dfuIDLE, continuing
    DFU mode device DFU version 011a
    Device returned transfer size 4096
    DfuSe interface name: "DCT Flash "
    Downloading to address = 0x00000822, size = 402
    Download [=========================] 100% 402 bytes
    Download done.
    File downloaded successfully

  10. Pressed RESET

  11. Still no luck.

  12. Performed Factory Reset

  13. Now, Photon responds to $ particle serial mac with MAC address and without hanging.

  14. Reconfigure WiFi with $ particle serial wifi

Still no luck connecting to Particle Cloud.

Would it help debugging if I installed an Ethernet packet sniffer?

hmm… It might be useful though it seems like the Photon has issues connecting to the :cloud:

Can you setup a mobile hotspot and try connecting the Photon to it?

Okay, here's a Wireshark packet capture showing the Photon aquiring a DHCP lease and connecting to the Internet.

I tried my home router, my phone, and a Raspberry Pi access point. Regardless of the router, the Photon does not pass the blinking cyan state.

Please reset the photon then look at the LED carefully, does it ever get to fast blinking cyan? If so, look carefully, do you see brief intermittent flashes of red or orange?

1 Like

Yes, the photos intermittently flashes red and cyan at a higher-speed. It has been doing that since the beginning. For about 2 minutes there are a few short bursts of high-speed cyan, then fewer high-speed red. Then a few minutes of just fast cyan, followed by a single longer burst of high-speed cyan, then again shorter burst of high-speed red, until finally the Photon rests at blinking cyan.

The only change in behavior since the system firmware update is that I can now report the MAC address over serial using particle serial mac and the serial terminal using 'm' and it does not lock up the serial port.

It sounds like you need to flash new keys.

1 Like

The instructions you provided worked perfectly! Thanks @kennethlimcp, @mdma, and @Hootie81 for helping me peel the onion and deal with all the issues.

$ particle keys new
running openssl genrsa -out device.pem 1024
running openssl rsa -in device.pem -pubout -out device.pub.pem
running openssl rsa -in device.pem -outform DER -out device.der
New Key Created!
$ sudo dfu-util -d 2b04:d006 -a 1 -s 34 -D device.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash   "
Downloading to address = 0x00000022, size = 610
Download	[=========================] 100%          610 bytes
Download done.
File downloaded successfully
$ particle serial identify

Your device id is 1c004000124734333938****
$ particle device add 1c004000124734333938****
Claiming device 1c004000124734333938****
Successfully claimed device 1c004000124734333938****
1 Like

I had the same experience up until this call:

particle serial identify

! serial: No devices available via serial
$ particle serial identify

! serial: Serial timed out
Potentially unhandled rejection [2] Serial timed out (WARNING: non-Error used)

RESOLVED: device keys and cloud settings got messed up. once this was fixed photon back online and connected