Hi, @jia200x
I have run the ieee802154_hal and ieee802154_submac tests. So, I saw some interesting things:
-
-ack-req has no effect because I had IEEE802154_CAP_IRQ_ACK_TIMEOUT in caps. When I commented it, module had started to wait the ACK frame a couple of ms after transmiting. If it no receive (because ACK frame doesn’t form after receiving), transmitter sent a data packet again 4 times. So, I have some questions:
-
What should I do to enable forming the ACK frame in SubMAC? As said here SubMAC has implementation for CSMA-CA and frame retransmission if radio device is not support it (as I understand).
-
It is not clear for me, what should do ifconfig commands like -6lo, -iphc. E.g. -6lo gives me “error: unable to set option”. Does it mean that 6LowPAN doesn’t work because I don’t have implementation for important function.
Some debug information from tests/ieee802154_hal:
caps
[15:06:44:231] > caps␍␊
[15:06:49:158] CAPS ␊
[15:06:49:158] =================================␊
[15:06:49:158] - Frame Retransmissions: n␊
[15:06:49:158] * Info retries: n␊
[15:06:49:158] - Auto CSMA-CA: n␊
[15:06:49:158] - 2.4 GHz band: y␊
[15:06:49:158] - SubGHz band: n␊
[15:06:49:158] - TX DONE indication: y␊
[15:06:49:191] * ACK Timeout indication: n␊
[15:06:49:191] - RX_START indication: y␊
[15:06:49:191] - CCA Done indication: y␊
[15:06:49:191] - PHY modes: ␊
[15:06:49:191] - * BPSK: n␊
[15:06:49:191] - * ASK: n␊
[15:06:49:191] - * O-QPSK: n␊
[15:06:49:191] - * MR-O-QPSK: y␊
[15:06:49:191] - * MR-OFDM: n␊
[15:06:49:191] - * MR-FSK: n␊
txtsnd hal
txtsnd A6:DE:12:64:DA:C5:B4:2B 10␍␊
[15:08:05:476] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:08:05:481] [sx126x] netdev: send: wrote data to payload buffer.␊
[15:08:05:485] [sx126x] netdev: send: wrote data to payload buffer.␊
[15:08:05:494] [sx126x] writing (size: 31).␊
[15:08:05:494] IEEE802154_HAL: ACK_ONLY␊
[15:08:05:494] [sx126x] netdev: set NETOPT_STATE_TX state␊
[15:08:05:569] [sx126x] netdev: SX126X_IRQ_TX_DONE␊
[15:08:05:573] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:08:05:573] [sx126x] netdev: set NETOPT_STATE_RX state␊
[15:08:05:578] ␊
[15:08:05:578] ␊
[15:08:05:578] > IEEE802154_HAL: FILTER_ACCEPT␊
receive packet hal
[15:07:50:295] > [sx126x] netdev: SX126X_IRQ_PREAMBLE_DETECTED␊
[15:08:05:504] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:08:05:533] [sx126x] netdev: SX126X_IRQ_HEADER_VALID␊
[15:08:05:533] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:08:05:570] [sx126x] netdev: SX126X_IRQ_RX_DONE␊
[15:08:05:578] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:08:05:578] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:08:05:591] [sx126x] netdev: read received data.␊
[15:08:05:591] Frame received:␊
[15:08:05:600] 00000000 41 DC 00 23 00 2B B4 C5 DA 64 12 DE A6 05 84 4E␊
[15:08:05:600] 00000010 08 50 68 EE DE 4C 6F 72 65 6D 20 69 70 73 75␊
[15:08:05:600] LQI: 255, RSSI: 220␊
And tests/ieee802154_submac:
txtsnd
[15:14:21:556] txtsnd A6:DE:12:64:DA:C5:B4:2B 10␍␊
[15:14:21:560] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:21:565] [sx126x] netdev: send: wrote data to payload buffer.␊
[15:14:21:569] [sx126x] netdev: send: wrote data to payload buffer.␊
[15:14:21:573] [sx126x] writing (size: 31).␊
[15:14:21:573] > [sx126x] netdev: set NETOPT_STATE_TX state␊
[15:14:21:660] [sx126x] netdev: SX126X_IRQ_TX_DONE␊
[15:14:21:660] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:660] IEEE802154_HAL: ACK_ONLY␊
[15:14:21:660] [sx126x] netdev: set NETOPT_STATE_RX state␊
[15:14:21:668] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:21:674] [sx126x] netdev: set NETOPT_STATE_TX state␊
[15:14:21:755] [sx126x] netdev: SX126X_IRQ_TX_DONE␊
[15:14:21:755] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:755] IEEE802154_HAL: ACK_ONLY␊
[15:14:21:755] [sx126x] netdev: set NETOPT_STATE_RX state␊
[15:14:21:760] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:21:769] [sx126x] netdev: set NETOPT_STATE_TX state␊
[15:14:21:844] [sx126x] netdev: SX126X_IRQ_TX_DONE␊
[15:14:21:854] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:854] IEEE802154_HAL: ACK_ONLY␊
[15:14:21:854] [sx126x] netdev: set NETOPT_STATE_RX state␊
[15:14:21:880] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:21:880] [sx126x] netdev: set NETOPT_STATE_TX state␊
[15:14:21:950] [sx126x] netdev: SX126X_IRQ_TX_DONE␊
[15:14:21:950] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:950] IEEE802154_HAL: ACK_ONLY␊
[15:14:21:950] [sx126x] netdev: set NETOPT_STATE_RX state␊
[15:14:21:968] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:21:968] [sx126x] netdev: set NETOPT_STATE_TX state␊
[15:14:22:035] [sx126x] netdev: SX126X_IRQ_TX_DONE␊
[15:14:22:049] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:22:049] IEEE802154_HAL: ACK_ONLY␊
[15:14:22:049] [sx126x] netdev: set NETOPT_STATE_RX state␊
[15:14:22:064] IEEE802154_HAL: FILTER_ACCEPT␊
[15:14:22:064] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:22:064] No ACK␊
[15:14:22:064] [sx126x] netdev: set NETOPT_STATE_RX state␊
receive packet
[15:14:17:499] > [sx126x] netdev: SX126X_IRQ_PREAMBLE_DETECTED␊
[15:14:21:586] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:604] [sx126x] netdev: SX126X_IRQ_HEADER_VALID␊
[15:14:21:604] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:660] [sx126x] netdev: SX126X_IRQ_RX_DONE␊
[15:14:21:660] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:660] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:21:670] ␊
[15:14:21:670] [sx126x] netdev: read received data.␊
[15:14:21:670] DATA␊
[15:14:21:670] Dest. PAN: 0x0023, Dest. addr.: a6:de:12:64:da:c5:b4:2b␊
[15:14:21:680] Src. PAN: 0x0023, Src. addr.: de:ee:68:50:08:4e:84:05␊
[15:14:21:680] Security: 0, Frame pend.: 0, ACK req.: 1, PAN comp.: 1␊
[15:14:21:680] Version: 1, Seq.: 0␊
[15:14:21:699] 00000000 4C 6F 72 65 6D 20 69 70 73 75␊
[15:14:21:699] txt (10 chars): Lorem ipsu␊
[15:14:21:699] RSSI: 225, LQI: 255␊
[15:14:21:699] ␊
[15:14:21:699] [sx126x] netdev: set NETOPT_STATE_RX state␊
[15:14:21:779] [sx126x] netdev: SX126X_IRQ_PREAMBLE_DETECTED␊
[15:14:21:779] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:797] [sx126x] netdev: SX126X_IRQ_HEADER_VALID␊
[15:14:21:797] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:845] [sx126x] netdev: SX126X_IRQ_RX_DONE␊
[15:14:21:858] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:858] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:21:858] ␊
[15:14:21:858] [sx126x] netdev: read received data.␊
[15:14:21:858] DATA␊
[15:14:21:879] Dest. PAN: 0x0023, Dest. addr.: a6:de:12:64:da:c5:b4:2b␊
[15:14:21:879] Src. PAN: 0x0023, Src. addr.: de:ee:68:50:08:4e:84:05␊
[15:14:21:879] Security: 0, Frame pend.: 0, ACK req.: 1, PAN comp.: 1␊
[15:14:21:879] Version: 1, Seq.: 0␊
[15:14:21:887] 00000000 4C 6F 72 65 6D 20 69 70 73 75␊
[15:14:21:887] txt (10 chars): Lorem ipsu␊
[15:14:21:887] RSSI: 225, LQI: 255␊
[15:14:21:887] ␊
[15:14:21:887] [sx126x] netdev: set NETOPT_STATE_RX state␊
[15:14:21:970] [sx126x] netdev: SX126X_IRQ_PREAMBLE_DETECTED␊
[15:14:21:970] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:21:988] [sx126x] netdev: SX126X_IRQ_HEADER_VALID␊
[15:14:21:988] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:22:036] [sx126x] netdev: SX126X_IRQ_RX_DONE␊
[15:14:22:051] [sx126x] netdev: SX126X_IRQ_NONE␊
[15:14:22:051] [sx126x] netdev: set NETOPT_STATE_STANDBY state␊
[15:14:22:051] ␊
[15:14:22:051] [sx126x] netdev: read received data.␊
[15:14:22:051] DATA␊
[15:14:22:065] Dest. PAN: 0x0023, Dest. addr.: a6:de:12:64:da:c5:b4:2b␊
[15:14:22:065] Src. PAN: 0x0023, Src. addr.: de:ee:68:50:08:4e:84:05␊
[15:14:22:065] Security: 0, Frame pend.: 0, ACK req.: 1, PAN comp.: 1␊
[15:14:22:065] Version: 1, Seq.: 0␊
[15:14:22:076] 00000000 4C 6F 72 65 6D 20 69 70 73 75␊
[15:14:22:076] txt (10 chars): Lorem ipsu␊
[15:14:22:076] RSSI: 225, LQI: 255␊
[15:14:22:076] ␊
[15:14:22:076] [sx126x] netdev: set NETOPT_STATE_RX state␊
Probably I can’t see some obvious things but I would not like to despair and I really hope for your support.
Cheers, Klim