Photon 2 - 5.8.0 regression - ethernet no longer supported?

Hi all - it looks like there may be some oddities with the Photon 2 + deviceOS 5.8.0 + Ethernet, where the interface does not appear to be powered on.

I've checked against 5.0.0, 5.4.0, 5.6.0 - all of which are able to bring up the Ethernet interface - however it is unable to do so with deviceOS 5.8.0 - looking at the traces, there is no indication of attempting to power the interface up.

Simple test code, similar to what has been used in the ethernet testing thread:


// Include Particle Device OS APIs
#include "Particle.h"

// Let Device OS manage the connection to the Particle Cloud
SYSTEM_MODE(SEMI_AUTOMATIC);

// Run the application and system concurrently in separate threads
SYSTEM_THREAD(ENABLED);

// Show system, cloud connectivity, and application logs over USB
// View logs with CLI using 'particle serial monitor --follow'
SerialLogHandler logHandler(LOG_LEVEL_ALL);
// setup() runs once, when the device is first turned on
void setup() {
  // Put initialization like pinMode and begin functions here

    Serial.begin();
    pinMode(D10,INPUT);  // Argon D8, Photon2 D10  - ADR2
    pinMode(D7,INPUT);  // ADR1 no change
    pinMode(D6,INPUT);  //ADR0 no change
    pinMode(D2, OUTPUT); //TX_enable
    digitalWrite(D2,LOW); //receive is LOW, transmit is HIGH - set to LOW by default(RECEIVE) at start
    // To force Ethernet only, clear Wi-Fi credentials
    Log.info("Clear Wi-Fi credentionals...");

    WiFi.clearCredentials();

    if(System.featureEnabled(FEATURE_ETHERNET_DETECTION)){
        Log.info("FEATURE_ETHERNET_DETECTION enabled");
    }
    else{
        System.enableFeature(FEATURE_ETHERNET_DETECTION);
        Log.info("FEATURE_ETHERNET_DETECTION enabled");
        delay(500);
        System.reset();
    }
    

    if (Ethernet.isOff()){
        Ethernet.on();
        waitFor(Ethernet.isOn,15000);
        
    }

    Ethernet.connect();
    waitFor(Ethernet.ready,10000);
    Particle.connect();

}


void loop() {

    static system_tick_t lastPublish = millis();
    static int count = 0;
    static bool reconnect = false;

    if (Particle.connected()) {
        reconnect = false;
        if (millis() - lastPublish >= 10000UL) {
            //print ethernet ip address
            Log.info("Ethernet IP: %s", Ethernet.localIP().toString().c_str());
            Particle.publish("mytest", String(++count), PRIVATE, WITH_ACK);
            lastPublish = millis();
        }
    }


}

I think this might be related to a connection management bug. It may be fixed with this PR in 5.8.2, which will be released shortly.

2 Likes

Hi Rick - is there a projected timeframe for 5.8.2 to be updated in Workbench? - it seems to be released (or am I just crazy and can't find it)

1 Like

Workbench 1.16.23 should be in the VSCode marketplace and include Device OS 5.8.2. It was released on Tuesday, July 2. However I have that version and 5.8.2 is not displaying for me either.

@rickkas7, I don't see 5.8.2 either on the latest Workbench.

I see the problem. You need to go into Settings, Extensions, Particle, and make sure the Enable Pre-release Device OS Buiilds checkbox is checked.

1 Like

Another workaround: you can edit the .vscode/settings.json and change the particle.firmwareVersion to 5.8.2 like this:

After saving it, the DeviceOS toolchain was downloaded by VScode and I was able to use it.

It does not appear on the palette, but you are able to work with it until the official update comes to VScode.

So right now it does not look promising for 5.8.2 - exhibiting the same behavior as 5.8.0 with regards to ethernet.
I'll post some output of logs shortly, but it looks like it is only finding the WIFI interface, not the ETH

001a000)
0000001651 [hal] INFO: WiFi KM0 firmware initialization completed result=0 (RAM start=10006000 end=10013bf8 reserved=00005000)
0000001693 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:04:08:cc
0000001841 [hal] INFO: WiFi on
0000001888 [hal.ble] TRACE: Going to stop the stack...
0000002210 [hal] INFO: WiFi off
0000002219 [system.nm] INFO: State changed: NONE -> DISABLED
0000002234 [system.nm] TRACE: Interface 4 power state: DOWN
0000002271 [comm] INFO: channel inited
0000002283 [app] INFO: Clear Wi-Fi credentionals...
0000002299 [app] INFO: FEATURE_ETHERNET_DETECTION enabled
0000002313 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000017317 [system.listen] INFO: Entering listening mode
0000017358 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:04:08:cc
0000017539 [hal] INFO: WiFi on

That's weird that it's going into listening mode.

I was able to connect to Ethernet successfully with 5.8.2 with a Photon 2. I used the Adafruit Ethernet FeatherWing and the default pin assignments.

This is the firmware I used:

#include "Particle.h"

SYSTEM_MODE(SEMI_AUTOMATIC);
SYSTEM_THREAD(ENABLED);

SerialLogHandler logHandler(LOG_LEVEL_TRACE);

void setup()
{
    // Comment out the following line in production; used only to see all serial debug messages
    waitFor(Serial.isConnected, 10000);
    delay(1000);

    System.enableFeature(FEATURE_ETHERNET_DETECTION);

    WiFi.clearCredentials();
    WiFi.off();

    Ethernet.on();

    Ethernet.setConfig(NetworkInterfaceConfig().source(NetworkInterfaceConfigSource::DHCP, AF_INET));

    Ethernet.connect();

    waitFor(Ethernet.ready, 10000);
    Particle.connect();
}

void loop()
{
}


Here's the log:

Serial monitor opened successfully:
0000001945 [hal] INFO: WiFi on
0000001989 [hal.ble] TRACE: Going to stop the stack...
0000002311 [hal] INFO: WiFi off
0000002319 [system.nm] INFO: State changed: NONE -> DISABLED
0000002333 [system.nm] TRACE: Interface 4 power state: DOWN
0000002347 [system.nm] TRACE: Interface 3 power state: UP
0000002381 [comm] INFO: channel inited
0000003444 [ncp.mgr] TRACE: Updated file: /sys/wifi_config.bin
0000003665 [system.nm] TRACE: Updated file: /sys/network.dat
0000003849 [system.nm] TRACE: Request to power off interface 4
0000003934 [system.nm] TRACE: Updated file: /sys/network.dat
0000003974 [system.nm] TRACE: Request to power on interface 3
0000003998 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000004122 [system.nm] INFO: State changed: IFACE_DOWN -> IFACE_REQUEST_UP
0000004160 [net.ifapi] INFO: Netif en2 state UP
0000004174 [net.en] TRACE: Closed MACRAW socket
0000004186 [net.en] TRACE: Opened MACRAW socket, err = 0
0000004200 [system.nm] INFO: State changed: IFACE_REQUEST_UP -> IFACE_UP
0000004376 [net.en] INFO: Link up
0000004376 [net.ifapi] INFO: Netif en2 link UP, profile=NONE
0000004380 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000004393 [hal] INFO: DNS server list changed
0000004394 [hal] INFO: DNS server list changed
0000004395 [net.ifapi] TRACE: Netif en2 ipv4 configuration changed
0000004397 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000004401 [system] INFO: Cloud: connecting
0000004421 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000004462 [system] WARN: Failed to load session data from persistent storage
0000004506 [system] INFO: Discarding session data
0000004562 [system] TRACE: Resolving 0a10fffffffffffffffc53c.v5.udp.particle.io#5684
0000004655 [system] TRACE: Address type: 3
0000004677 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000004707 [system] INFO: Cloud socket=0, connecting to 52.45.184.198#5684 using if 3
0000004745 [system] INFO: Bound cloud socket to lwip if 3 ("en2")
0000004785 [system] TRACE: Cloud socket=0, connected to 52.45.184.198#5684
0000004825 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000004865 [system] TRACE: Applying new keepalive interval now
0000004895 [system] INFO: Cloud socket connected
0000004919 [system] INFO: Starting handshake: presense_announce=0
0000004945 [comm.protocol.handshake] INFO: Establish secure connection
0000004982 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000007545 [comm.protocol.handshake] INFO: Sending HELLO message
0000007578 [comm.coap] TRACE: Sending CoAP message
0000007599 [comm.coap] TRACE: CON POST /h size=39 token= id=1
0000007653 [comm.coap] TRACE: Received CoAP message
0000007680 [comm.coap] TRACE: ACK 0.00  size=4 token= id=1
0000007701 [comm.protocol.handshake] INFO: Handshake completed
0000007733 [comm.protocol.handshake] TRACE: Updating cached session parameters
0000007773 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000007807 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000008724 [comm.coap] TRACE: Sending CoAP message
0000008748 [comm.coap] TRACE: CON POST /d?\x01 size=198 token=c3 id=2
0000008781 [comm] INFO: Sending TIME request
0000008803 [comm.coap] TRACE: Sending CoAP message
0000008828 [comm.coap] TRACE: CON GET /t size=7 token=c4 id=3
0000008875 [system] INFO: Send spark/device/last_reset event
0000008906 [comm.coap] TRACE: Sending CoAP message
0000008932 [comm.coap] TRACE: CON POST /E/spark/device/last_reset size=42 token= id=4
0000008969 [comm.coap] TRACE: Sending CoAP message
0000008994 [comm.coap] TRACE: CON POST /E/particle/device/updates/enabled size=44 token= id=5
0000009034 [comm.coap] TRACE: Sending CoAP message
0000009061 [comm.coap] TRACE: CON POST /E/particle/device/updates/forced size=44 token= id=6
0000009101 [system] INFO: Sending application DESCRIBE
0000009129 [comm.coap] TRACE: Sending CoAP message
0000009156 [comm.coap] TRACE: CON POST /d?\x02 size=25 token=c5 id=7
0000009183 [system] INFO: Sending subscriptions
0000009207 [comm.protocol] INFO: Sending subscriptions
0000009235 [comm.coap] TRACE: Sending CoAP message
0000009260 [comm.coap] TRACE: CON GET /e/particle?u size=17 token= id=8
0000009290 [comm.coap] TRACE: Sending CoAP message
0000009314 [comm.coap] TRACE: CON GET /e/spark?u size=14 token= id=9
0000009346 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000009395 [comm.coap] TRACE: Received CoAP message
0000009417 [comm.coap] TRACE: ACK 0.00  size=5 token=c3 id=2
0000009448 [comm.protocol] TRACE: Updating system DESCRIBE checksum
0000009481 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000010442 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000010477 [comm.coap] TRACE: Received CoAP message
0000010501 [comm.coap] TRACE: ACK 2.05  size=10 token=c4 id=3
0000010529 [comm.protocol] INFO: Received TIME response: 1720454352
0000010659 [comm.coap] TRACE: Received CoAP message
0000010681 [comm.coap] TRACE: ACK 0.00  size=4 token= id=4
0000010809 [comm.coap] TRACE: Received CoAP message
0000010831 [comm.coap] TRACE: ACK 0.00  size=4 token= id=5
0000010960 [comm.coap] TRACE: Received CoAP message
0000010984 [comm.coap] TRACE: ACK 0.00  size=4 token= id=6
0000011113 [comm.coap] TRACE: Received CoAP message
0000011136 [comm.coap] TRACE: ACK 0.00  size=5 token=c5 id=7
0000011166 [comm.protocol] TRACE: Updating application DESCRIBE checksum
0000011201 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000011234 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000011367 [comm.coap] TRACE: Received CoAP message
0000011391 [comm.coap] TRACE: ACK 0.00  size=4 token= id=8
0000011519 [comm.coap] TRACE: Received CoAP message
0000011543 [comm.coap] TRACE: ACK 0.00  size=4 token= id=9
0000011572 [system] INFO: All handshake messages have been processed
0000011603 [comm.protocol] TRACE: Updating subscriptions checksum
0000011633 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000011664 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 3
0000011798 [comm.coap] TRACE: Received CoAP message
0000011821 [comm.coap] TRACE: CON GET /d?\x04 size=9 token=01 id=44510
0000011856 [comm.protocol] INFO: Received DESCRIBE request; flags: 0x04
0000011890 [comm.coap] TRACE: Sending CoAP message
0000011911 [comm.coap] TRACE: ACK 0.00  size=4 token= id=44510
0000011942 [comm.coap] TRACE: Sending CoAP message
0000011970 [comm.coap] TRACE: CON 2.05  size=151 token=01 id=10
0000012006 [system] INFO: Cloud connected
0000012028 [system.ledger] TRACE: Connected
0000012050 [comm.coap] TRACE: Received CoAP message
0000012075 [comm.coap] TRACE: CON POST /E/particle/device/updates/pending size=47 token=02 id=44511
0000012120 [comm.coap] TRACE: Sending CoAP message
0000012150 [comm.coap] TRACE: ACK 0.00  size=4 token= id=44511
0000012177 [system.ledger] INFO: Requesting ledger info
0000012204 [comm.coap] TRACE: Sending CoAP message
0000012229 [comm.coap] TRACE: CON POST /L size=25 token=c6 id=11
0000012259 [comm.coap] TRACE: Received CoAP message
0000012284 [comm.coap] TRACE: ACK 0.00  size=4 token= id=10
0000012313 [comm.coap] TRACE: Received CoAP message
0000012339 [comm.coap] TRACE: ACK 2.04  size=10 token=c6 id=11
0000012369 [system.ledger] INFO: Received ledger info
0000012394 [system.ledger] WARN: Ledger not found: device-info
0000037427 [comm.coap] TRACE: Sending CoAP message
0000037447 [comm.coap] TRACE: CON 0.00  size=4 token= id=12
0000037501 [comm.coap] TRACE: Received CoAP message
0000037525 [comm.coap] TRACE: ACK 0.00  size=4 token= id=12
0000062565 [comm.coap] TRACE: Sending CoAP message
0000062592 [comm.coap] TRACE: CON 0.00  size=4 token= id=13
0000062647 [comm.coap] TRACE: Received CoAP message
0000062673 [comm.coap] TRACE: ACK 0.00  size=4 token= id=13

