0

我试图用 esp32 连接以太网模块。我的连接如下:

SO--> MOSI pin 23 SI--> MISO pin 19 CS--> CS pin 5 SCK-->CLK pin18

输出数据为:

rst:0x1 (POWERON_RESET),boot:0x13
(SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044
load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8
Local IP : 0.0.0.0 Subnet Mask : 0.0.0.0 Gateway IP : 0.0.0.0 DNS
Server : 0.0.0.0 Ethernet Successfully Initialized

我无法连接到以太网我不知道如何解决这个问题。

     
    #include <utility/logging.h>

    EthernetClient ethClient;
                                                                                 
    uint8_t macaddress[6] = {0x1,0x2,0x3,0x4,0x5,0x6};

    void setup() {
  

    Serial.begin(115200);
    //Ethernet.init(5);
    Ethernet.begin(macaddress); // Dynamic IP setup 

    delay(5000);

    Serial.print("Local IP : ");
    Serial.println(Ethernet.localIP());
    Serial.print("Subnet Mask : ");
    Serial.println(Ethernet.subnetMask());
    Serial.print("Gateway IP : ");
    Serial.println(Ethernet.gatewayIP());
    Serial.print("DNS Server : ");
    Serial.println(Ethernet.dnsServerIP());
    Serial.println("Ethernet Successfully Initialized");
    }

    void loop()
    {

     
    }
4

0 回答 0