20200305_jeffrey - silenceuncrio/diary GitHub Wiki
0910
M350-C(SDK10.0.0) - misc - [0%] LTE > APN Config 可以 toggle password visibility
切換至 VMware jubuntu
m350-c(develop) - give the ability to toggle password visibility at 'LTE > APN Config' page
commit 33c2cc25cdd071a26b57cca8478bfc104b681eaa
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 10:15:36 2020 +0800
give the ability to toggle password visibility at 'LTE > APN Config' page
proscend/prosrc/www/app/feature/apn_config.html | 134 +++++++++++++++++++-----
proscend/prosrc/www/app/feature/apn_config.js | 90 ++++++++++++++++
2 files changed, 200 insertions(+), 24 deletions(-)
1030
M350-C(SDK10.0.0) - misc - [0%] Service > TR069 可以 toggle password visibility
m350-c(develop) - give the ability to toggle password visibility at 'Service > TR069' page
commit 10d25a91f839fb87ffbfb419d3813446dfcaf514
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 10:41:37 2020 +0800
give the ability to toggle password visibility at 'Service > TR069' page
proscend/prosrc/www/app/feature/cwmp.html | 46 +++++++++++++++++++++----------
proscend/prosrc/www/app/feature/cwmp.js | 38 +++++++++++++++++++++++++
2 files changed, 70 insertions(+), 14 deletions(-)
1045
M350-C(SDK10.0.0) - misc - [0%] Service > SMTP 可以 toggle password visibility
m350-c(develop) - give the ability to toggle password visibility at 'Service > SMTP' page
commit 64ee9660ccbad42e2eda254469728e97431baf56
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 10:48:16 2020 +0800
give the ability to toggle password visibility at 'Service > SMTP' page
proscend/prosrc/www/app/feature/smtp.html | 22 ++++++++++++++++------
proscend/prosrc/www/app/feature/smtp.js | 20 ++++++++++++++++++++
2 files changed, 36 insertions(+), 6 deletions(-)
1050
M350-C(SDK10.0.0) - task - [0%] P1 - function test - Management > Schedule Reboot
per day pass
就是說 crond 運作正常
m350-c(develop) - use IsBootInitProcess() to check and do things after the boot init done
commit f5ba73629f22f27435e2334db462aae58f5abb60
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 11:16:53 2020 +0800
use IsBootInitProcess() to check and do things after the boot init done
- make sure the configuration file exist
.../prosrc/icos/icoslib/schedule_reboot/schedule_reboot.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
理論上這可以解決以下的 bug
- M330 - bug - [0%] (sometimes after factory default) error reading file schedule_reboot.json at boot int
1125
M350-C(SDK6.11) - task - [0%] 是否可從 v0.01(SDK6.11) 經由 firmware upgrade 到 v0.02(SDK10.0.0)
幫忙試一下 M350-C 是不是可以從 v0.01(SDK6.11) 經由 firmware upgrade 到 後續的 v0.02(SDK10.0.0)
1150
幫公司繳 apple 年費
透過 gmail
Apple Developer
- Apple ID - [email protected]
- Password - proscend2015Osmart
一登入發現有問題需要解決
Your Apple ID needs to be updated.
看來需要老婆的協助了 - 我需要一隻 iphone 手機ㄚ
1310
M350-C(SDK6.11) - task - [0%] 是否可從 v0.01(SDK6.11) 經由 firmware upgrade 到 v0.02(SDK10.0.0)
使用 M350-C(SDK6.11) 的 uboot upgrade 方式 upgrade 完整的 SDK6.11 image
U-Boot 2012.07 [Chaos Calmer 15.05.1,76cc6b4+r49254] (Feb 14 2020 - 11:10:28)
smem ram ptable found: ver: 1 len: 3
DRAM: 256 MiB
machid : 0x8010001
NAND: ID = 9590daef
Vendor = ef
Device = da
ONFI device found
SF: Detected W25Q256 with page size 64 KiB, total 32 MiB
ipq_spi: page_size: 0x100, sector_size: 0x10000, size: 0x2000000
288 MiB
MMC: qca_mmc: 0
*** Warning - bad CRC, using default environment
...
其實這可以說我成功的從 M350-C(SDK10.0.0) 透過 uboot upgrade 的方式換到 M350-C(SDK6.11)
試著從 M350-C(SDK6.11) 透過 web ui upgrade 到 M350-C(SDK10.0.0)
ui 顯示 upgrade 成功了
log 資訊很少
root@ICR-401:/home/admin# cat /tmp/FirmwareUpgrade.log
firmware upgrade shell script start...
Upgrading the firmware ...
Write the firmware image to MTD device ...
Write the firmware image to MTD device succeeded
Upgrading the firmware succeeded
firmware upgrade shell script succeeded
finished
finished
finished
root@ICR-401:/home/admin#
透過 web ui 來將 M350-C 重開機
U-Boot 2012.07 [Chaos Calmer 15.05.1,76cc6b4+r49254] (Feb 14 2020 - 11:10:28)
smem ram ptable found: ver: 1 len: 3
DRAM: 256 MiB
machid : 0x8010001
NAND: ID = 9590daef
Vendor = ef
Device = da
ONFI device found
SF: Detected W25Q256 with page size 64 KiB, total 32 MiB
ipq_spi: page_size: 0x100, sector_size: 0x10000, size: 0x2000000
288 MiB
MMC: qca_mmc: 0
...
uboot 保持不動
看一下 M350-C(SDK10.0.0) 的 linux 資訊
root@ICR-401:/home/admin# uname -a
Linux ICR-401 4.4.60 #3 SMP PREEMPT Tue Mar 3 10:36:59 UTC 2020 armv7l GNU/Linux
root@ICR-401:/home/admin#
利用 fw_setenv no_good .xx 和 reboot 從另一個 partition - M350-C(SDK6.11) 開機
看一下 M350-C(SDK6.11) 的 linux 資訊
root@ICR-401:/home/admin# uname -a
Linux ICR-401 4.4.60 #3 SMP PREEMPT Thu Mar 5 03:59:06 UTC 2020 armv7l GNU/Linux
root@ICR-401:/home/admin#
看來 Linux kernel 版本都一樣 - 4.4.60
從 M350-C(SDK6.11) 透過 web ui upgrade 到 M350-C(SDK10.0.0) - PASS
換個方向呢?
從 M350-C(SDK10.0.0) 透過 web ui upgrade 到 M350-C(SDK6.11) - PASS
看來 M350-C 後續的開發就可以專心在 M350-C(SDK10.0.0) 上了
1400
M350-C(SDK10.0.0) - misc - [0%] CGI 是否能被 MQTT 使用
這是未來網管 ISMS 需要的突破點
以下的 test.cgi
#include "cgi.h"
int main(void)
{
s_cgi *cgi = cgiInit();
cgiHeader();
printf("test");
cgiFree (cgi);
exit(0);
}
除了能在 browser 回應之外
也能在 console 下互動
root@ICR-401:/tmp/www/cgi-bin# ./test.cgi
(offline mode: enter name=value pairs on standard input)
不需要任何什麼 name=value 的話
輸入 Ctrl-D
便可以看到該 cgi 的輸出
root@ICR-401:/tmp/www/cgi-bin# ./test.cgi
(offline mode: enter name=value pairs on standard input)
Content-type: text/html
Vary: *
Cache-Control: no-cache
Expires: -9999
testroot@ICR-401:/tmp/www/cgi-bin#
其實 (offline mode: enter name=value pairs on standard input)
是從以下的程式輸出的
/* cgiReadVariables()
*
* Read from stdin if no string is provided via CGI. Variables that
* doesn't have a value associated with it doesn't get stored.
*/
s_cgi *cgiReadVariables (void)
{
int length;
char *line = NULL;
char *cp, *ip, *esp, *sptr;
s_cgi *res;
cp = getenv("CONTENT_TYPE");
...
if ((res = (s_cgi *)malloc (sizeof (s_cgi))) == NULL)
return NULL;
cp = getenv("REQUEST_METHOD");
...
if (cp && !strcmp(cp, "POST")) {
...
} else if (cp && !strcmp(cp, "GET")) {
esp = getenv("QUERY_STRING");
...
} else {
length = 0;
printf ("(offline mode: enter name=value pairs on standard input)\n");
memset (tmp, 0, sizeof(tmp));
while((cp = fgets (tmp, 100, stdin)) != NULL) {
...
}
if (!line)
return NULL;
if (line[strlen(line)-1] == '&')
line[strlen(line)-1] = '\0';
}
...
return res;
}
該程式是我們目前使用的 cgi libraey
MQTT 想重複利用 CGI 為的是什麼
為的是 CGI 輸出的 JSON 資料
但 JSON 資料其實都是由 icos getsetting 而來
因為 getsetting 得到的都是 C 的格式
目前的 CGI 大都只是負責扮演一個 C 與 JSON 互轉的腳色罷了
所以說 MQTT 最好還是直接呼叫 icos 來的乾脆
真要要想共用的話
C 與 JSON 互轉的部分到可以考慮寫成一組 library
CGI 與 MQTT 都可以來使用
1500
M330 - task - [0%] release/v1.01 at 2020-03-09 for RS485
切換到 VMware jjbox
profile 選擇 GENERIC/1_GENERIC_WIFI
m330(release/v1.01) - update the release note at version 1.01
commit f5713eadb9a244b9ea2984a36bd22e20df0862e5
Refs: [release/v1.01], {origin/release/v1.01}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 15:34:08 2020 +0800
update the release note at version 1.01
- [New] add 'MD5 Authentication' for BGP
M330-ReleaseNotes.txt | 1 +
M330-ReleaseNotes_ADVICE.txt | 2 +-
M330-ReleaseNotes_ALLNET.txt | 2 +-
M330-ReleaseNotes_CTCU.txt | 3 +--
M330-ReleaseNotes_HYTEC.txt | 3 +--
M330-ReleaseNotes_PI.txt | 2 +-
M330-ReleaseNotes_PI_Generic.txt | 2 +-
7 files changed, 7 insertions(+), 8 deletions(-)
m330(release/v1.01) - update the online manual - 'IP Routing > BGP'
commit cd5d1642f845e5ba6d6579def6e09adb9407b87f
Refs: [release/v1.01], {origin/release/v1.01}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 15:43:00 2020 +0800
update the online manual - 'IP Routing > BGP'
- MD5 Authentication
proscend/prosrc/www/src/manual/ip_routing_bgp.h.html | 8 ++++++++
1 file changed, 8 insertions(+)
從 m350-c sync 一下
commit b37e9c3f170812f1576875c34f9b15bc7a055379
Refs: [release/v1.01], {origin/release/v1.01}
Author: jeffrey <[email protected]>
Date: Wed Feb 26 14:49:45 2020 +0800
no more proc_msg_cb needed at web module
- or the web.log will be full of the message from lighttpd
proscend/prosrc/icos/icoslib/web/webcfg.c | 1 -
1 file changed, 1 deletion(-)
commit 91037cad5a8aa4aa7dbd30912ed67ca694e92714
Refs: [release/v1.01], {origin/release/v1.01}
Author: jeffrey <[email protected]>
Date: Tue Mar 3 11:23:18 2020 +0800
correct the description of online manual at 'LAN > IPv6'
proscend/prosrc/www/src/manual/lan_ipv6.h.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 9164595c0aedcddacef6c4ef06e9928917aba853
Author: jeffrey <[email protected]>
Date: Tue Mar 3 11:14:15 2020 +0800
fix some typo and correct some wording
proscend/prosrc/www/src/manual/diagnosis_tty2tcp.h.html | 6 +++---
proscend/prosrc/www/src/manual/lte_apn_config.h.html | 2 +-
proscend/prosrc/www/src/manual/management_identification.h.html | 2 +-
proscend/prosrc/www/src/manual/wan_health_check.h.html | 4 ++--
proscend/prosrc/www/src/manual/wan_priority.h.html | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
commit 00982282ab94b1145a44c13270ffc7a27d1403ec
Refs: [release/v1.01], {origin/release/v1.01}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 11:16:53 2020 +0800
use IsBootInitProcess() to check and do things after the boot init done
- make sure the configuration file exist
.../prosrc/icos/icoslib/schedule_reboot/schedule_reboot.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
1715
M350-C(SDK10.0.0) - misc - [10%] 跨 repository 間 code 的 sync - 培養功力
作中學
為了後續好 sync
各 repository 間的 code 最好保持一致性
以下的 sync 我最後只能用眼睛作 sync
commit 57aeb1fd953e8d33d21c020133bec5e1d0af7550
Refs: [release/v1.01], {origin/release/v1.01}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 17:03:06 2020 +0800
offer a checkbox to control whether auto show the setting wizard at 'Management > Administration' page
- default is auto show the setting wizard after login if the wizard has not been finished
proscend/prosrc/webcgi/wizard.c | 48 ++++++++++++++++++++--
proscend/prosrc/www/app/feature/administration.js | 21 +++++++++-
proscend/prosrc/www/app/locale-en.json | 2 +
proscend/prosrc/www/app/locale-fr.json | 2 +
proscend/prosrc/www/app/locale-zh-tw.json | 2 +
proscend/prosrc/www/app/services/icos.service.js | 6 +++
.../www/src/app/feature/administration.html.src | 9 ++++
proscend/prosrc/www/src/app/feature/login.js.src | 6 +--
8 files changed, 87 insertions(+), 9 deletions(-)
以下的 sync 就跟吃餅乾一樣
commit 85fd2c5664199b5b5d36ce7cee03531a5c3b2dee
Refs: [release/v1.01], {origin/release/v1.01}
Author: jeffrey <[email protected]>
Date: Tue Mar 3 16:17:32 2020 +0800
better the reboot experience via web ui
proscend/prosrc/www/app/app.controller.js | 13 +++++++++----
proscend/prosrc/www/app/feature/reboot.js | 4 ++--
2 files changed, 11 insertions(+), 6 deletions(-)
commit 3826e65d875b549ea147cdbcb29f842ee4a84521
Author: jeffrey <[email protected]>
Date: Tue Mar 3 15:29:41 2020 +0800
after reboot, use '/' not '/index.html' for $window.location.href
proscend/prosrc/www/app/feature/reboot.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
1730
為了剛剛的 sync 再 update 一下 release note
commit dde95e9b05a32054d9b5dc60d6e047874af0f335
Refs: [release/v1.01], {origin/release/v1.01}
Author: jeffrey <[email protected]>
Date: Thu Mar 5 17:30:31 2020 +0800
update the release note at version 1.01
- [New] offer a checkbox to control whether auto show the setting wizard after login
M330-ReleaseNotes.txt | 1 +
M330-ReleaseNotes_ADVICE.txt | 1 +
M330-ReleaseNotes_ALLNET.txt | 1 +
M330-ReleaseNotes_CTCU.txt | 1 +
M330-ReleaseNotes_HYTEC.txt | 1 +
M330-ReleaseNotes_PI.txt | 1 +
M330-ReleaseNotes_PI_Generic.txt | 1 +
7 files changed, 7 insertions(+)