跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 怎么在嵌入式中实现一个 web 页面?

发表于
背景:
需要提供一个 Web 页面给到嵌入式开发板,就是像路由器一样输 IP 进入。
开发板的 Flash 大小为 16MB ,这个大小目前暂时不可能扩大,除去系统占用留下的空间 10MB 内。
运行的是 PetaLinux 系统,这个板子的性能是够的,就是 Flash 小。

需求:
1. 显示一些系统信息:比如版本号、MAC 地址....
2. 显示我的程序的一些数据:比如我程序的 MQTT 连接状态.....
3. 提供下载系统日志/内核日志的按钮
4. 提供一个输入框来配置我的程序的配置文件:比如 MQTT 服务器端口、地址......

提问:
因为小弟之前做过 OpenWrt 相关的程序,所以目前能想到的就是用 ubus+uhttpd+luci 。
加上 c 语言使用 ubus 库对于需求的第 2 点和第 4 点实现起来非常简单,然后需求的第 3 点直接用 cgi 来做就好了。
但是目前的系统不是 OpenWrt ,同时也想尝试其它不同的技术,所以想问一下大家有没有什么建议?

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.