Closed m-kiso closed 5 years ago
wpanctl getprop を見ると、 ChildTable が取れていないので、degu <-> gw 間の通信ができていないと思われますが、対処方法があれば、ご教示ください。
ChildTableが空のため、DeguがThreadネットワークにjoinしていない状態です。 まずはDegu側の挙動を確認したいため、お手数ですが下記の手順でログを取得していただけますでしょうか?
main.py
を_main.py
にリネーム
参考) https://open-degu.github.io/user_manual/40_update_user_script/なお、joinが成功した場合には下記が出力されます。
[00:00:00.019,287] <inf> net_l2_openthread: State changed! Flags: 0x000000e4 Current role: 2
[00:00:00.040,405] <inf> net_l2_openthread: State changed! Flags: 0x00000200 Current role: 2
返信ありがとうございます。 以下手順にて取得したログを記載します。
Flags: 0x000000e4
は表示されておりますが、0x00000200
は表示されません。
main.py
を_main.py
にリネームDeug
00.015,991] <inf> usb_msc: Sect Count 64
[00:00:00.016,021] <inf> usb_msc: Memory Size 32768
[00:00:00.016,448] <inf> net_config: Initializing network
[00:00:01.248,291] <err> fs: failed get file or dir stat (-2)
[00:00:01.248,291] <err> main: Failed to stat file
[00:00:05.010,162] <inf> net_l2_openthread: State changed! Flags: 0x00000040 Current role: 1
uart:~$
GW
Debian GNU/Linux 9 armadillo ttymxc2
armadillo login: root
Password:
Last login: Wed Oct 23 21:20:11 JST 2019 on ttymxc2
Linux armadillo 4.14-at13 #1 Fri Jul 19 14:36:43 JST 2019 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
[ 39.195902] awl13: WID_STATUS CODE=1 (OK)
[ 39.277782] awl13: WID_STATUS CODE=1 (OK)
[ 39.429801] awl13: WID_STATUS CODE=1 (OK)
[ 39.433990] awl13: WID_STATUS CODE=1 (CONNECTED)
[ 39.438628] awl13: connected!
root@armadillo:~# [ 44.148559] random: crng init done
[ 44.152008] random: 6 urandom warning(s) missed due to ratelimiting
GW(wpanctl getprop )
root@armadillo:~# wpanctl getprop | grep ChildTable
NCP:CCAThreshold: <empty> (16)
Thread:NetworkData: <empty> (16)
Thread:Parent: <empty> (15335444)
Thread:StableNetworkData: <empty> (16)
Thread:ChildTable = []
Thread:ChildTable:Addresses = []
root@armadillo:~#
取得いただいたログを確認したところ、GWのChildTableが示す通り DeguがThreadネットワークにjoinしていない状態となっています。
可能であれば下記の手順でDeguの再登録を行っていただき、 動作をご確認いただけますでしょうか。
ご返信ありがとうございます。
3回ほど、以下手順を実施しましたが、改善がない状態です。
wpanctl getprop
の全量を記載いたしますので、その他、問題切り分け方法あればご教示いただけますでしょうか。
DeguのThingをAWS IoT Coreから削除 Deguに記録されているThread接続情報を消去 https://open-degu.github.io/technical_specifications/flash_memory_map/#region_usb_mass_storage 下記のマニュアルの「DeguをAWS IoT Coreに登録する」から再度実行 ※ DeguをAWSに登録し、Deguの電源を入れる際にDeguのログの取得をお願いいたします https://open-degu.github.io/user_manual/30_setup/
Degu
967] <inf> usb_msc: Sect Count 64
[00:00:00.016,967] <inf> usb_msc: Memory Size 32768
[00:00:00.017,395] <inf> net_config: Initializing network
[00:00:01.248,107] <err> fs: failed get file or dir stat (-2)
[00:00:01.248,107] <err> main: Failed to stat file
[00:00:05.030,456] <inf> net_l2_openthread: State changed! Flags: 0x00000040 Current role: 1
uart:~$
Degu-GW
root@armadillo:~# wpanctl getprop
Commissioner:ProvisioningUrl = ""
Commissioner:SessionId = 0x4945
Commissioner:State = "active"
Config:NCP:DriverName = "spinel"
Config:TUN:InterfaceName = "wpan0"
Daemon:AutoAssociateAfterReset = true
Daemon:AutoDeepSleep = false
Daemon:Enabled = true
Daemon:ReadyForHostSleep = true
Daemon:SetDefaultRouteForAutoAddedPrefix = false
Daemon:TerminateOnFault = false
Daemon:Version = "0.08.00d (0.07.01-284-g3a65a78-dirty; Jun 25 2019 06:02:37)"
IPv6:AllAddresses = [
"fdec:e7fd:c936::1 prefix_len:64 origin:intface valid:forever preferred:forever"
"fdec:e7fd:c936:0:50c3:d7fc:14e1:6b78 prefix_len:64 origin:ncp valid:forever preferred:forever"
"fe80::58c0:1354:1142:236d prefix_len:64 origin:ncp valid:forever preferred:forever"
]
IPv6:LinkLocalAddress = "fe80::58c0:1354:1142:236d"
IPv6:MeshLocalAddress = "fdec:e7fd:c936:0:50c3:d7fc:14e1:6b78"
IPv6:MeshLocalPrefix = "fdec:e7fd:c936::/64"
IPv6:MulticastAddresses = [
"ff02::1 origin:ncp"
"ff02::2 origin:ncp"
"ff03::1 origin:ncp"
"ff03::2 origin:ncp"
"ff03::fc origin:ncp"
"ff32:40:fdec:e7fd:c936::1 origin:ncp"
"ff33:40:fdec:e7fd:c936::1 origin:ncp"
]
IPv6:Routes = []
IPv6:SetSLAACForAutoAddedPrefix = false
Interface:Up = true
NCP:CCAFailureRate = 0x0400
NCP:CCAThreshold: <empty> (16)
NCP:Capabilities = [
"COUNTERS (5)"
"UNSOL_UPDATE_FILTER (12)"
"PCAP (14)"
"802_15_4_2450MHZ_OQPSK (24)"
"CONFIG_FTD (32)"
"ROLE_ROUTER (48)"
"ROLE_SLEEPY (49)"
"NET_THREAD_1_1 (53)"
"ERROR_RATE_TRACKING (516)"
"UNKNOWN (522)"
"THREAD_COMMISSIONER (1024)"
]
NCP:Channel = 20
NCP:ChannelMask = 34635776
NCP:Counter:AllMac = [
"TxTotal = 63"
"TxUnicast = 0"
"TxBroadcast = 63"
"TxAckRequested = 0"
"TxAcked = 0"
"TxNoAckRequested = 63"
"TxData = 63"
"TxDataPoll = 0"
"TxBeacon = 0"
"TxBeaconRequest = 0"
"TxOther = 0"
"TxRetry = 1"
"TxErrCca = 1"
"TxErrAbort = 0"
"TxErrBusyChannel = 0"
"RxTotal = 125"
"RxUnicast = 0"
"RxBroadcast = 44"
"RxData = 44"
"RxDataPoll = 0"
"RxBeacon = 0"
"RxBeaconRequest = 0"
"RxOther = 0"
"RxAddressFiltered = 0"
"RxDestAddrFiltered = 78"
"RxDuplicated = 0"
"RxErrNoFrame = 1"
"RxErrUnknownNeighbor = 0"
"RxErrInvalidSrcAddr = 0"
"RxErrSec = 0"
"RxErrFcs = 2"
"RxErrOther = 0"
]
NCP:Counter:RX_IP_DROPPED = 0
NCP:Counter:RX_IP_INSEC_TOTAL = 0
NCP:Counter:RX_IP_SEC_TOTAL = 0
NCP:Counter:RX_SPINEL_ERR = 7
NCP:Counter:RX_SPINEL_TOTAL = 284
NCP:Counter:TX_IP_DROPPED = 0
NCP:Counter:TX_IP_INSEC_TOTAL = 0
NCP:Counter:TX_IP_SEC_TOTAL = 0
NCP:Counter:TX_SPINEL_TOTAL = 0
NCP:ExtendedAddress = [5AC013541142236D]
NCP:Frequency = 2450000
NCP:HardwareAddress = [E8861373EA490E6B]
NCP:MACAddress = [5AC013541142236D]
NCP:RSSI = -48
NCP:SleepyPollInterval = 236000
NCP:State = "associated"
NCP:TXPower = 8
NCP:Version = "OPENTHREAD/at1.1.0; NRF52840; Jun 25 2019 14:23:42"
Network:IsCommissioned = true
Network:Key = [29883EE62B3F9CA944EE775C5FE6781E]
Network:KeyIndex = 1
Network:Name = "degu"
Network:NodeType = "leader"
Network:PANID = 0xABCD
Network:PSKc = [00000000000000000000000000000000]
Network:PartitionId = 399684902
Network:XPANID = 0xECE7FDC9365293A9
Thread:ActiveDataset = [
"Dataset:ActiveTimestamp = 0x0000000000000000"
"Dataset:Channel = 20"
"Dataset:NetworkName = "degu""
"Dataset:PanId = 0xABCD"
"Dataset:ExtendedPanId = 0xECE7FDC9365293A9"
"Dataset:MasterKey = [29883EE62B3F9CA944EE775C5FE6781E]"
"Dataset:MeshLocalPrefix = fdec:e7fd:c936::/64"
"Dataset:ChannelMaskPage0 = 0x02108000"
"Dataset:PSKc = [00000000000000000000000000000000]"
"Dataset:SecPolicy:KeyRotation = 672"
"Dataset:SecPolicy:Flags = 0xFF"
]
Thread:AddressCacheTable = []
Thread:ChildTable = []
Thread:ChildTable:Addresses = []
Thread:ChildTimeout = 240
Thread:DeviceMode = 0x0F
Thread:Leader:Address = "fdec:e7fd:c936::ff:fe00:c400"
Thread:Leader:LocalWeight = 0x40
Thread:Leader:NetworkData = [081A0B0249450810000000000000010000000040000000000902C400]
Thread:Leader:RouterID = 0x31
Thread:Leader:StableNetworkData = []
Thread:Leader:Weight = 0x40
Thread:NeighborTable = []
Thread:NeighborTable:ErrorRates = []
Thread:NetworkData: <empty> (16)
Thread:NetworkDataVersion = 0x43
Thread:OffMeshRoutes = []
Thread:OnMeshPrefixes = []
Thread:Parent: <empty> (15335444)
Thread:PendingDataset = []
Thread:RLOC16 = 0xC400
Thread:RouterDowngradeThreshold = 0x17
Thread:RouterID = 0x31
Thread:RouterTable = [
"5AC013541142236D, RLOC16:c400, RouterId:49, NextHop:63, PathCost:0, LQIn:0, LQOut:0, Age:0, LinkEst:no"
]
Thread:RouterUpgradeThreshold = 0x10
Thread:StableNetworkData: <empty> (16)
Thread:StableNetworkDataVersion = 0x05
com.nestlabs.internal:Network:AllowingJoin = false
com.nestlabs.internal:Network:PassthruPort = 0x1634
root@armadillo:~#
ご確認いただきありがとうございます。
degu-factory-20190726.zip を使用して、ファクトリーイメージの書き換えは行っておりません。
とのことですが、Deguのファームウェアの更新も未実施という認識でよろしいでしょうか? 参考) https://open-degu.github.io/user_manual/20_software_update/
ご返信いただき、ありがとうございます。
とのことですが、Deguのファームウェアの更新も未実施という認識でよろしいでしょうか? 参考) https://open-degu.github.io/user_manual/20_software_update/
上記については、Deguゲートウェイ上で、sudo apt-get install dfu-util
を行っております。
sudo apt-get install dfu-util
でDeguゲートウェイに dfu-util
をインストールした後、
同一ページに記載されているアップデート手順
に従って
Deguへのファームウェアの書き込み sudo dfu-util --alt 1 -D degu.bin
まで
実施いただいた認識でよろしいでしょうか?
また、その際のDeguファームウェアのバージョンをお知らせいただけますでしょうか?
sudo dfu-util --alt 1 -D degu.bin
は、まだ実施しておりません。
Deguへのファームウェアの書き込み sudo dfu-util --alt 1 -D degu.bin まで 実施いただいた認識でよろしいでしょうか? また、その際のDeguファームウェアのバージョンをお知らせいただけますでしょうか?
root@armadillo:~# wget https://github.com/open-degu/degu/releases/download/v0.9.5/degu-v0.9.5.bin
--2019-10-29 13:06:38-- https://github.com/open-degu/degu/releases/download/v0.9.5/degu-v0.9.5.bin
Resolving github.com (github.com)... 52.192.72.89
Connecting to github.com (github.com)|52.192.72.89|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/178800802/3736f780-dfb3-11e9-9ccf-08d92863be1f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191029%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191029T040642Z&X-Amz-Expires=300&X-Amz-Signature=ef531cffbc8c1340ca8ee9c94577a6c99093bf251aeea7a9f1198f6357645bc1&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Ddegu-v0.9.5.bin&response-content-type=application%2Foctet-stream [following]
--2019-10-29 13:06:42-- https://github-production-release-asset-2e65be.s3.amazonaws.com/178800802/3736f780-dfb3-11e9-9ccf-08d92863be1f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20191029%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20191029T040642Z&X-Amz-Expires=300&X-Amz-Signature=ef531cffbc8c1340ca8ee9c94577a6c99093bf251aeea7a9f1198f6357645bc1&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Ddegu-v0.9.5.bin&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.80.128
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.80.128|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 385620 (377K) [application/octet-stream]
Saving to: 'degu-v0.9.5.bin'
degu-v0.9.5.bin 100%[=====================================================================================================================>] 376.58K 107KB/s in 3.5s
2019-10-29 13:06:49 (107 KB/s) - 'degu-v0.9.5.bin' saved [385620/385620]
root@armadillo:~# [434279.833697] awl13: Network Info! [0x4008]
[434320.503087] usb 1-1: new full-speed USB device number 2 using ci_hdrc
[434321.152980] usb 1-1: device not accepting address 2, error -71
[434321.522913] usb 1-1: new full-speed USB device number 3 using ci_hdrc
[434321.740846] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[434321.763220] usb-storage 1-1:1.2: USB Mass Storage device detected
[434321.772537] scsi host0: usb-storage 1-1:1.2
[434322.847449] scsi 0:0:0:0: Direct-Access ZEPHYR ZEPHYR USB DISK 0.01 PQ: 0 ANSI: 0 CCS
[434322.861814] sd 0:0:0:0: Attached scsi generic sg0 type 0
[434322.882513] sd 0:0:0:0: [sda] 64 512-byte logical blocks: (32.8 kB/32.0 KiB)
[434322.901112] sd 0:0:0:0: [sda] Write Protect is off
[434322.937981] sd 0:0:0:0: [sda] No Caching mode page found
[434322.943505] sd 0:0:0:0: [sda] Assuming drive cache: write through
[434322.997405] sda:
[434323.021511] sd 0:0:0:0: [sda] Attached SCSI removable disk
[434323.906569] usb 1-1: USB disconnect, device number 3
[434378.036208] usb 1-1: new full-speed USB device number 4 using ci_hdrc
[434378.250740] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
root@armadillo:~# ls -ltr
total 380
-rw-r--r-- 1 root root 385620 Sep 25 16:40 degu-v0.9.5.bin
root@armadillo:~# sudo dfu-util --alt 1 -D degu-v0.9.5.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2fe3:0100
Run-time device DFU version 0110
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
Resetting USB...
[434403.699421] usb 1-1: reset full-speed USB device number 4 using ci_hdrc
[434403.911960] usb 1-1: device firmware changed
[434403.916687] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[434403.927636] usb 1-1: USB disconnect, device number 4
[434404.081483] usb 1-1: new full-speed USB device number 5 using ci_hdrc
Opening DFU USB Device...
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 64
Copying data from PC to DFU device
Download [=========================] 100% 385620 bytes
Download done.
state(2) = dfuIDLE, status(0) = No error condition is present
Done!
root@armadillo:~# reboot
また、上記コマンドのreboot前に以下を行いましたが、OpenThreadのネットワークは繋がっていないようです。
root@armadillo:~# wpanctl getprop | grep ChildTable
NCP:CCAThreshold: <empty> (16)
Thread:NetworkData: <empty> (16)
Thread:Parent: <empty> (15335444)
Thread:StableNetworkData: <empty> (16)
Thread:ChildTable = []
Thread:ChildTable:Addresses = []
また、以下のようにDegu,GWの電源投入後、coap-mqtt-bridge.serviceを再起動しましたが、wpantundでエラーが発生しています。
root@armadillo:~# systemctl restart coap-mqtt-bridge.service
root@armadillo:~# journalctl -f --no-pager
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: Generating a RSA private key
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: .....................................................................................++++
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: ................................++++
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: writing new private key to '/tmp/coap-dtls/key.pem'
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: -----
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: You are about to be asked to enter information that will be incorporated
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: into your certificate request.
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: What you are about to enter is what is called a Distinguished Name or a DN.
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: There are quite a few fields but you can leave some blank
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: For some fields there will be a default value,
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: If you enter '.', the field will be left blank.
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: -----
Oct 29 13:48:33 armadillo coap_mqtt_bridge[4507]: Country Name (2 letter code) [AU]:State or Province Name (full name) [Some-State]:Locality Name (eg, city) []:Organization Name (eg, company) [Internet Widgits Pty Ltd]:Organizational Unit Name (eg, section) []:Common Name (e.g. server FQDN or YOUR name) []:Email Address []:dtls listening on :::5684
Oct 29 13:48:38 armadillo systemd[1]: Stopping CoAP over DTLS - MQTT bridge server...
Oct 29 13:48:38 armadillo systemd[1]: Stopped CoAP over DTLS - MQTT bridge server.
Oct 29 13:48:38 armadillo systemd[1]: Started CoAP over DTLS - MQTT bridge server.
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: Generating a RSA private key
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: .................................................................................................................................++++
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: ................................................................................++++
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: writing new private key to '/tmp/coap-dtls/key.pem'
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: -----
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: You are about to be asked to enter information that will be incorporated
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: into your certificate request.
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: What you are about to enter is what is called a Distinguished Name or a DN.
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: There are quite a few fields but you can leave some blank
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: For some fields there will be a default value,
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: If you enter '.', the field will be left blank.
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: -----
Oct 29 13:49:33 armadillo coap_mqtt_bridge[4634]: Country Name (2 letter code) [AU]:State or Province Name (full name) [Some-State]:Locality Name (eg, city) []:Organization Name (eg, company) [Internet Widgits Pty Ltd]:Organizational Unit Name (eg, section) []:Common Name (e.g. server FQDN or YOUR name) []:Email Address []:dtls listening on :::5684
Oct 29 13:52:41 armadillo wpantund[329]: wpantund[329]: SpinelNCPTaskSendCommand.cpp:340: Requirement Failed ((mRetVal) == 0)
Oct 29 13:52:41 armadillo wpantund[329]: SpinelNCPTaskSendCommand.cpp:340: Requirement Failed ((mRetVal) == 0)
Oct 29 13:52:41 armadillo wpantund[329]: wpantund[329]: SendCommand task encountered an error: 16 (0x00000010)
Oct 29 13:52:41 armadillo wpantund[329]: SendCommand task encountered an error: 16 (0x00000010)
Oct 29 13:52:42 armadillo wpantund[329]: wpantund[329]: SpinelNCPTaskSendCommand.cpp:340: Requirement Failed ((mRetVal) == 0)
Oct 29 13:52:42 armadillo wpantund[329]: SpinelNCPTaskSendCommand.cpp:340: Requirement Failed ((mRetVal) == 0)
Oct 29 13:52:42 armadillo wpantund[329]: wpantund[329]: SendCommand task encountered an error: 16 (0x00000010)
Oct 29 13:52:42 armadillo wpantund[329]: SendCommand task encountered an error: 16 (0x00000010)
Oct 29 13:52:42 armadillo wpantund[329]: wpantund[329]: SpinelNCPTaskSendCommand.cpp:340: Requirement Failed ((mRetVal) == 0)
Oct 29 13:52:42 armadillo wpantund[329]: SpinelNCPTaskSendCommand.cpp:340: Requirement Failed ((mRetVal) == 0)
Oct 29 13:52:42 armadillo wpantund[329]: wpantund[329]: SendCommand task encountered an error: 15335444 (0x00EA0014)
Oct 29 13:52:42 armadillo wpantund[329]: SendCommand task encountered an error: 15335444 (0x00EA0014)
Oct 29 13:52:42 armadillo wpantund[329]: wpantund[329]: SpinelNCPTaskSendCommand.cpp:340: Requirement Failed ((mRetVal) == 0)
Oct 29 13:52:42 armadillo wpantund[329]: SpinelNCPTaskSendCommand.cpp:340: Requirement Failed ((mRetVal) == 0)
Oct 29 13:52:42 armadillo wpantund[329]: wpantund[329]: SendCommand task encountered an error: 16 (0x00000010)
Oct 29 13:52:42 armadillo wpantund[329]: SendCommand task encountered an error: 16 (0x00000010)
root@armadillo:~#
度々、コメントし申し訳ございません。
Degu自体のFWアップデート、Deguに記録されているThread接続情報を消去後、再度、 Deguゲートウェイのセットアップ - Degu Project Resourcesの手順を一から実施し、無事、OpenThreadのネットワーク接続行えました。!
/dev/sdx
をそのまま打ち込んでおり、Thread接続情報が消去出来ていなかったことが、原因だと思われます。お騒がいたしました。本件クローズでお願いいたします。
$ sudo dd if=/dev/zero of=/dev/sdx bs=1k count=16 seek=16
Degu
micropython process.
d micropython process.
{"state": {"reported": {"battery": 0.7500937}}}
'2.04'
{"state": {"reported": {"battery": 0.7441875}}}
'2.04'
{"state": {"reported": {"battery": 0.756}}}
'2.04'
Degu GW
root@armadillo:~# apt-get update && apt-get upgrade
Ign:1 http://download.atmark-techno.com/debian stretch InRelease
Ign:2 http://ftp.jp.debian.org/debian stretch InRelease
Get:3 http://security.debian.org stretch/updates InRelease [94.3 kB]
Hit:4 http://ftp.jp.debian.org/debian stretch Release
Hit:5 http://download.atmark-techno.com/debian stretch Release
Get:8 http://security.debian.org stretch/updates/main Sources [190 kB]
Get:9 http://security.debian.org stretch/updates/main armhf Packages [486 kB]
Fetched 770 kB in 7s (103 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
file libmagic-mgc libmagic1
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 391 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.debian.org stretch/updates/main armhf file armhf 1:5.30-1+deb9u3 [63.9 kB]
Get:2 http://security.debian.org stretch/updates/main armhf libmagic1 armhf 1:5.30-1+deb9u3 [105 kB]
Get:3 http://security.debian.org stretch/updates/main armhf libmagic-mgc armhf 1:5.30-1+deb9u3 [222 kB]
Fetched 391 kB in 2s (147 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 25509 files and directories currently installed.)
Preparing to unpack .../file_1%3a5.30-1+deb9u3_armhf.deb ...
Unpacking file (1:5.30-1+deb9u3) over (1:5.30-1+deb9u2) ...
Preparing to unpack .../libmagic1_1%3a5.30-1+deb9u3_armhf.deb ...
Unpacking libmagic1:armhf (1:5.30-1+deb9u3) over (1:5.30-1+deb9u2) ...
Preparing to unpack .../libmagic-mgc_1%3a5.30-1+deb9u3_armhf.deb ...
Unpacking libmagic-mgc (1:5.30-1+deb9u3) over (1:5.30-1+deb9u2) ...
Setting up libmagic-mgc (1:5.30-1+deb9u3) ...
Setting up libmagic1:armhf (1:5.30-1+deb9u3) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up file (1:5.30-1+deb9u3) ...
root@armadillo:~# sudo apt-get install dfu-util
Reading package lists... Done
Building dependency tree
Reading state information... Done
dfu-util is already the newest version (0.9-1degu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@armadillo:~# [ 6315.500787] usb 1-1: new full-speed USB device number 2 using ci_hdrc
[ 6315.800154] usb 1-1: unable to read config index 0 descriptor/all
[ 6315.806338] usb 1-1: can't read configurations, error -71
[ 6316.180196] usb 1-1: new full-speed USB device number 3 using ci_hdrc
[ 6316.395738] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[ 6316.406734] usb-storage 1-1:1.2: USB Mass Storage device detected
[ 6316.420674] scsi host0: usb-storage 1-1:1.2
[ 6317.484247] scsi 0:0:0:0: Direct-Access ZEPHYR ZEPHYR USB DISK 0.01 PQ: 0 ANSI: 0 CCS
[ 6317.505802] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 6317.523321] sd 0:0:0:0: [sda] 64 512-byte logical blocks: (32.8 kB/32.0 KiB)
[ 6317.544889] sd 0:0:0:0: [sda] Write Protect is off
[ 6317.580998] sd 0:0:0:0: [sda] No Caching mode page found
[ 6317.586405] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 6317.640215] sda:
[ 6317.665306] sd 0:0:0:0: [sda] Attached SCSI removable disk
root@armadillo:~# sudo dfu-util --alt 1 -D degu.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Could not open file degu.bin for reading: No such file or directory
root@armadillo:~# ls
degu-v0.9.5.bin
root@armadillo:~# sudo dfu-util --alt 1 -D
.bash_history .profile .wget-hsts
.bashrc .viminfo degu-v0.9.5.bin
root@armadillo:~# sudo dfu-util --alt 1 -D
.bash_history .profile .wget-hsts
.bashrc .viminfo degu-v0.9.5.bin
root@armadillo:~# sudo dfu-util --alt 1 -D degu-v0.9.5.bin [ 6401.034008] awl13: Network Info! [0x4008]
[ 6417.932351] usb 1-1: USB disconnect, device number 3
[ 6672.916539] usb 1-1: new full-speed USB device number 4 using ci_hdrc
[ 6673.131347] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[ 6673.156758] usb 1-1: USB disconnect, device number 4
[ 6673.516343] usb 1-1: new full-speed USB device number 5 using ci_hdrc
[ 6673.738989] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[ 6673.746727] usb-storage 1-1:1.2: USB Mass Storage device detected
[ 6673.760687] scsi host0: usb-storage 1-1:1.2
[ 6674.830475] scsi 0:0:0:0: Direct-Access ZEPHYR ZEPHYR USB DISK 0.01 PQ: 0 ANSI: 0 CCS
[ 6674.844761] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 6674.864681] sd 0:0:0:0: [sda] 64 512-byte logical blocks: (32.8 kB/32.0 KiB)
[ 6674.883592] sd 0:0:0:0: [sda] Write Protect is off
[ 6674.914275] sd 0:0:0:0: [sda] No Caching mode page found
[ 6674.919736] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 6674.972629] sda:
[ 6674.996544] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 6682.293188] usb 1-1: USB disconnect, device number 5
[ 6696.084942] usb 1-1: new full-speed USB device number 6 using ci_hdrc
[ 6696.298944] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
root@armadillo:~# sudo dfu-util --alt 1 -D degu-v0.9.5.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2fe3:0100
Run-time device DFU version 0110
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
Resetting USB...
[ 6723.104740] usb 1-1: reset full-speed USB device number 6 using ci_hdrc
[ 6723.306002] usb 1-1: device firmware changed
[ 6723.310647] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[ 6723.325058] usb 1-1: USB disconnect, device number 6
[ 6723.484258] usb 1-1: new full-speed USB device number 7 using ci_hdrc
Opening DFU USB Device...
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 64
Copying data from PC to DFU device
Download [========= ] 36% 138880 bytes[ 6744.175486] awl13: Network Info! [0x4008]
Download [=========================] 100% 385620 bytes
Download done.
state(2) = dfuIDLE, status(0) = No error condition is present
Done!
root@armadillo:~# [ 6768.561937] usb 1-1: USB disconnect, device number 7
root@armadillo:~# ls -ltr /dev/sd*
ls: cannot access '/dev/sd*': No such file or directory
root@armadillo:~# sudo dd if=/dev/zero of=/dev/sdx bs=1k count=16 seek=16[ 6974.385821] usb 1-1: new full-speed USB device number 8 using ci_hdrc
[ 6974.601410] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
^C
root@armadillo:~# ls -ltr /dev/sd*[ 6987.416969] usb 1-1: USB disconnect, device number 8
ls: cannot access '/dev/sd*': No such file or directory
root@armadillo:~# [ 6987.782557] usb 1-1: new full-speed USB device number 9 using ci_hdrc
[ 6987.997350] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[ 6988.011340] usb-storage 1-1:1.2: USB Mass Storage device detected
[ 6988.020688] scsi host0: usb-storage 1-1:1.2
[ 6989.077668] scsi 0:0:0:0: Direct-Access ZEPHYR ZEPHYR USB DISK 0.01 PQ: 0 ANSI: 0 CCS
[ 6989.092027] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 6989.112740] sd 0:0:0:0: [sda] 64 512-byte logical blocks: (32.8 kB/32.0 KiB)
[ 6989.133365] sd 0:0:0:0: [sda] Write Protect is off
[ 6989.161749] sd 0:0:0:0: [sda] No Caching mode page found
[ 6989.167202] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 6989.220355] sda:
[ 6989.245724] sd 0:0:0:0: [sda] Attached SCSI removable disk
root@armadillo:~# ls -ltr /dev/sd*
brw-rw---- 1 root disk 8, 0 Oct 29 15:23 /dev/sda
root@armadillo:~# sudo dd if=/dev/zero of=/dev/sda bs=1k count=16 seek=16
16+0 records in
16+0 records out
16384 bytes (16 kB, 16 KiB) copied, 4.76589 s, 3.4 kB/s
root@armadillo:~# [ 7011.839686] sda:
^C7066.135866] usb 1-1: USB disconnect, device number 9
root@armadillo:~# journalctl -f --no-pager
-- Logs begin at Tue 2019-10-29 13:26:45 JST. --
Oct 29 15:23:08 armadillo kernel: sda:
Oct 29 15:23:08 armadillo kernel: sd 0:0:0:0: [sda] Attached SCSI removable disk
Oct 29 15:23:26 armadillo sudo[21727]: root : TTY=ttymxc2 ; PWD=/root ; USER=root ; COMMAND=/bin/dd if=/dev/zero of=/dev/sda bs=1k count=16 seek=16
Oct 29 15:23:26 armadillo sudo[21727]: pam_unix(sudo:session): session opened for user root by root(uid=0)
Oct 29 15:23:31 armadillo sudo[21727]: pam_unix(sudo:session): session closed for user root
Oct 29 15:23:31 armadillo kernel: sda:
Oct 29 15:24:25 armadillo kernel: usb 1-1: USB disconnect, device number 9
Oct 29 15:24:59 armadillo sudo[22006]: www-data : TTY=unknown ; PWD=/var/www/html/degu ; USER=root ; COMMAND=/usr/bin/degu-manager --register-degu B7C71583D042473E
Oct 29 15:24:59 armadillo sudo[22006]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 29 15:25:11 armadillo sudo[22006]: pam_unix(sudo:session): session closed for user root
Oct 29 15:25:47 armadillo coap_mqtt_bridge[5704]: publish message topic: $aws/things/B7C71583D042473E/shadow/update message: {"state": {"reported": {"battery": 0.7500937}}}
^C
root@armadillo:~# wpanctl getprop | grep ChildTable
NCP:CCAThreshold: <empty> (16)
Thread:NetworkData: <empty> (16)
Thread:Parent: <empty> (15335444)
Thread:StableNetworkData: <empty> (16)
Thread:ChildTable = [
Thread:ChildTable:Addresses = [
root@armadillo:~# wpanctl getprop
Commissioner:ProvisioningUrl = ""
Commissioner:SessionId = 0x51C1
Commissioner:State = "active"
Config:NCP:DriverName = "spinel"
Config:TUN:InterfaceName = "wpan0"
Daemon:AutoAssociateAfterReset = true
Daemon:AutoDeepSleep = false
Daemon:Enabled = true
Daemon:ReadyForHostSleep = true
Daemon:SetDefaultRouteForAutoAddedPrefix = false
Daemon:TerminateOnFault = false
Daemon:Version = "0.08.00d (0.07.01-284-g3a65a78-dirty; Jun 25 2019 06:02:37)"
IPv6:AllAddresses = [
"fdec:e7fd:c936::1 prefix_len:64 origin:intface valid:forever preferred:forever"
"fdec:e7fd:c936:0:50c3:d7fc:14e1:6b78 prefix_len:64 origin:ncp valid:forever preferred:forever"
"fe80::58c0:1354:1142:236d prefix_len:64 origin:ncp valid:forever preferred:forever"
]
IPv6:LinkLocalAddress = "fe80::58c0:1354:1142:236d"
IPv6:MeshLocalAddress = "fdec:e7fd:c936:0:50c3:d7fc:14e1:6b78"
IPv6:MeshLocalPrefix = "fdec:e7fd:c936::/64"
IPv6:MulticastAddresses = [
"ff02::1 origin:ncp"
"ff02::2 origin:ncp"
"ff03::1 origin:ncp"
"ff03::2 origin:ncp"
"ff03::fc origin:ncp"
"ff32:40:fdec:e7fd:c936::1 origin:ncp"
"ff33:40:fdec:e7fd:c936::1 origin:ncp"
]
IPv6:Routes = []
IPv6:SetSLAACForAutoAddedPrefix = false
Interface:Up = true
NCP:CCAFailureRate = 0x03CB
NCP:CCAThreshold: <empty> (16)
NCP:Capabilities = [
"COUNTERS (5)"
"UNSOL_UPDATE_FILTER (12)"
"PCAP (14)"
"802_15_4_2450MHZ_OQPSK (24)"
"CONFIG_FTD (32)"
"ROLE_ROUTER (48)"
"ROLE_SLEEPY (49)"
"NET_THREAD_1_1 (53)"
"ERROR_RATE_TRACKING (516)"
"UNKNOWN (522)"
"THREAD_COMMISSIONER (1024)"
]
NCP:Channel = 20
NCP:ChannelMask = 34635776
NCP:Counter:AllMac = [
"TxTotal = 264"
"TxUnicast = 23"
"TxBroadcast = 241"
"TxAckRequested = 23"
"TxAcked = 23"
"TxNoAckRequested = 241"
"TxData = 264"
"TxDataPoll = 0"
"TxBeacon = 0"
"TxBeaconRequest = 0"
"TxOther = 0"
"TxRetry = 6"
"TxErrCca = 4"
"TxErrAbort = 0"
"TxErrBusyChannel = 0"
"RxTotal = 189"
"RxUnicast = 24"
"RxBroadcast = 43"
"RxData = 67"
"RxDataPoll = 0"
"RxBeacon = 0"
"RxBeaconRequest = 0"
"RxOther = 0"
"RxAddressFiltered = 0"
"RxDestAddrFiltered = 119"
"RxDuplicated = 0"
"RxErrNoFrame = 0"
"RxErrUnknownNeighbor = 0"
"RxErrInvalidSrcAddr = 0"
"RxErrSec = 0"
"RxErrFcs = 3"
"RxErrOther = 0"
]
NCP:Counter:RX_IP_DROPPED = 0
NCP:Counter:RX_IP_INSEC_TOTAL = 0
NCP:Counter:RX_IP_SEC_TOTAL = 2
NCP:Counter:RX_SPINEL_ERR = 0
NCP:Counter:RX_SPINEL_TOTAL = 583
NCP:Counter:TX_IP_DROPPED = 0
NCP:Counter:TX_IP_INSEC_TOTAL = 0
NCP:Counter:TX_IP_SEC_TOTAL = 2
NCP:Counter:TX_SPINEL_TOTAL = 0
NCP:ExtendedAddress = [5AC013541142236D]
NCP:Frequency = 2450000
NCP:HardwareAddress = [E8861373EA490E6B]
NCP:MACAddress = [5AC013541142236D]
NCP:RSSI = -96
NCP:SleepyPollInterval = 236000
NCP:State = "associated"
NCP:TXPower = 8
NCP:Version = "OPENTHREAD/at1.1.0; NRF52840; Jun 25 2019 14:23:42"
Network:IsCommissioned = true
Network:Key = [29883EE62B3F9CA944EE775C5FE6781E]
Network:KeyIndex = 1
Network:Name = "degu"
Network:NodeType = "leader"
Network:PANID = 0xABCD
Network:PSKc = [00000000000000000000000000000000]
Network:PartitionId = 1025456608
Network:XPANID = 0xECE7FDC9365293A9
Thread:ActiveDataset = [
"Dataset:ActiveTimestamp = 0x0000000000000000"
"Dataset:Channel = 20"
"Dataset:NetworkName = "degu""
"Dataset:PanId = 0xABCD"
"Dataset:ExtendedPanId = 0xECE7FDC9365293A9"
"Dataset:MasterKey = [29883EE62B3F9CA944EE775C5FE6781E]"
"Dataset:MeshLocalPrefix = fdec:e7fd:c936::/64"
"Dataset:ChannelMaskPage0 = 0x02108000"
"Dataset:PSKc = [00000000000000000000000000000000]"
"Dataset:SecPolicy:KeyRotation = 672"
"Dataset:SecPolicy:Flags = 0xFF"
]
Thread:AddressCacheTable = []
Thread:ChildTable = [
"F2E8F5CD5D31BAED, RLOC16:c401, NetDataVer:45, LQIn:3, AveRssi:-56, LastRssi:-58, Timeout:240, Age:85, RxOnIdle:yes, FTD:no, SecDataReq:yes, FullNetData:no"
]
Thread:ChildTable:Addresses = [
"F2E8F5CD5D31BAED, RLOC16:c401, IPv6Addrs:[fdec:e7fd:c936:0:b38:ed4d:813e:a986]"
]
Thread:ChildTimeout = 240
Thread:DeviceMode = 0x0F
Thread:Leader:Address = "fdec:e7fd:c936::ff:fe00:c400"
Thread:Leader:LocalWeight = 0x40
Thread:Leader:NetworkData = [081A0B0251C10810000000000000010000000040000000000902C400]
Thread:Leader:RouterID = 0x31
Thread:Leader:StableNetworkData = []
Thread:Leader:Weight = 0x40
Thread:NeighborTable = [
"F2E8F5CD5D31BAED, RLOC16:c401, LQIn:3, AveRssi:-56, LastRssi:-58, Age:85, LinkFC:1004, MleFC:1005, IsChild:yes, RxOnIdle:yes, FTD:no, SecDataReq:yes, FullNetData:no"
]
Thread:NeighborTable:ErrorRates = [
"F2E8F5CD5D31BAED, RLOC16:c401, FrameErrRate:0.78%, MsgErrorRate:0.00%, AveRssi:-56, LastRssi:-58, "
]
Thread:NetworkData: <empty> (16)
Thread:NetworkDataVersion = 0x28
Thread:OffMeshRoutes = []
Thread:OnMeshPrefixes = []
Thread:Parent: <empty> (15335444)
Thread:PendingDataset = []
Thread:RLOC16 = 0xC400
Thread:RouterDowngradeThreshold = 0x17
Thread:RouterID = 0x31
Thread:RouterTable = [
"5AC013541142236D, RLOC16:c400, RouterId:49, NextHop:63, PathCost:0, LQIn:0, LQOut:0, Age:0, LinkEst:no"
]
Thread:RouterUpgradeThreshold = 0x10
Thread:StableNetworkData: <empty> (16)
Thread:StableNetworkDataVersion = 0x2D
com.nestlabs.internal:Network:AllowingJoin = false
com.nestlabs.internal:Network:PassthruPort = 0x1634
root@armadillo:~#
ddするデバイスファイルの例示が分かりづらいので、マニュアルを更新しました。 ありがとうございます。
https://github.com/open-degu/open-degu.github.io/commit/16f99256842c75e6fe50f1adf19baad826e47c35
技術情報のフラッシュメモリマップ資料が更新されていること、確認いたしました。 迅速なご対応ありがとうございます。
お世話になります。
以下2つの
issues
と同様に、Aws IoT Core
のモノ(things)にGW(A6)とDeguのMacAddressは登録されますが、シャドウが反映されない状況で、困っています。wpanctl getprop
を見ると、ChildTable
が取れていないので、degu <-> gw 間の通信ができていないと思われますが、対処方法があれば、ご教示ください。degu-factory-20190726.zip
を使用して、ファクトリーイメージの書き換えは行っておりません。main.py
はそのままです。wpantund[271]: SendCommand task encountered an error: 4 (0x00000004)
のログが気になっていますが、現象に関連ありますでしょうか。root@armadillo:~# journalctl --no-pager -f