Support for platform-specific functionality added

in the router code, the serial implementation is dependent on whether
the build happens on raspberry pi, or on another system.