Border router with USB CDC-ECM

Hi there,

last week I ported the Adafruit Feather nRF52840 as the first board to use `stdio_cdc_acm` for its stdio (so stdio over USB natively). However, I'm facing some problems for our applications that use ethos, as it is only supporting `stdio_uart`. I would like to avoid to blacklist the board for all those applications, as it would be counter-productive to the work going on in [1]. It also doesn't make sense to port `ethos` for `stdio_cdc_acm`, as we have `usbus_cdc_ecm` (which presents the RIOT device to the host operating system as an Ethernet device over which the host can communicate with RIOT). So the ideal situation would be to use that instead of `ethos`. I thought that would be easy, as for e.g. tests/gnrc_rpl_srh I could just adapt the `tests/gnrc_rpl_srh/Makefile.board.dep` as follows

# Put board specific dependencies here
ifeq (native,$(BOARD))
  USEMODULE += netdev_tap
  ifneq (,$(filter stdio_cdc_acm,$(USEMODULE)))
    USEMODULE += usbus_cdc_ecm
    USEMODULE += stdio_ethos

and compile-time-wise this works.

However, when trying to connect to the terminal the `ethos` tool is of course still selected [2] and I'm not sure how we would deal with this. I *could* just add the board to the check there, but that wouldn't scale for long, as I expect there to be more boards of that kind in the future. Moving this block to `Makefile.board.dep` helps, but I'm not sure it was intended that way.

How would you guys solve this?

Best regards, Martine

[1] [2]

Hi Martine,

Maybe [1] could help: I had to fix similar things for it to pass the CI.




I accidentally unicasted to Alex in my reply, so to summarize our discussion:

- Alex's PR focuses more on improving `make test` using `stdio_cdc_acm`, so it does not really help with my problem (Alex misunderstood my question to be about `usbus_cdc_acm` not `usbus_cdc_ecm`) - Coming to the conclusion, that our tooling around selecting the Ethernet device to communicate with the host is not yet very mature and the fact that there are still issues with the character stability [2] with and reset behavior of `stdio_cdc_acm` [Alex' 1] I decided to go for `stdio_rtt` for the `feather-nrf52840` for now, so it isn't blocked by all those issues, as it is flashed using the Segger J-Link anyway.

Best regards, Martine

[2] [3]