1 Like

Hmm - definitely odd.
I added a small Log message just to make sure I was actually flashing it to the device.

Just tried an Argon with 6.1.0 - that is also able to see the eth interface.



It seems that something odd is going on; can see the ethernet with Photon 2 5.0.0 up to 5.6.0, Argon 6.1, Argon 4.2.0, Argon 5.8.2 - but not a Photon 2 with 5.8.0-5.8.2
That's more than moderately weird.

In terms of schematic/Pins:


(edit: put correct schematic)

Can confirm similar behavior as jgu seeing. P2 5.8.x, particle usb network-interfaces never lists ethernet as an option. P2 5.6.0 does, even if userland code never tries to touch the ethernet, (likely as long as
System.enableFeature(FEATURE_ETHERNET_DETECTION); has been set in the past.)

My user code is:

void setup() {}

void loop() {
  Serial.printlnf("loop");
  delay(1000);
}

and usb network-interfaces still lists Ethernet as an optional interface

Following up with this again - checking after getting a new board spin back, and after vacation.
Still the same issue with Photon2 on 5.8.2 using Rick's demo code with a log message added-

#include "Particle.h"

SYSTEM_MODE(SEMI_AUTOMATIC);
SYSTEM_THREAD(ENABLED);

SerialLogHandler logHandler(LOG_LEVEL_TRACE);

