Modify OpenWirt Firmware and create new one
Budget: €250 – €750 EUR
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 'https://www.mydomein.com/xxxx?key=xxxxx' \
--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:
192.168.123.101, 192.168.123.102 etc.
So if I add 3 devices with that hostname, we will bind the MAC of them so they get IP like:
- 192.168.123.101
- 192.168.123.102
- 192.168.123.103
- 192.168.123.104
For wifi we should do the same. But then it should be in the range:
- 192.168.123.201
- 192.168.123.202 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
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 'https://www.mydomein.com/xxxx?key=xxxxx' \
--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:
192.168.123.101, 192.168.123.102 etc.
So if I add 3 devices with that hostname, we will bind the MAC of them so they get IP like:
- 192.168.123.101
- 192.168.123.102
- 192.168.123.103
- 192.168.123.104
For wifi we should do the same. But then it should be in the range:
- 192.168.123.201
- 192.168.123.202 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