Code change are not reflected on luci status page

Hi guys,

I recently bought a mobile router powered by battery. I don't want to install the vendor's image due to some reason. Luckly they have opened the source and I can build my own image. In addition to Luci the vendor's image has a http page built in to show the HW information like signal strength and battery level etc. This part of function is closed source. I don't care about others but the battery level is esential. So I decided to make a change to luci status page to add the battery level(there's a node under /run/state that exposes the battery information). It looks like below.

Everything works as expected when I build and install the luci-mod-admin-full package separately. But later when I did a full build of the system image with the luci change the battery level doesn't show up. And if I do a force install for the luci-mod-admin-full.ipk from the bin/packages/aarch64_generic/luci/ folder then it works.

Below are the repos FYI.

This openwrt(actually based on legacy LEDE) repo is from vendor. I cloned it to my local storage and updated the luci feeds to below one where I made the battery level changes.

The change itself should be okay because it works when installed separately. It just looks like the change was built in but the binary was not installed to the system image. Does anyone have any idea what was wrong?

This is not OpenWrt. You will have to ask the vendor for questions surrounding there firmware.

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

1 Like

Firstly thanks for your reply.

  1. Sadly this device is not supported by official openwrt yet. I wish it will be because it's a really good and convinient device with LTE + wifi6 module integrated. It has meet all the needs for a router for travelling.
  2. The device manufacturer doesn't have very well support so I asked here and hope there can be some helpful thoughts(Obviously a product vendor would tell you how to use their device but not how to develop code for it).
  3. All the source codes are in above two repos.

I cannot argue that this is not an official openwrt because it indeed isn't. But obviously it was branched from legacy LEDE and shall work very similarly as official openwrt. At least as I can see the build steps are same. I'm not expecting some one just give me
the answer. But it'll very appraciated if there's any idea about what could be wrong or what I can look into.

this statement is based on .... ?

1 Like

This information is from one of the support guy in product forum

ok, since you trust random people on internet.

I guess you'll trust us too, when we say it isn't ?

1 Like

What have they changed from official OpenWrt? It is not our firmware.

1 Like

Honestly I don't know. I just located the piece of code and tried to add a new display item to the luci page. I haven't reading through their codes. All my changes are in below two commits. Not sure if there's problem with them.
d480ffc631fceb533914ed49e98f5c6ceefba516
5661854d3dcf9301af0d5da4527921b8a24129ab

The problem being that these commits target their repository. The answer relies solely on them. We don’t know what they’ve changed.

1 Like

Sounds like dirty build env, or something similar.
make clean might help, but I assume that you have already done that...

But we have no knowledge about their image compilation steps, so pretty hard to say, what goes wrong in image generation.

Yes I've tried full rebuild a few times. I used "git clean -xfd" to wipe out all generated files.

I've decided to give up on this. I can live with reinstalling the package after every image flashing. After all I won't do this like everyday.

And thanks very much for the comments.

Sounds wrong.
You need the OpenWrt build system "make clean".
(build_dir and staging_dir are excluded from git scope.)

Yes I did make clean before git clean. Also after these two steps I manually deleted the folders ignored by git to make sure nothing left. I even tried once to delete the repo and cloned a new one. But these made no difference.