void setup()
{
    // Comment out the following line in production; used only to see all serial debug messages
    waitFor(Serial.isConnected, 10000);
    delay(1000);

    System.enableFeature(FEATURE_ETHERNET_DETECTION);

    WiFi.clearCredentials();
    WiFi.off();

    Ethernet.on();

    Ethernet.setConfig(NetworkInterfaceConfig().source(NetworkInterfaceConfigSource::DHCP, AF_INET));

    Ethernet.connect();
    Log.info("Trying demo code");
    waitFor(Ethernet.ready, 10000);
    Particle.connect();
}

void loop()
{
}


Not exactly sure why the WIFI is being turned back on after being turned off explicitly - but the device is in blinking blue.

Same code, using 5.6.0 - able to connect successfully:

4:94:4a:04:08:cc
0000001651 [hal] INFO: WiFi on
0000001684 [hal.ble] TRACE: Going to stop the stack...
0000001892 [net.lwip_rltk] INFO: promisc_deinit TODO
0000001897 [hal] INFO: WiFi off
0000001901 [system.nm] INFO: State changed: NONE -> DISABLED
0000001906 [system.nm] TRACE: Interface 4 power state: DOWN
0000001910 [system.nm] TRACE: Interface 3 power state: UP
0000001938 [comm] INFO: channel inited
0000002991 [ncp.mgr] TRACE: Updated file: /sys/wifi_config.bin
0000003228 [system.nm] TRACE: Updated file: /sys/network.dat
0000003421 [system.nm] TRACE: Request to power off interface 4
0000003517 [system.nm] TRACE: Updated file: /sys/network.dat
0000003519 [system.nm] TRACE: Request to power on interface 3
0000003680 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000003714 [app] INFO: Trying demo code
0000003721 [system.nm] INFO: State changed: IFACE_DOWN -> IFACE_REQUEST_UP
0000003903 [net.ifapi] INFO: Netif en2 state UP
0000004162 [net.en] TRACE: Closed MACRAW socket
0000004228 [net.en] TRACE: Opened MACRAW socket, err = 0
0000004235 [system.nm] INFO: State changed: IFACE_REQUEST_UP -> IFACE_UP
0000004604 [net.en] INFO: Link up
0000004606 [net.ifapi] INFO: Netif en2 link UP, profile=NONE
0000004610 [system.nm] INFO: State changed: IFACE_UP -> IFACE_LINK_UP
0000005183 [hal] INFO: DNS server list changed
0000005185 [net.ifapi] TRACE: Netif en2 ipv4 configuration changed
0000005187 [system.nm] INFO: State changed: IFACE_LINK_UP -> IP_CONFIGURED
0000005234 [system] INFO: Cloud: connecting
0000005426 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000005647 [system] INFO: Loaded cloud server address and port from session data
0000005883 [system] TRACE: Address type: 1
0000006005 [system] TRACE: Cloud socket=0, family=2, type=2, protocol=17
0000006212 [system] INFO: Cloud socket=0, connecting to 34.231.252.59#5684
0000006435 [system] TRACE: 0 Bound cloud socket to lwip interface en2
0000006636 [system] TRACE: Cloud socket=0, connected to 34.231.252.59#5684
0000006864 [system] TRACE: Updating cloud keepalive for AF_INET: 25000 -> 25000
0000007103 [system] TRACE: Applying new keepalive interval now
0000007293 [system] INFO: Cloud socket connected
0000007440 [system] INFO: Starting handshake: presense_announce=0
0000007638 [comm.protocol.handshake] INFO: Establish secure connection
0000007855 [comm.dtls] INFO: session has 0 uses
0000008004 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=0
0000008209 [comm.dtls] INFO: out_ctr 0,1,0,0,0,0,0,30, next_coap_id=b
0000008416 [comm.dtls] INFO: restored session from persisted session data. next_msg_id=11
0000008684 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 2
0000009670 [comm.protocol.handshake] INFO: Skipping HELLO message
0000009839 [comm.coap] TRACE: Sending CoAP message
0000009976 [comm.coap] TRACE: CON 0.00  size=4 token= id=12
0000010162 [system] INFO: cloud connected from existing session.
0000010623 [comm.coap] TRACE: Sending CoAP message
0000010748 [comm.coap] TRACE: CON POST /E/particle/device/updates/enabled size=44 token= id=13
0000011013 [comm.coap] TRACE: Sending CoAP message
0000011512 [comm.coap] TRACE: CON POST /E/particle/device/updates/forced size=44 token= id=14
0000011758 [comm] INFO: Sending TIME request
0000011914 [comm.coap] TRACE: Sending CoAP message
0000012029 [comm.coap] TRACE: CON GET /t size=7 token=5e id=15
0000012506 [system] INFO: Sending application DESCRIBE
0000012695 [comm.protocol] INFO: Checksum has not changed; not sending application DESCRIBE
0000013056 [system] INFO: Sending subscriptions
0000013163 [comm.protocol] INFO: Checksum has not changed; not sending subscriptions
0000013360 [system] TRACE: Waiting until all handshake messages are processed by the protocol layer
0000013589 [comm.dtls] INFO: session cmd (CLS,DIS,MOV,LOD,SAV): 4
0000013738 [comm.coap] TRACE: Received CoAP message
0000013854 [comm.coap] TRACE: ACK 0.00  size=4 token= id=12
0000014387 [comm.coap] TRACE: Received CoAP message
0000014509 [comm.coap] TRACE: ACK 0.00  size=4 token= id=13
0000014764 [comm.coap] TRACE: Received CoAP message
0000014901 [comm.coap] TRACE: ACK 0.00  size=4 token= id=14
0000015161 [comm.coap] TRACE: Received CoAP message
0000015286 [comm.coap] TRACE: CON POST /E/particle/device/updates/pending size=47 token=01 id=11781
0000015565 [comm.coap] TRACE: Sending CoAP message
0000015693 [comm.coap] TRACE: ACK 0.00  size=4 token= id=11781
0000016350 [comm.coap] TRACE: Received CoAP message
0000016509 [comm.coap] TRACE: ACK 2.05  size=10 token=5e id=15
0000016697 [system] INFO: All handshake messages have been processed
0000016860 [comm.protocol] INFO: Received TIME response: 1723709237
0000017146 [system] INFO: Cloud connected
0000017369 [comm] INFO: Forcing a cloud ping
0000017507 [comm.coap] TRACE: Sending CoAP message
0000017655 [comm.coap] TRACE: CON 0.00  size=4 token= id=16
0000018725 [comm.coap] TRACE: Received CoAP message
0000018876 [comm.coap] TRACE: ACK 0.00  size=4 token= id=16
0000044131 [comm.coap] TRACE: Sending CoAP message
0000044251 [comm.coap] TRACE: CON 0.00  size=4 token= id=17
0000045269 [comm.coap] TRACE: Received CoAP message
0000045405 [comm.coap] TRACE: ACK 0.00  size=4 token= id=17

