20190521_jeffrey - silenceuncrio/diary GitHub Wiki

0920

M360 dual router mode 時 HTTPS 有問題

需要跟 borchen 借一下有 Public ip 的 SIM 卡

1010

不過去 borchen 那邊看到的現象卻不是這樣

出問題時是連 ping 都不通

1145

搞了半天是 ariel 已經跟 borchen 講過的 issue

dual router mode 之下

apn1 設定錯誤的話

每 45 秒會斷線一次

難怪會造成目前的現象

1310

回到 M300 - feature/lighttpd

再來是 - System > Ethernet

相關的 request 與 access level 為

  • icos._switch.config()
    • ATTVAL_SYSTEM_LEVEL1; cgi-bin/switch.cgi?act=config
  • icos._switch.total_ports()
    • ATTVAL_SYSTEM_LEVEL1; cgi-bin/switch.cgi?act=total_ports
  • icos._switch.status()
    • ATTVAL_SYSTEM_LEVEL1; cgi-bin/switch.cgi?act=status
  • icos._switch.apply
    • ATTVAL_SYSTEM_LEVEL2; cgi-bin/switch.cgi?act=apply
commit 93ea07592f6b51d72791ca297027c6e032b62bed
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 13:25:30 2019 +0800

    finish 'System > Ethernet':
    use jweb.access.filter in switch.cgi

 proscend/prosrc/webcgi/switch.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

1325

再來是 - System > Modbus

commit 3bc46ef55f7912b18435c0286a71c1b6c2ab5b9a
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 13:31:04 2019 +0800

    finish 'System > Modbus':
    - use jweb.access.filter in modbus.cgi

 proscend/prosrc/webcgi/modbus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

1330

再來是 - System > Client List

commit 74f570b2e002e88e098db41316b19a64c29fc07c
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 13:34:42 2019 +0800

    finish 'System > Client List':
        - use jweb.access.filter in dhcp_client_list.cgi

 proscend/prosrc/webcgi/dhcp_client_list.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

1350

System > LED

commit 85ebcf4527590c7ac6948d80b8d02f54e927464e
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 13:54:50 2019 +0800

    finish 'System > LED':
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _chg_led_config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _chg_led_apply);

 proscend/prosrc/webcgi/connmgr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

1405

WAN > Priority

commit e033d60f3d788e5a2e8e898ed77d8e634d051fec
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 14:07:13 2019 +0800

    finish 'WAN > Priority':
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply);

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

1435

WAN > Ethernet

參考 iweb 的

static void _register_http_endpoint(struct mg_connection *nc)
{
    ...
    // WAN / WAN Ethernet
    mg_register_http_endpoint(nc, "/cgi-bin/wanst.cgi?act=config",                  _handler_level_normal);
    mg_register_http_endpoint(nc, "/cgi-bin/pppoe.cgi?act=config",                  _handler_level_normal);
    mg_register_http_endpoint(nc, "/cgi-bin/dns.cgi?act=config&index=5",            _handler_level_normal);
    mg_register_http_endpoint(nc, "/cgi-bin/dns.cgi?act=config&index=6",            _handler_level_normal);
    mg_register_http_endpoint(nc, "/cgi-bin/connmgr.cgi?act=ping_health_config",    _handler_level_normal);
    mg_register_http_endpoint(nc, "/cgi-bin/connmgr.cgi?act=chg_wproto_config",     _handler_level_normal);
    mg_register_http_endpoint(nc, "/cgi-bin/wanst.cgi?act=apply",               _handler_level_admin);
    mg_register_http_endpoint(nc, "/cgi-bin/connmgr.cgi?act=ping_health_apply", _handler_level_admin);
    mg_register_http_endpoint(nc, "/cgi-bin/connmgr.cgi?act=chg_wproto_apply",  _handler_level_admin);
    mg_register_http_endpoint(nc, "/cgi-bin/dns.cgi?act=apply&index=5",         _handler_level_admin);
    mg_register_http_endpoint(nc, "/cgi-bin/dns.cgi?act=apply&index=6",         _handler_level_admin);
    mg_register_http_endpoint(nc, "/cgi-bin/ipv6lan.cgi?act=default",           _handler_level_admin);
    mg_register_http_endpoint(nc, "/cgi-bin/pppoe.cgi?act=apply",               _handler_level_admin);
    ...
}
commit c800f47d2e586af02c629ecef1ecac7f68e8e0ab
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 14:53:29 2019 +0800

    finish 'WAN > Ethernet'

    connmgr.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _ping_health_config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _ping_health_apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _chg_wproto_config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _chg_wproto_apply)

    dns.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _set)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help)

    ipv6lan.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _default)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help)

    pppoe.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _set)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help)

    wanst.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _set)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help)

 proscend/prosrc/webcgi/connmgr.c |   8 +-
 proscend/prosrc/webcgi/dns.c     |  10 +-
 proscend/prosrc/webcgi/ipv6lan.c |  10 +-
 proscend/prosrc/webcgi/pppoe.c   | 292 +++++++++++++++++++--------------------
 proscend/prosrc/webcgi/wanst.c   |  10 +-
 5 files changed, 165 insertions(+), 165 deletions(-)

1505

WAN > IPv6 DNS

這已經由 dns.cgi 解決了

1525

LTE > LTE Config

commit 238fb599ef33d01fad0138bc02995c0fe08595e8
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 15:27:59 2019 +0800

    finish 'LTE > LTE Config'

    lte.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _modem_config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _modem_apply);

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

1540

LTE > GPS

commit 42d1e177e5533825b503d6d520a6bafc03ebc491
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 15:39:49 2019 +0800

    finish 'LTE > GPS'

    lte.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _gps_config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _gps_apply);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _read_gps);

 proscend/prosrc/webcgi/lte.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

1645

LTE > Dual SIM

commit 57037925709c361e4aecb19f04c64f41eeb5a54d
Refs: [feature/lighttpd]
Author: jeffrey <[email protected]>
Date:   Tue May 21 16:54:06 2019 +0800

    finish 'LTE > Dual SIM'

    icos_msg.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _send);

    lte.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _sim_pin_config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _sim_pin_apply)

    netmon.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/icos_msg.c |  2 +-
 proscend/prosrc/webcgi/lte.c      | 10 +++++-----
 proscend/prosrc/webcgi/netmon.c   |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

1730

LTE > Usage Display 需要加工一下

cgi 無法做到前身 iweb 的作法

    mg_register_http_endpoint(nc, "/app/feature/usageDisplay.html", _handler_level_normal);

我需要修改