simple code that allows discovery and connection to other devices.