Hi all - from the forums, it looks like I'm not the only one with this particular issue - is there any insight as to how/if we are progressing on it?

Took a moment to check again with the 5.9.0 prerelease.
same as 5.8.2

0000001974 [hal] INFO: WiFi on                                               
0000002021 [hal.ble] TRACE: Going to stop the stack...                       
0000002344 [hal] INFO: WiFi off                                              
0000002354 [system.nm] INFO: State changed: NONE -> DISABLED                 
0000002369 [system.nm] TRACE: Interface 4 power state: DOWN                  
0000002407 [comm] INFO: channel inited                                       
0000003421 [app] INFO: Trying demo code                                      
0000003421 [system.nm] TRACE: Request to power off interface 4               
0000003462 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN           
0000003502 [system.listen] INFO: Entering listening mode                     
0000003548 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:04:08:cc        
0000003734 [hal] INFO: WiFi on                                               
71 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:04:08:cc                
0000001925 [hal] INFO: WiFi on
0000001972 [hal.ble] TRACE: Going to stop the stack...
0000002295 [hal] INFO: WiFi off
0000002305 [system.nm] INFO: State changed: NONE -> DISABLED
0000002320 [system.nm] TRACE: Interface 4 power state: DOWN
0000002358 [comm] INFO: channel inited
0000003371 [app] INFO: Trying demo code
0000003373 [system.nm] TRACE: Request to power off interface 4
0000003414 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000003450 [system.listen] INFO: Entering listening mode
0000003494 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:04:08:cc
0000003681 [hal] INFO: WiFi on

