Patent ID: 7796604

Claim:
An electronic device comprising: a search unit configured to search wireless communication devices for each of plural channels provided for establishing an ad hoc network; a measuring unit configured to measure a receiving level of wireless signals received from the devices found by the search; an allocation unit configured to generate an allocation result for the channels through which the wireless signals are received from the devices by adding a predetermined weight to each of the channels based on a strength of the measured receiving level of the wireless signals; a calculating unit configured to calculate a radio interference power for each of the channels based on the allocation result obtained by the allocation unit, the calculating unit calculating the radio interference power of a channel X using a relationship: (R x *C x )+(R x−1 *C x−1 )+(R x−2 *C x−2 )+(R x−3 *C x−3 )+(R x−4 *C x−4 )+(R x+1 *C x+1 )+(R x+2 *C x+2 )+(R x+3 *C x+3 )+(R x+4 *C x+4 ), where R is the allocation result, the allocation result increasing as the strength of the measured receiving level increases, and C is a predetermined weight based on a channel weighting table, the weight being larger as a frequency draws closer to the channel X; and an establishing unit configured to select the channel having a smallest radio interference power as calculated by the calculating unit and establish the ad hoc network for the selected channel.