20190723_jeffrey - silenceuncrio/diary GitHub Wiki

0835

繼續 M330[develop] - WiFi STA

1130

M330[develop] - at 'WAN > WiFi STA': add Scan Table

commit 49cb25a3d175005a473495a1d5430dd8f592469e
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Tue Jul 23 11:29:31 2019 +0800

    at 'WAN > WiFi STA': add Scan Table
    - change STA Mode from Disable to Enable and press apply
    - the page will get the status until vm.status.scan_count != 0 per 2 seconds
    - but a lot of 500 error, around 10 ~ 15 times
    - then we get 200 ok until vm.status.scan_count != 0

 proscend/prosrc/webcgi/wifi_sta.c                | 32 +++++++--
 proscend/prosrc/www/app/feature/wifi_sta.html    | 56 +++++++++++++++-
 proscend/prosrc/www/app/feature/wifi_sta.js      | 82 +++++++++++++++++++++++-
 proscend/prosrc/www/app/locale-en.json           | 16 ++++-
 proscend/prosrc/www/app/locale-fr.json           | 16 ++++-
 proscend/prosrc/www/app/locale-zh-tw.json        | 16 ++++-
 proscend/prosrc/www/app/services/icos.service.js |  7 +-
 7 files changed, 206 insertions(+), 19 deletions(-)

1135

ariel 表示 M330[release/v0.05] CTCU 版本 web 不能 login

先 pull 最新的 M330[release/v0.05]:

  • Vendor/Products = CTCU/1_CTCU_WIFI

透過 uboot upgrade firmware - run ldf


發現當 login 時沒有敲密碼的話 /api/login 會回 400 - pass needed

修正如下

diff --git a/proscend/prosrc/webcgi/jweb.c b/proscend/prosrc/webcgi/jweb.c
index 5920a65..4373e01 100644
--- a/proscend/prosrc/webcgi/jweb.c
+++ b/proscend/prosrc/webcgi/jweb.c
@@ -100,8 +100,14 @@ static void api_login(void)
     char *pass = cgiGetValue(cgi, "pass");
     if (!pass)
     {
+        #if 0 // some profile with user/pass = admin/<empty>
         http_status(400);
         json_fail("pass needed");
+        #else
+        char empty_pass[4];
+        memset(empty_pass,0,strlen(empty_pass));
+        pass = empty_pass;
+        #endif
     }

     if (ICOS_SUCCESS == ICOS_CheckPrivilege(user, pass, &level))

M330[release/v0.05] - correct the api/login handler because some profile with user/pass = admin/

commit 2c10e0f14004fbf908b79b0d379b41d073806871
Refs: [release/v0.05], {origin/release/v0.05}
Author: jeffrey <[email protected]>
Date:   Tue Jul 23 11:57:31 2019 +0800

    correct the `api/login` handler because some profile with user/pass = admin/<empty>

 proscend/prosrc/webcgi/jweb.c | 6 ++++++
 1 file changed, 6 insertions(+)

記住 M300 和 M360 也要套用這個修正

不然 CTCU 就不能從 web ui 做 login 了

另外就是 M330[release/v0.05] 有幾個 CGI 還沒套 jweb.access.filter()

就是沒 login 也能 apply 的意思

1310

M330[release/v0.05] - apply access filter to 'System > COM Ports'

commit 1771bba7066b5dd33a9f4175e5fd4c93e3c1fc71
Refs: [release/v0.05], {origin/release/v0.05}
Author: jeffrey <[email protected]>
Date:   Tue Jul 23 13:07:29 2019 +0800

    apply access filter to 'System > COM Ports':
    - com.cgi
      - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config);
      - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply);
      - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help);

 proscend/prosrc/webcgi/com.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

M330[release/v0.05] - apply access filter to 'Service > QoS'

commit effa689529fe243937131ae3f6714e9975a56d4d
Refs: [release/v0.05], {origin/release/v0.05}
Author: jeffrey <[email protected]>
Date:   Tue Jul 23 13:13:04 2019 +0800

    apply access filter to 'Service > QoS'
    - qos.cgi
      - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config);
      - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply);
      - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _status);
      - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help);

 proscend/prosrc/webcgi/qos.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