@jgu Just a thought here - does your custom board have a separate 3V3 power rail for the ethernet adaptor? The P2 is very sensitive to its power supply and the WizNet 5500 appears to impact it. I have found that a feather ethernet adaptor worked with a Photon2 in prototyping but that moving to a custom board with a P2 it didn't. We have had to implement a separate 3V3 power rail.

Yep - we have the wiz5500is running of a 3v3 rail - we've moved to having the photon 2 powered off a separate 5v5 line into the VUSB pin (across a diode so if someone connects a USB device we don't backpower our board) so that it powers the photon 2's internal regulator - we end up with about 5.2V at the VUSB pin, which puts us within the (original) DC max spec limit for USB2.0 (5.25V) and well within the "newer" DC max spec limit for USB2.0 (5.5V).

Hi! Can you help me try the following at the top of your setup (OS5.9.0)?

void setup()
    if (!System.featureEnabled(FEATURE_ETHERNET_DETECTION)) {
        System.enableFeature(FEATURE_ETHERNET_DETECTION);
        System.reset();
    }
}

A note from our engineers is that a reset needs to be performed after System.enableFeature(FEATURE_ETHERNET_DETECTION);. There is an early boot check for this flag to perform W5500 detection or not, so it has to be set before setup() or STARTUP() has been called.

