An electronic system including a mobile device that communicates with a reader device. In one embodiment, the mobile device may be configured as a mobile phone and the reader device may be configured as an electronic reader associated with an electronic lock. One or more devices in the system may determine the position of the mobile device in relation to the reader device, and cause an electronic lock or another type of access control device to perform a selected function based at least in part on the position of the mobile device in relation to the reader device.