On AmebaSmart the standard WHC_API_WIFI_GET_MAC_ADDR pull API times out: the KM4 NP firmware snapshot linked into this image does not register a handler for it, so wifi_get_mac_address() blocks ~12s per call and cannot be used to fill the netdev MAC. The NP does, however, PUSH its real efuse MAC to the host at wifi-on time via WHC_API_SET_NETIF_INFO, which lands in the host-side lwip_wlan_set_netif_info() glue. Previously that glue discarded the address and ameba_wifi_get_mac() synthesised a random locally-administered MAC, which then diverged from the MAC the NP actually associates with (the NP's 802.11 RX filter drops unicast frames addressed to the random MAC, so DHCP OFFERs never arrive). Cache the pushed efuse MAC in lwip_wlan_set_netif_info() and return it from ameba_wifi_get_mac(); the random MAC remains only as a fallback for the window before the NP has pushed. ameba_wifi_connect() then mirrors it to the NP with wifi_set_mac_address() so both sides agree. The per-IC guard uses CONFIG_AMEBASMART, not CONFIG_ARCH_CHIP_RTL8730E: these files are compiled by the board PREBUILD step with the vendor SDK autoconf, where NuttX Kconfig symbols are invisible. The other Ameba parts keep their working GET_MAC efuse path unchanged. Verified end to end: ifconfig shows the real Realtek OUI MAC (00:e0:4c:..), association and DHCP complete in a single round. Signed-off-by: dechao_gong <dechao_gong@realsil.com.cn> |
||
|---|---|---|
| .github | ||
| arch | ||
| audio | ||
| binfmt | ||
| boards | ||
| cmake | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| dummy | ||
| fs | ||
| graphics | ||
| include | ||
| libs | ||
| mm | ||
| net | ||
| openamp | ||
| pass1 | ||
| sched | ||
| syscall | ||
| tools | ||
| video | ||
| wireless | ||
| .asf.yaml | ||
| .codespell-ignore-lines | ||
| .codespellrc | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmessage | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| AUTHORS | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| INVIOLABLES.md | ||
| Kconfig | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
| ReleaseNotes | ||
Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).
For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.
Getting Started
First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.
Documentation
You can find the current NuttX documentation on the Documentation Page.
Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.
The old NuttX documentation is still available in the Apache wiki.
Supported Boards
NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.
Contributing
If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.
License
The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.