20190604_jeffrey - silenceuncrio/diary GitHub Wiki

0915

明天要 release M330

今天看一下 來不來的及 解一些 issue

  • 0000542: HTTPS key file
  • 0000546: there should be no "Hardware Version" in Identification

1010

解決 0000546: there should be no "Hardware Version" in Identification

commit 6a7de2e1eb5ae3c338e862f9901132771d7592ef
Refs: [release/v0.03], {origin/release/v0.03}
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 09:37:10 2019 +0800

    at 'Management > Identification' page:
    - remove 'Hardware Version'
    - remove 'Firmware Version'
      - the ported source base is use 'szSwMobileRouterVersion' to indicate the
    - use 'szSwMobileRouterVersion' to indicate the Software Version
      - the ported source base is use 'szKernelVersion' to indicate the 'Softwar

 proscend/prosrc/www/app/feature/identification.html | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

1040

0000542: HTTPS key file 這個 issue 是從 M360 來的

M360 當初把 key 產生在 nand flash 都會失敗

改到 ram 去就好了

但缺點就是每次開機都需要重建一次 key

導致 HTTPS 的服務每次開機都要等 key 建立完成才能開始提供服務

M330 修改如下

diff --git a/proscend/prosrc/icos/icoslib/web/webcfg.c b/proscend/prosrc/icos/icoslib/web/webcfg.c
index 79e6052..0297f62 100644
--- a/proscend/prosrc/icos/icoslib/web/webcfg.c
+++ b/proscend/prosrc/icos/icoslib/web/webcfg.c
@@ -29,8 +29,8 @@

 #define  WEB_DAEMON_KEYGEN_FILE "/usr/bin/openssl"

-#define  WEB_DAEMON_KEY_FILE    WEB_TMP_DIR"/iweb_key.pem"
-#define  WEB_DAEMON_CERT_FILE          WEB_TMP_DIR"/iweb_cert.pem"
+#define  WEB_DAEMON_KEY_FILE    WEB_ETC_DIR"/iweb_key.pem"
+#define  WEB_DAEMON_CERT_FILE          WEB_ETC_DIR"/iweb_cert.pem"



diff --git a/proscend/prosrc/icos/iweb/iweb.c b/proscend/prosrc/icos/iweb/iweb.c
index ca25085..facc8c4 100644
--- a/proscend/prosrc/icos/iweb/iweb.c
+++ b/proscend/prosrc/icos/iweb/iweb.c
@@ -14,8 +14,8 @@

 static const char *s_http_port = "8000";

-static const char *s_ssl_cert = "/tmp/icos/web/iweb_cert.pem";
-static const char *s_ssl_key  = "/tmp/icos/web/iweb_key.pem";
+static const char *s_ssl_cert = "/etc/icos/web/iweb_cert.pem";
+static const char *s_ssl_key  = "/etc/icos/web/iweb_key.pem";

 static struct mg_serve_http_opts s_http_server_opts;

diff --git a/proscend/prosrc/icos/script/web_x509.sh b/proscend/prosrc/icos/script/web_x509.sh
index 7173c05..f3f101e 100755
--- a/proscend/prosrc/icos/script/web_x509.sh
+++ b/proscend/prosrc/icos/script/web_x509.sh
@@ -1,3 +1,6 @@
 #!/bin/bash

 openssl req -x509 -newkey rsa:2048 -keyout /tmp/icos/web/iweb_key.pem -out /tmp/icos/web/iweb_cert.pem -days 3650 -nodes -subj '/CN=localhost'
+mv /tmp/icos/web/iweb_key.pem /etc/icos/web/iweb_key.pem
+mv /tmp/icos/web/iweb_cert.pem /etc/icos/web/iweb_cert.pem
+sync

1115

解決 0000542: HTTPS key file

commit e9d428ca5988b8bbd03fbd491ed590d6cc36d388
Refs: [release/v0.03], {origin/release/v0.03}
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 11:15:14 2019 +0800

    When we generate a self signed certificate for HTTPS, write the files into RAM and MV them to the NAND FLASH

 proscend/prosrc/icos/icoslib/web/webcfg.c | 4 ++--
 proscend/prosrc/icos/iweb/iweb.c          | 4 ++--
 proscend/prosrc/icos/script/web_x509.sh   | 3 +++
 3 files changed, 7 insertions(+), 4 deletions(-)

