create a lookup which asks database for configured community for this device

Additionally give a chance to add an community-entry to the database while the device is scanning.