SC20260D Module on Dev Board and Built-In-Ethernet

I’m trying to get Built-In Ethernet working on the SC20260D Dev Board. I can see no LED flickering on the Ethernet connector so I wonder if my Module has an Phy installed that I can use the Ethernet connector.

One led is coffee connect and second for speed. They will not flicker

Oh, coffee and speed, isn’t that to much? :wink: No kidding, so I can assume that built-in-Ethernet should work with this module?

Lol I need to stop writing in my sleep. I mean one LED is for connection and one for speed. They will not blink.

LEDs aside, did you try it?

I didn’t get it working yet, but I must make more explorations to ask reasonable questions.

Sorry, no success. I tried DHCP and static IP, different MAC, Firmware v2.0.0.20000 and v2.0.0.21000 all with no success. In my router I could not see that an Ip-Address got assigned.
I’ll give up for now and try ENC28 and WiFi

I had seemingly a similar issue. How are you generating the MAC? If it is not a valid MAC, the interface won’t do anything. It doesn’t give an exception, sends no traffic over the wire, nothing.

Do these work?

That’s what I used to generate mine that worked. Yes.

I took a MAC that was assigned from GHI to a Spider Mainboard, namely 00-21-03-80-35-C5. I assume that this was a valid MAC. But I’ll try a MAC from the link. Thank you.

No luck with different MACs from the link as well. The connect LED is on, the speed LED is never on. The Ethernet cable works with another PC. Perhaps there is something wrong with the Phy Chip 83848. Can I do any tests to find out if the chip works properly? Which MAC exactly did work for you?

Share some simple code of what your have please

check this article

Small update for those of you who have a problem generating a new MAC address for your Wifi-adapter. You just have to set the first octet of MAC address to “02”, instead on what normally is “00”. Setting first octet “02” actually sets the b2 bit indicating that the MAC address is locally administered

1 Like

Here is my Code, @volan_hoti suggestions didn’t solve the problem

     using System;
     using System.Net;
     using System.Collections;
     using System.Text;
     using System.Threading;
     using GHIElectronics.TinyCLR.Devices.Gpio;
     using GHIElectronics.TinyCLR.Pins;
    using GHIElectronics.TinyCLR.Devices.Network;

    namespace SC20260_Ethernet_Test_01
    class Program
        const int RESET = SC20260.GpioPin.PG3;      
        static bool phyReady = false;
        static bool linkReady = false;
        static void Main()
   static void DoTestEthernet()
        // Do external Phy reset
        var gpioController = GpioController.GetDefault();    
        var resetPin = gpioController.OpenPin(RESET);    
        var networkController = NetworkController.FromName("GHIElectronics.TinyCLR.NativeApis.STM32H7.EthernetEmacController\\\0");
        var networkInterfaceSetting = new EthernetNetworkInterfaceSettings();
        var networkCommunicationInterfaceSettings = new       BuiltInNetworkCommunicationInterfaceSettings();
        networkInterfaceSetting.Address = new IPAddress(new byte[] { 192, 168, 1, 122 });
        networkInterfaceSetting.SubnetMask = new IPAddress(new byte[] { 255, 255, 255, 0 });
        networkInterfaceSetting.GatewayAddress = new IPAddress(new byte[] { 192, 168, 1, 1 });
        networkInterfaceSetting.DnsAddresses = new IPAddress[] { new IPAddress(new byte[]
              { 75, 75, 75, 75 }), new IPAddress(new byte[] { 75, 75, 75, 76 }) };
       // I tried all these different MAC addresses, none worked
            //networkInterfaceSetting.MacAddress = new byte[] { 0x00, 0x4, 0x00, 0x00, 0x00, 0x00 };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x00, 0x21, 0x03, 0x80, 0x35, 0xC5 };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x26, 0x48, 0x1e, 0x7d, 0x57, 0x54 };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x00, 0x00, 0x00, 0x3c, 0x83, 0x6e };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x00, 0x21, 0x03, 0xa4, 0xb9, 0xef };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x01, 0x21, 0x03, 0x36, 0x8e, 0x94 };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x02, 0x21, 0x03, 0x36, 0x8e, 0x94 };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x02, 0x21, 0x03, 0x80, 0x35, 0xC5 };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x8a, 0x39, 0x2a, 0x6c, 0xf7, 0xa2 };
            //networkInterfaceSetting.MacAddress = new byte[] { 0xB3, 0xAD, 0x78, 0x32, 0x93, 0x60 };
            //networkInterfaceSetting.MacAddress = new byte[] { 0x02, 0x21, 0x03, 0x80, 0x35, 0xC5 };
            networkInterfaceSetting.MacAddress = new byte[] { 0x4A, 0x28, 0x05, 0x2A, 0xA4, 0x0F };
     networkInterfaceSetting.IsDhcpEnabled = true;
        networkInterfaceSetting.IsDynamicDnsEnabled = true;
        networkInterfaceSetting.TlsEntropy = new byte[] { 0, 1, 2, 3 };
        networkController.NetworkAddressChanged += NetworkController_NetworkAddressChanged;
        networkController.NetworkLinkConnectedChanged += NetworkController_NetworkLinkConnectedChanged;
while (linkReady == false) ;
System.Diagnostics.Debug.WriteLine("Network is ready to use");
private static void NetworkController_NetworkAddressChanged(NetworkController sender, NetworkAddressChangedEventArgs e)
            var ipProperties = sender.GetIPProperties();
            var address = ipProperties.Address.GetAddressBytes();
            linkReady = address[0] != 0 ? true : false;
            // Raise event connect/disconnect
        private static void NetworkController_NetworkLinkConnectedChanged(NetworkController sender, NetworkLinkConnectedChangedEventArgs e)
            phyReady = e.Connected;
            System.Diagnostics.Debug.WriteLine("Phy staus " + phyReady);            

try putting a $ in front of that string or escape the \

Thank for looking so deeply in the code. Unfortunately this was not the cause for not working. It was only “Markdown” which swallowed the second backslash (I’ll try to correct it). Taking a string with characters that have to be escaped as a parameter of a function may easily be a cause of issues. As I know GHI they probably have a good reason to do so and … taking a wrong string throws an exception.

As I tested, it throws an exception if the param is invalid.

Didn’t your case?

Hi @Dat_Tran, no no. It does throw an exception if the param is invalid for me as well.
Did you see any issues in the code I posted? Did it work for you?

Did anyone get the time to have a look on the code I posted? Is there something wrong with the code or the MAC or can we assume that just my board (built-in ethernet) doesn’t work properly?

Why assign an IP address if you are using DHCP? Try without ip address!

1 Like