daniel-p-carvalho opened a new pull request, #20971:
URL: https://github.com/apache/nuttx/pull/20971

   ## Summary
   
   Add the `bridge` configuration to the EV49N51A (Ethernet to Wi-Fi Bridge), 
the use the board was designed for: `wlan0` runs as a SoftAP and is joined to 
`eth0` at layer 2 by `br0`.
   
   * `configs/bridge`: `SYSTEM_WIFIBRIDGE` with the configuration kept in the 
program flash (`PIC32MZ_PROGMEM` + `MTD_PROGMEM`, registered as 
`/dev/mtdblock1`), so `wifibridge save/clear` work. No watchdog, no WPA3 (needs 
BA414E), no `PIC32MZ_PHY_10MBPS_ONLY`.
   * `src/etc/init.d/rcS`: runs `wifibridge start` at boot. The Makefile builds 
it into the ROMFS when `ETC_ROMFS` is set, as zcu111 and nanopi_m4 do. A board 
`.gitignore` for the generated `etctmp*`.
   * Documentation: `bridge` section and a limitation (below).
   
   Uses already merged work: `wifibridge` (apps#3876, #3893), the bridge, 
`PIC32MZ_PROGMEM` (#20788).
   
   ## Impact
   
   New configuration only; existing ones are unchanged. The default access 
point is `NuttX-BR` / `nuttxbridge` (documented, to be changed before 
deployment).
   
   Known limitation, also in the docs: the Ethernet cable must be connected at 
boot. Without a link `pic32mz_ifup()` fails after the auto-negotiation timeout, 
so `wifibridge start` gives up. Not addressed here; it needs a driver change.
   
   ## Testing
   
   Host: Linux x86_64, XC32 v6.00 and the PIC32MZ-W DFP. Board: EV49N51A, 
programmed with a PICkit 3. Host Ethernet in a netns playing the IED 
(10.0.0.1), a laptop Wi-Fi card as the station (10.0.0.10), so traffic between 
them can only go through `br0`.
   
   Boot (cable connected):
   ```
   wlan: starting AP NuttX-BR on channel 6
   wlan: AP started
   nsh> wifibridge status
   br0   present 10.0.0.2
   eth0  up
   wlan0 up ssid "NuttX-BR"
   ```
   * Station to bridge (10.0.0.2): 5/5. Station to the IED (10.0.0.1) through 
the bridge: 10/10 and 5/5, 0% loss, 3-13 ms.
   * `wifibridge stop` then `start`: the station leaves and rejoins, ping 5/5.
   * `wifibridge save -s TestBR -p testpass123 -c 1 -a 10.0.0.9`, reset: boots 
with `starting AP TestBR on channel 1`. After `wifibridge clear` and a reset: 
`NuttX-BR` on channel 6 again.
   * Without the cable: `ifup eth0` fails, as described above.
   
   Not tested: throughput (iperf), a switch between the board and the host, 
WPA3, the documentation build (`make html`).
   
   `./tools/checkpatch.sh -c -u -m -g` passes and `refresh.sh ev49n51a:bridge` 
leaves the defconfig unchanged.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to