Created
January 10, 2014 00:58
-
-
Save tejainece/8345099 to your computer and use it in GitHub Desktop.
TinyOS basic PPPRouter example. This does nothing useful. However, you can use it to check if you can ping your mote.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMPONENT=PppRouterC | |
PFLAGS += -DCC2420_DEF_CHANNEL=$(TOS_CHANNEL) | |
#PFLAGS += -Os | |
# use rpl | |
PFLAGS += -DRPL_ROUTING -DRPL_STORING_MODE -I$(LOWPAN_ROOT)/tos/lib/net/rpl | |
# and ppp | |
PFLAGS += -I$(TOSDIR)/lib/ppp | |
PFLAGS += -I$(TOSDIR)/lib/fragpool | |
# this works around fragmentation in the RX buffer pool | |
PFLAGS += -DPPP_HDLC_RX_FRAME_LIMIT=1 -DPPP_HDLC_TX_FRAME_LIMIT=8 | |
# Set this when you want to use statically assigned addresses. The stack will | |
# not use DHCP in that case. | |
PFLAGS += -DIN6_PREFIX=\"fec0::\" | |
include $(MAKERULES) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iprouting.h> | |
#include "ppp.h" | |
configuration PppRouterC { | |
} implementation { | |
components PppRouterP; | |
components MainC; | |
PppRouterP.Boot -> MainC; | |
components LedsC as LedsC; | |
PppRouterP.Leds -> LedsC; | |
components PppDaemonC; | |
PppRouterP.PppControl -> PppDaemonC; | |
components PppIpv6C; | |
PppDaemonC.PppProtocol[PppIpv6C.ControlProtocol] -> PppIpv6C.PppControlProtocol; | |
PppDaemonC.PppProtocol[PppIpv6C.Protocol] -> PppIpv6C.PppProtocol; | |
PppIpv6C.Ppp -> PppDaemonC; | |
PppIpv6C.LowerLcpAutomaton -> PppDaemonC; | |
PppRouterP.Ipv6LcpAutomaton -> PppIpv6C; | |
PppRouterP.PppIpv6 -> PppIpv6C; | |
PppRouterP.Ppp -> PppDaemonC; | |
components PlatformHdlcUartC as HdlcUartC; | |
PppDaemonC.HdlcUart -> HdlcUartC; | |
PppDaemonC.UartControl -> HdlcUartC; | |
components IPStackC, IPForwardingEngineP, IPPacketC; | |
IPForwardingEngineP.IPForward[ROUTE_IFACE_PPP] -> PppRouterP.IPForward; | |
PppRouterP.IPControl -> IPStackC; | |
PppRouterP.ForwardingTable -> IPStackC; | |
components StaticIPAddressTosIdC; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment