A portable electronic device is disclosed. The portable electronic device
includes a wireless transceiver, a processor coupled to the wireless
transceiver, a memory coupled to the processor and a program stored in
the memory and running on the processor. The program provides automatic
transitioning between a wireless infrastructure communication mode to an
ad-hoc communication mode. The infrastructure mode is used when a request
from a mobile device is received to access a communications network. The
ad-hoc mode is used when a request from the mobile device is received to
access resources on the portable electronic device.