Skip to content

Ethernet + SPI (W5500) commands #852

@pedrorovi

Description

@pedrorovi

Answers checklist.

  • I have read the documentation ESP-AT Programming Guide and the issue is not addressed there.
  • I have used the latest released firmware or have updated my ESP-AT branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hey,
I have a problem. The AT firmware can't store cmd commands with SPI defined to use Ethernet.
I have implemented the example and I get these logs:

I (2908) eth_example: Ethernet Started
I (2913) eth_example: SPI Driver installed correctly 
E (2918) esp_eth: esp_eth_driver_install(189): can't set eth->mac or eth->phy to null
regist ethernet cmd fail
I (2930) main_task: Returned from app_main()
D (4913) w5500.mac: working in 100Mbps
D (4914) w5500.mac: working in full duplex
D (4914) w5500.mac: link is up
D (4914) event: running post ETH_EVENT:2 with handler 0x400dc820 and context 0x3ffb8288 on loop 0x3ffbc400
D (4924) event: running post ETH_EVENT:2 with handler 0x4013e168 and context 0x3ffb965c on loop 0x3ffbc400
D (4933) esp_eth.netif.netif_glue: eth_action_connected: 0x3ffb95c8, 0x3f4110a4, 2, 0x3ffb9830, 0x3ffb9550
D (4943) esp_netif_handlers: esp_netif action connected with netif0x3ffb82a8 from event_id=2
D (4951) esp_netif_lwip: check: remote, if=0x3ffb82a8 fn=0x40124a94

D (4958) esp_netif_lwip: esp_netif_up_api esp_netif:0x3ffb82a8
D (4963) esp_netif_lwip: check: local, if=0x3ffb82a8 fn=0x4012568c

D (4970) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffb82a8
D (4976) esp_netif_lwip: call api in lwip: ret=0x0, give sem
D (4982) esp_netif_lwip: check: remote, if=0x3ffb82a8 fn=0x401242c0

D (4989) esp_netif_lwip: esp_netif_dhcpc_start_api esp_netif:0x3ffb82a8
D (4995) esp_netif_lwip: esp_netif_start_ip_lost_timer esp_netif:0x3ffb82a8
D (5002) esp_netif_lwip: if0x3ffb82a8 start ip lost tmr: no need start because netif=0x3ffb832c interval=120 ip=0
D (5012) esp_netif_lwip: starting dhcp client
D (5019) esp_netif_lwip: call api in lwip: ret=0x0, give sem
D (5023) event: running post ETH_EVENT:2 with handler 0x400ecdbc and context 0x3ffb96e0 on loop 0x3ffbc400
I (5032) eth_example: Ethernet Link Up
I (5037) eth_example: Ethernet HW Addr 02:00:00:12:34:56
D (5052) w5500.mac: receive len=60
D (5146) w5500.mac: receive len=60
D (7092) w5500.mac: receive len=365
D (7212) w5500.mac: receive len=365
D (8021) esp_netif_lwip: esp_netif_internal_dhcpc_cb lwip-netif:0x3ffb832c
D (8022) esp_netif_lwip: if0x3ffb82a8 ip changed=1
D (8023) event: running post IP_EVENT:4 with handler 0x400dc820 and context 0x3ffb8254 on loop 0x3ffbc400
D (8033) event: running post IP_EVENT:4 with handler 0x4013e0f0 and context 0x3ffb96ac on loop 0x3ffbc400
D (8042) esp_eth.netif.netif_glue: eth_action_got_ip: 0x3ffb95c8, 0x3f40c9cc, 4, 0x3ffb9894, 0x3ffb82a8
D (8051) esp_netif_handlers: esp_netif action got_ip with netif0x3ffb82a8 from event_id=4
I (8059) esp_netif_handlers: eth0 ip: 192.168.1.157, mask: 255.255.255.0, gw: 192.168.1.1
D (8068) event: running post IP_EVENT:4 with handler 0x400ecd14 and context 0x3ffb9700 on loop 0x3ffbc400
I (8078) eth_example: Ethernet Got IP Address
I (8083) eth_example: ~~~~~~~~~~~
I (8086) eth_example: ETHIP:192.168.1.157
I (8091) eth_example: ETHMASK:255.255.255.0
I (8096) eth_example: ETHGW:192.168.1.1
I (8100) eth_example: ~~~~~~~~~~~

The driver install is working at components/at/src/at_eth_init.c but I think this function esp_at_eth_cmd_regist try to do something similar, but it is using the old physical layers models instead the SPI configured.

I tried already with some releases (3.2, 3.4 and 4.0) and master. In any of them works.

Can you give me some help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions