Skip to content

Request to add more return values for 'esp_netif_receive'. (IDFGH-9398) #10770

Closed
@Zmmfly

Description

Is your feature request related to a problem?

In PPPoS application, if baudrate >= 921600, the data processing speed is less than the data arrival speed; sometimes, 'esp_netif_receive' will return ESP_OK, but actually the reception is not successful, which will cause the PPP link to be lost.

Describe the solution you'd like.

'esp_netif_receive' returns ESP_FAIL or other values for error handling when receiving fails, which will improve stability when hardware flow control pins are not connected and no software flow control.

Describe alternatives you've considered.

  1. I tried to increase the size of lwip pbuf, but because of the serial port fifo size and no idle interrupt, the amount of data notified each time is very small, and the pbuf can always be exhausted, so it is unstable.
  2. I tried to add a pre-filter before the data enters 'esp_netif_receive', and call 'esp_netif_receive' after receiving the complete PPP packet. Although there is an improvement, it is also unstable because I am not familiar with the structure of the PPP packet.
  3. Connect the flow control pin, this is a solution mentioned in an issue, and it works:
    pppos_example: Modem Disconnect from PPP Server (IDFGH-8640) #10085 (comment)

Additional context.

  1. esp-netif_lwip-ppp: pppos_input_tcpip failed with -1 (IDFGH-5466) #7205
  2. pppos_example: Modem Disconnect from PPP Server (IDFGH-8640) #10085

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions