Skip to content

Commit

Permalink
added shell_command module to print ifconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelsearch committed Oct 10, 2017
1 parent ff58423 commit 56716bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/javascript/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CFLAGS += -DTHREAD_STACKSIZE_MAIN=4096 -g -DGCOAP_STACK_SIZE=2560
export JERRYHEAP=7

USEMODULE += js
USEMODULE += shell_commands

USEMODULE += gnrc_netdev_default
USEMODULE += auto_init_gnrc_netif
Expand Down
7 changes: 7 additions & 0 deletions examples/javascript/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ char script[2048];
#define MAIN_QUEUE_SIZE (4)
static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];

/* import "ifconfig" shell command, used for printing addresses */
extern int _netif_config(int argc, char **argv);

void js_start(event_t *unused)
{
(void)unused;
Expand Down Expand Up @@ -78,6 +81,10 @@ int main(void)
puts("waiting for network config");
xtimer_sleep(3);

/* print network addresses */
puts("Configured network interfaces:");
_netif_config(0, NULL);

/* register to LWM2M server */
puts("initializing coap, registering at lwm2m server");
lwm2m_init();
Expand Down

0 comments on commit 56716bb

Please sign in to comment.