一樣的方法在 M360 上試試看

1300

M360 測試 PASS

commit bce4d58ccd92e8be0a17977be31d6efbd98a77ba
Refs: [hotfix/v1.02], {origin/hotfix/v1.02}
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 13:03:17 2019 +0800

    When we generate a self signed certificate for HTTPS, write the files into RAM and MV them to the NAND FLASH

 proscend/prosrc/icos/icoslib/web/webcfg.c | 4 ++--
 proscend/prosrc/icos/iweb/iweb.c          | 4 ++--
 proscend/prosrc/icos/script/web_x509.sh   | 4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)

另外就是把 schedule reboot 加到 M360 上

M330 有現成的 commit 可以參考

1405

commit 2efd154a883d17bc8d0f5382605b06ef07b0aacc
Refs: [hotfix/v1.02], {origin/hotfix/v1.02}
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 14:02:31 2019 +0800

    add 'Management > Schedule Reboot'

 .../icos/schedule_reboot/schedule_reboot.json      |  13 +
 proscend/mconfig/configs/M360P/1_APN2/defconfig    |   1 +
 proscend/mconfig/configs/M360P/2_PI/defconfig      |   1 +
 proscend/mconfig/configs/M360P/3_WIFI/defconfig    |   1 +
 proscend/prosrc/icos/icoslib/Makefile              |   4 +
 proscend/prosrc/icos/icoslib/entry.c               |   8 +-
 .../prosrc/icos/icoslib/schedule_reboot/Makefile   |  14 +
 .../icos/icoslib/schedule_reboot/schedule_reboot.c | 565 +++++++++++++++++++++
 proscend/prosrc/icos/include/icos_common.h         |   1 +
 proscend/prosrc/icos/include/icos_module.h         |   1 +
 .../prosrc/icos/include/module_schedule_reboot.h   |  44 ++
 proscend/prosrc/icos/script/schedule_reboot.sh     |   4 +
 proscend/prosrc/webcgi/Makefile                    |   4 +
 proscend/prosrc/webcgi/schedule_reboot.c           | 105 ++++
 .../prosrc/www/app/feature/schedule_reboot.html    | 135 +++++
 proscend/prosrc/www/app/feature/schedule_reboot.js |  62 +++
 proscend/prosrc/www/app/locale-en.json             |  23 +
 proscend/prosrc/www/app/locale-fr.json             |  23 +
 proscend/prosrc/www/app/locale-zh-tw.json          |  23 +
 proscend/prosrc/www/app/services/icos.service.js   |  11 +
 proscend/prosrc/www/src/index.html.src             |   1 +
 proscend/prosrc/www/src/manual.html.src            |   3 +
 .../src/manual/management_schedule_reboot.h.html   |  18 +
 proscend/prosrc/www/src/manual/sidebar.h.html      |   3 +
 proscend/prosrc/www/src/menu.html.src              |   3 +
 25 files changed, 1070 insertions(+), 1 deletion(-)

M360 順利加上 schedule reboot

所有的 profile 都把該功能打開

簡單測試了 per day

1410

回頭再 review 一下 M330 UI

關於 APN2 拿掉的部分

盤一下還有哪邊漏掉

  • WAN > IPv6 DNS
  • LTE > DNS
  • Service > QoS
  • Diagnosis > Ping
  • Diagnosis > Traceroute

掃台吧

1440

WAN > IPv6 DNS

commit 1b835b0415ba8085fa9dbc12f059499dc3e5e3e9
Refs: [release/v0.03], {origin/release/v0.03}
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 14:41:39 2019 +0800

    LTE mode: Bridge Only, Router Only
    - Please check PROSRC_LTE_BRIDGE_ROUTER=y then display BRIDGE+ROUTER
    - Please check PROSRC_LTE_ROUTER_ROUTER =y then display ROUTER+ROUTER

    By default, no profile enable these two flags so far

    If both modes are not defined, at 'WAN > IPv6 DNS':
    - remove 'APN2 DNS Server Configuration'

 proscend/prosrc/www/Makefile                       |   1 +
 proscend/prosrc/www/app/feature/dnsDhcp6c.html     | 155 --------------------
 .../prosrc/www/src/app/feature/dnsDhcp6c.html.src  | 157 +++++++++++++++++++++
 3 files changed, 158 insertions(+), 155 deletions(-)

