Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: LInux Networking support via USB #11

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Fishwaldo
Copy link
Member

this setups networking between Linux running on D0, and this firmware running on M0. It also setups a RNDIS adapter on USB to communicate with a external host.

The firmware on M0 acts as a Network Bridge, forwarding packets between a rpmsg-net based adapter, the USB rndis adapter and the local firmware.

Currently hardcoded to use 192.168.5.x/24 network range. The IP address of your PC should be 192.168.5.1 and if you want networking, you need to enable NAT on your host.

This currently requires a few patches to bl_mcu_sdk LWIP component to fix bugs or workarounds

  • Ping Reply Packets are copied from Ping Request Packet, including the inbound interface index. This confuses the bridge code when sending the reply back out.
  • Bridge Code thinks all interfaces are "local" interface. (BR0 in the code) and wont forward ARP requests to the other interfaces
  • Bridge Code submits packets to the TCP/IP task from a interrupt handler using unsafe xQueueSend (instead of xQueueSendFromISR) when called from a interrupt context. Currently, both USB and rpmsg-net RX handling is in interupts

@Fishwaldo Fishwaldo added the enhancement New feature or request label Feb 16, 2023
@Fishwaldo Fishwaldo marked this pull request as draft February 16, 2023 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant