A mobile station is used to open doors of buildings and vehicles instead of a dedicated physical key. The mobile station is configured to provide the operating power to the lock without a power cord. A mobile station app is then configured to communicate with the lock via a short-range wireless communication connection, and open and close the lock. This can provide an electronic software-based key and lock system that is cheaper and easier to use than the physical key.