Merged in merlin17/apps/beacon802154 (pull request #98)

i8sak: Minor setting changes

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Anthony Merlino 2017-07-17 07:43:47 +00:00 committed by Gregory Nutt
commit 6ce7d4a08f
4 changed files with 11 additions and 8 deletions

View File

@ -31,5 +31,9 @@ config IEEE802154_I8SAK_STACKSIZE
int "i8sak stack size" int "i8sak stack size"
default 2048 default 2048
config IEEE802154_I8SAK_CHNUM
int "default channel"
default 11
endif endif

View File

@ -150,14 +150,14 @@ int i8sak_tx(FAR struct i8sak_s *i8sak, int fd)
/* Set an application defined handle */ /* Set an application defined handle */
tx.meta.msdu_handle = i8sak->msdu_handle++; tx.meta.handle = i8sak->msdu_handle++;
/* This is a normal transaction, no special handling */ /* This is a normal transaction, no special handling */
tx.meta.msdu_flags.ack_tx = 0; tx.meta.flags.ackreq = 1;
tx.meta.msdu_flags.gts_tx = 0; tx.meta.flags.usegts = 0;
tx.meta.msdu_flags.indirect_tx = i8sak->indirect; tx.meta.flags.indirect = i8sak->indirect;
if (i8sak->indirect) if (i8sak->indirect)
{ {
@ -178,7 +178,7 @@ int i8sak_tx(FAR struct i8sak_s *i8sak, int fd)
tx.meta.ranging = IEEE802154_NON_RANGING; tx.meta.ranging = IEEE802154_NON_RANGING;
tx.meta.srcaddr_mode = IEEE802154_ADDRMODE_SHORT; tx.meta.srcmode = IEEE802154_ADDRMODE_SHORT;
memcpy(&tx.meta.destaddr, &i8sak->ep, sizeof(struct ieee802154_addr_s)); memcpy(&tx.meta.destaddr, &i8sak->ep, sizeof(struct ieee802154_addr_s));
/* Each byte is represented by 2 chars */ /* Each byte is represented by 2 chars */

View File

@ -142,7 +142,7 @@ void i8sak_scan_cmd(FAR struct i8sak_s *i8sak, int argc, FAR char *argv[])
i8sak_cmd_error(i8sak); i8sak_cmd_error(i8sak);
} }
scan.duration = 8; scan.duration = 7;
scan.chpage = i8sak->chpage; scan.chpage = i8sak->chpage;
/* Parse channel list */ /* Parse channel list */

View File

@ -197,8 +197,7 @@ void i8sak_tx_cmd(FAR struct i8sak_s *i8sak, int argc, FAR char *argv[])
wpanlistener_add_eventreceiver(&i8sak->wpanlistener, tx_eventcb, wpanlistener_add_eventreceiver(&i8sak->wpanlistener, tx_eventcb,
&eventfilter, (FAR void *)i8sak, true); &eventfilter, (FAR void *)i8sak, true);
ret = i8sak_tx(i8sak, fd);
ret = i8sak_tx(i8sak,fd);
if (ret < 0) if (ret < 0)
{ {
fprintf(stderr, "ERROR: Failed to transmit packet\n"); fprintf(stderr, "ERROR: Failed to transmit packet\n");