Hi, We have the WE826-T2-16 Mb and installed Openwrt openwrt-21.02.3-ramips-mt7620-zbtlink_zbt-we826-16m-squashfs-sysupgrade.
Now we like to update this firmware, so we get a new firmware to do all explained below:
1. Make sure the UCI calls (see attachment) are default configuration in the new firmware
2. Get variables from a server explained in `Get variables` part
3. Make a script explained in the part `Discover DHCP`
4. Set Root password of router
GET VARIABLES
In the UCI calls we have some variables. Some are hardcoded. But a few we need to get with a simple post call like below, and store. If post call is not available we should retry a few times, and if still not available sent an other post call and only retry after restarting the modem.
Post first time:
```
curl --location -g --request POST '[login to view URL]' \
--header 'Content-Type: application/json' \
--data-raw '{
"mac":"Mac-of-router"
}'
```
Output (with values variables for UCI):
````
{
"COMPANY":"company-z",
"WIFIPASS":"yyyccccc"
}
```
Post if no is same call with body:
```
{
"mac":"Mac-of-router"
"message":"No results for Mac"
}
```
DISCOVER DHCP
We should create some kind of a script to watch new DHCP clients on the Lan and Wifi.
Then if a new device is connected, with hostname `lwip` we should give it an static IP in the order of:
[login to view URL], [login to view URL] etc.
So if I add 3 devices with that hostname, we will bind the MAC of them so they get IP like:
- [login to view URL]
- [login to view URL]
- [login to view URL]
- [login to view URL]
For wifi we should do the same. But then it should be in the range:
- [login to view URL]
- [login to view URL] etc
To do:
- Review, optimise and advise the UCI calls attached to configure the Router
- Install 4 G modem and configure as fallback ( I dont know how to do this in OpenWrt)
- Make some troubleshoot options (to advice/discuss), to revert in case of problems.
Deliverables:
- A step to step document + demo how to do all above. So its reproducible for us in the future.
- A working new firewall to install on a router to test
- A working demo on one of our routers
I have 19 years of experience in embedded and networking domain. I customised such Openwrt firmware for several other hardware. I would like to discuss with you
Greetings, I would like to work on your project. I have read the description and checked out the attachment. I however have some questions:
1. Does the old firmware have any of the tasks you listed here implemented?
2. Are the uci calls to get variables from server done on startup of the opener router?
I still have other questions, but these 2 are enough for now, for me to fully understand what needs to be done.
You can reach me via chat, look forward to hearing from you.
Regards.