WAN > IPv6 DNS

commit bcebca3e9e91234a2604c553d80c5353f821f331
Refs: [release/v0.03]
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 14:47:21 2019 +0800

    LTE mode: Bridge Only, Router Only
    - Please check PROSRC_LTE_BRIDGE_ROUTER=y then display BRIDGE+ROUTER
    - Please check PROSRC_LTE_ROUTER_ROUTER =y then display ROUTER+ROUTER

    By default, no profile enable these two flags so far

    If both modes are not defined, at 'LTE > DNS':
    - remove 'APN2 DNS Server Configuration'

 proscend/prosrc/www/Makefile                       |   1 +
 proscend/prosrc/www/app/feature/dnsLte.html        | 149 --------------------
 .../prosrc/www/src/app/feature/dnsLte.html.src     | 151 +++++++++++++++++++++
 3 files changed, 152 insertions(+), 149 deletions(-)

1500

Service > QoS

commit a7d4ac5eaa440bebf4df734569ca8e92e0ba560f
Refs: [release/v0.03], {origin/release/v0.03}
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 14:57:38 2019 +0800

    LTE mode: Bridge Only, Router Only
    - Please check PROSRC_LTE_BRIDGE_ROUTER=y then display BRIDGE+ROUTER
    - Please check PROSRC_LTE_ROUTER_ROUTER =y then display ROUTER+ROUTER

    By default, no profile enable these two flags so far

    If both modes are not defined, at 'Service > QoS':
    - remove 'APN2' from 'ISP Bandwidth' nav
    - remove 'APN2' checkbox from Interface field at edit mode
    - remove 'APN2' radio from Interface field at 'Refresher Setting'

 proscend/prosrc/www/Makefile                     |   1 +
 proscend/prosrc/www/app/feature/qos.html         | 494 ----------------------
 proscend/prosrc/www/src/app/feature/qos.html.src | 500 +++++++++++++++++++++++
 3 files changed, 501 insertions(+), 494 deletions(-)

1510

Diagnosis > Ping

commit e738a553bf84257edc8c485271087be63046feab
Refs: [release/v0.03], {origin/release/v0.03}
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 15:10:02 2019 +0800

    LTE mode: Bridge Only, Router Only
    - Please check PROSRC_LTE_BRIDGE_ROUTER=y then display BRIDGE+ROUTER
    - Please check PROSRC_LTE_ROUTER_ROUTER =y then display ROUTER+ROUTER

    By default, no profile enable these two flags so far

    If both modes are not defined, at 'Diagnosis > Ping':
    - remove 'Use Interface As Source' field
    - remove 'Use Interface' field
    - update online manual

 proscend/prosrc/www/Makefile                       |  1 +
 proscend/prosrc/www/app/feature/ping.html          | 70 ---------------------
 proscend/prosrc/www/src/app/feature/ping.html.src  | 72 ++++++++++++++++++++++
 .../prosrc/www/src/manual/diagnosis_ping.h.html    |  4 +-
 4 files changed, 76 insertions(+), 71 deletions(-)

Diagnosis > Traceroute

commit aba2d106459a113f37b060f89c524e13923ffc33
Refs: [release/v0.03], {origin/release/v0.03}
Author: jeffrey <[email protected]>
Date:   Tue Jun 4 15:13:33 2019 +0800

    LTE mode: Bridge Only, Router Only
    - Please check PROSRC_LTE_BRIDGE_ROUTER=y then display BRIDGE+ROUTER
    - Please check PROSRC_LTE_ROUTER_ROUTER =y then display ROUTER+ROUTER

    By default, no profile enable these two flags so far

    If both modes are not defined, at 'Diagnosis > Traceroute':
    - remove 'Use Interface As Source' field
    - remove 'Use Interface' field
    - update online manual

 proscend/prosrc/www/Makefile                       |  1 +
 proscend/prosrc/www/app/feature/traceroute.html    | 70 ---------------------
 .../prosrc/www/src/app/feature/traceroute.html.src | 72 ++++++++++++++++++++++
 .../www/src/manual/diagnosis_traceroute.h.html     |  4 +-
 4 files changed, 76 insertions(+), 71 deletions(-)

1650

幫忙確認 M300 上 LTE First 往下傳的值

經確認後是 ariel 再兩個月前從 M330 sync code 時把 enum 定義的值改了順序