Merged in antmerlino/apps/i8sak-fixes (pull request #119)

i8sak: Channel setting is now saved locally, so when performing a startpan or assoc, the channel previously set is still used, even though the MAC layer gets reset.  Also fixes a few build issues

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Anthony Merlino 2017-11-03 16:23:42 +00:00 committed by Gregory Nutt
parent a7157d0e3c
commit 115dff06e7
2 changed files with 4 additions and 3 deletions

View File

@ -171,7 +171,7 @@ void i8sak_get_cmd(FAR struct i8sak_s *i8sak, int argc, FAR char *argv[])
break;
}
}
#if CONFIG_NET_6LOWPAN
#ifdef CONFIG_NET_6LOWPAN
else if (strcmp(argv[argind], "ep_port") == 0)
{
printf("i8sak: Endpoint Port: %d\n", NTOHS(i8sak->ep_in6addr.sin6_port));

View File

@ -145,7 +145,6 @@ void i8sak_set_cmd(FAR struct i8sak_s *i8sak, int argc, FAR char *argv[])
fprintf(stderr, "ERROR: invalid mode. Options: s|e\n");
i8sak_cmd_error(i8sak);
}
}
else if (strcmp(argv[argind], "ep_saddr") == 0)
{
@ -156,8 +155,8 @@ void i8sak_set_cmd(FAR struct i8sak_s *i8sak, int argc, FAR char *argv[])
{
i8sak_update_ep_ip(i8sak);
}
}
#endif
}
else if (strcmp(argv[argind], "ep_eaddr") == 0)
{
i8sak_str2eaddr(argv[argind + 1], i8sak->ep_addr.eaddr);
@ -214,6 +213,7 @@ void i8sak_set_cmd(FAR struct i8sak_s *i8sak, int argc, FAR char *argv[])
{
u.attr.phy.chan = i8sak_str2luint8(argv[argind + 1]);
ieee802154_setchan(fd, u.attr.phy.chan);
i8sak->chan = u.attr.phy.chan;
}
else if (strcmp(argv[argind], "panid") == 0)
{
@ -249,6 +249,7 @@ void i8sak_set_cmd(FAR struct i8sak_s *i8sak, int argc, FAR char *argv[])
{
u.attr.phy.chan = i8sak_str2luint8(argv[argind + 1]);
sixlowpan_setchan(fd, i8sak->ifname, u.attr.phy.chan);
i8sak->chan = u.attr.phy.chan;
}
else if (strcmp(argv[argind], "panid") == 0)
{