1315

回到 M330[develop] - FOTA 有一些 web ui 的變更

  • Vendor/Products = GENERIC/1_GENERIC_WIFI
  • PROSCEND Software Configuration 部分要做額外動作
    • include WIFI Support(STA mode)
    • include FOTAD (Firmware Over the Air)

build image

1325

繼續前進之前記住 M300 和 M360 也要修正

當 login 時沒有敲密碼的話 /api/login 會回 400 - pass needed


M300

diff --git a/proscend/prosrc/webcgi/jweb.c b/proscend/prosrc/webcgi/jweb.c
index e485a17..c00b49d 100644
--- a/proscend/prosrc/webcgi/jweb.c
+++ b/proscend/prosrc/webcgi/jweb.c
@@ -138,8 +138,14 @@ static void api_login(void)
     char *pass = cgiGetValue(cgi, "pass");
     if (!pass)
     {
+#if 0 // some profile with user/pass = admin/<empty>
         http_status(400);
         json_fail("pass needed");
+#else
+        char empty_pass[4];
+        memset(empty_pass,0,strlen(empty_pass));
+        pass = empty_pass;
+#endif
     }

     if (ICOS_SUCCESS == ICOS_CheckPrivilege(user, pass, &level))

M300[develop] - correct the api/login handler because some profile with user/pass = admin/

commit 5762c6bb48f971dcd921299301e3c7b469904c17
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Tue Jul 23 13:30:31 2019 +0800

    correct the `api/login` handler because some profile with user/pass = admin/<empty>

 proscend/prosrc/webcgi/jweb.c | 6 ++++++
 1 file changed, 6 insertions(+)

commit 21a43a545330d2e2c8250e779515d34b71872809
Author: ariel <[email protected]>

M360[develop] - correct the api/login handler because some profile with user/pass = admin/

commit 6db42542922f6842cd5992e8f98458521d6df277
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Tue Jul 23 13:34:16 2019 +0800

    correct the `api/login` handler because some profile with user/pass = admin/<empty>

 proscend/prosrc/webcgi/jweb.c | 6 ++++++
 1 file changed, 6 insertions(+)

1335

回到 M330[develop] - FOTA


M330[develop] - modify 'Management > FOTA' page according to the updated proposal

commit ef7d19845c8c6a2bd69ff1d73099f5fc4075684d
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Tue Jul 23 14:50:39 2019 +0800

    modify 'Management > FOTA' page according to the updated proposal

 proscend/prosrc/webcgi/fota.c                    | 21 ++++++++++++++-
 proscend/prosrc/www/app/feature/fota.html        | 34 ++++++++++++++++++++----
 proscend/prosrc/www/app/feature/fota.js          | 22 ++++++++++++++-
 proscend/prosrc/www/app/locale-en.json           | 12 ++++++++-
 proscend/prosrc/www/app/locale-fr.json           | 12 ++++++++-
 proscend/prosrc/www/app/locale-zh-tw.json        | 12 ++++++++-
 proscend/prosrc/www/app/services/icos.service.js |  3 +++
 7 files changed, 106 insertions(+), 10 deletions(-)

1520

review 一下自己的 schedule

  • M300[feature/hinet_evaluate]
    • P1 - 2 GRE tunnel with key
      • start 07/29
      • End 08/20
    • P3 - Layer 2 Encapsulation over GRE (L2oGRE)
  • M330[develop]
    • P2 - Web UI: FOTA
    • P2 - Web UI: WAN WiFi

注意到 M300[feature/hinet_evaluate] - 2 GRE tunnel with key

我需要在 08/02 前完成

因為其他人的 task 都 base on 我的 GRE tunnel

M330[develop] - Web UI: FOTA 已完成

M330[develop] - Web UI: WAN WiFi 一樣維持在 40 % 完程度

完成日期還沒壓


看來可以先來作 M300[feature/hinet_evaluate] - 2 GRE tunnel with key

1530

來做 - M300[feature/hinet_evaluate] - 2 GRE tunnel with key

build image

  • Products/Vendor = M300/18_HINET_EVALUATE

1600

FOTA 需要再幫忙

⚠️ **GitHub.com Fallback** ⚠️