Skip to content

Conversation

@david-cermak
Copy link
Collaborator

depends on #511

both eppp server and client can choose to act as USB CDC ACM host or a device.

(may need a minor refactor, as we support more and more transports)

@david-cermak david-cermak self-assigned this Jun 6, 2024
\|/ +----------------+ +----------------+
| | | serial line | |
+---+ WiFi NAT PPPoS |======== UART / SPI =======| PPPoS client |
+---+ WiFi NAT PPPoS |=== UART / SPI / SDIO =====| PPPoS client |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could remove the “channels” from this image and phrase it as link channel or something like that.

Tested with WiFi-NAPT example, no IRAM optimizations
Tested with WiFi-NAPT example

### UART @ 3Mbauds
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link TCP UDP
UART @ 3Mbauds 2Mbits/s 2Mbits/s
SPI @ 16MHz 5Mbits/s 8Mbits/s
SDIO 9Mbits/s 11Mbits/s

ESP_ERROR_CHECK(ret);

init_network_interface(); // WiFi station if withing SoC capabilities (otherwise a placeholder)
// ESP_ERROR_CHECK(esp_netif_init());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean?

ESP_GOTO_ON_FALSE((s_essl_mutex = xSemaphoreCreateMutex()), ESP_ERR_NO_MEM, err, TAG, "failed to create semaphore");
return ret;

err:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we leaking s_card on failure?
Please also review other initialized data for cleanup, e.g. s_essl_mutex

* @param[in] event Device event type and data
* @param[in] user_ctx Argument we passed to the device open function
*/
static void handle_event(const cdc_acm_host_dev_event_data_t *event, void *user_ctx)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we allow users to add a custom event handler? Maybe add a parameter to init function and use this default function if not provided.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants