| 386 | |
| 387 | |
| 388 | bool ::ARFCNManager::tune(int wARFCN) |
| 389 | { |
| 390 | // convert ARFCN number to a frequency |
| 391 | unsigned rxFreq = uplinkFreqKHz(gBTS.band(),wARFCN); |
| 392 | unsigned txFreq = downlinkFreqKHz(gBTS.band(),wARFCN); |
| 393 | // tune rx |
| 394 | int status = sendCommand("RXTUNE",rxFreq); |
| 395 | if (status!=0) { |
| 396 | LOG(ALERT) << "RXTUNE failed with status " << status; |
| 397 | return false; |
| 398 | } |
| 399 | // tune tx |
| 400 | status = sendCommand("TXTUNE",txFreq); |
| 401 | if (status!=0) { |
| 402 | LOG(ALERT) << "TXTUNE failed with status " << status; |
| 403 | return false; |
| 404 | } |
| 405 | // done |
| 406 | mARFCN=wARFCN; |
| 407 | return true; |
| 408 | } |
| 409 | |
| 410 | |
| 411 | |