Hi Alberto -
With 5.9.0, still looks like similar behavior:

test code:

#include "Particle.h"

SYSTEM_MODE(SEMI_AUTOMATIC);
SYSTEM_THREAD(ENABLED);

SerialLogHandler logHandler(LOG_LEVEL_TRACE);

void setup()
{
    // Comment out the following line in production; used only to see all serial debug messages
    waitFor(Serial.isConnected, 10000);
    delay(1000);

    if (!System.featureEnabled(FEATURE_ETHERNET_DETECTION)) {
        System.enableFeature(FEATURE_ETHERNET_DETECTION);
        System.reset();
    }

    WiFi.clearCredentials();
    WiFi.off();

    Ethernet.on();

    Ethernet.setConfig(NetworkInterfaceConfig().source(NetworkInterfaceConfigSource::DHCP, AF_INET));

    Ethernet.connect();
    Log.info("Trying demo code");
    waitFor(Ethernet.ready, 10000);
    Particle.connect();
}

void loop()
{
}

result:

initialization completed result=0 (RAM start=10006000 end=10013bf8 reserved=00005000)
0000001730 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:04:08:cc
0000001878 [hal] INFO: WiFi on
0000001924 [hal.ble] TRACE: Going to stop the stack...
0000002245 [hal] INFO: WiFi off
0000002255 [system.nm] INFO: State changed: NONE -> DISABLED
0000002270 [system.nm] TRACE: Interface 4 power state: DOWN
0000002306 [comm] INFO: channel inited
0000003319 [app] INFO: Trying demo code
0000003320 [system.nm] TRACE: Request to power off interface 4
0000003355 [system.nm] INFO: State changed: DISABLED -> IFACE_DOWN
0000003387 [system.listen] INFO: Entering listening mode
0000003429 [hal] INFO: rltk_wlan_set_netif_info: 0, 94:94:4a:04:08:cc
0000003611 [hal] INFO: WiFi on

Note that the above is a trimmed down test code from the first post (where we did perform the reset if it was not set.

// Include Particle Device OS APIs
#include "Particle.h"

// Let Device OS manage the connection to the Particle Cloud
SYSTEM_MODE(SEMI_AUTOMATIC);

// Run the application and system concurrently in separate threads
SYSTEM_THREAD(ENABLED);

// Show system, cloud connectivity, and application logs over USB
// View logs with CLI using 'particle serial monitor --follow'
SerialLogHandler logHandler(LOG_LEVEL_ALL);
// setup() runs once, when the device is first turned on
void setup() {
  // Put initialization like pinMode and begin functions here

    Serial.begin();
    pinMode(D10,INPUT);  // Argon D8, Photon2 D10  - ADR2
    pinMode(D7,INPUT);  // ADR1 no change
    pinMode(D6,INPUT);  //ADR0 no change
    pinMode(D2, OUTPUT); //TX_enable
    digitalWrite(D2,LOW); //receive is LOW, transmit is HIGH - set to LOW by default(RECEIVE) at start
    // To force Ethernet only, clear Wi-Fi credentials
    Log.info("Clear Wi-Fi credentionals...");

    WiFi.clearCredentials();

    if(System.featureEnabled(FEATURE_ETHERNET_DETECTION)){
        Log.info("FEATURE_ETHERNET_DETECTION enabled");
    }
    else{
        System.enableFeature(FEATURE_ETHERNET_DETECTION);
        Log.info("FEATURE_ETHERNET_DETECTION enabled");
        delay(500);
        System.reset();
    }
    

    if (Ethernet.isOff()){
        Ethernet.on();
        waitFor(Ethernet.isOn,15000);
        
    }

    Ethernet.connect();
    waitFor(Ethernet.ready,10000);
    Particle.connect();

}


void loop() {

    static system_tick_t lastPublish = millis();
    static int count = 0;
    static bool reconnect = false;

    if (Particle.connected()) {
        reconnect = false;
        if (millis() - lastPublish >= 10000UL) {
            //print ethernet ip address
            Log.info("Ethernet IP: %s", Ethernet.localIP().toString().c_str());
            Particle.publish("mytest", String(++count), PRIVATE, WITH_ACK);
            lastPublish = millis();
        }
    }


}

And since I'm working with it, just tried that original one again right afterwards - still same behavior.