日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

移动基站问题

發(fā)布時間:2023/12/29 综合教程 32 生活家
生活随笔 收集整理的這篇文章主要介紹了 移动基站问题 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1.獲取附近基站的信息:

package myapplication.com.myapp.activity;

import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.telephony.CellInfo;
import android.telephony.CellInfoCdma;
import android.telephony.CellInfoGsm;
import android.telephony.CellInfoLte;
import android.telephony.TelephonyManager;
import android.telephony.gsm.GsmCellLocation;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import myapplication.com.myapp.R;
import myapplication.com.myapp.adapter.MyAdapter;
import myapplication.com.myapp.entity.jizhanBean;

public class JizhanFujin_Activity extends AppCompatActivity {

    TelephonyManager telephonyManager;
    List<jizhanBean> datas;
    ListView listView;
    ImageView image_back;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_jizhan_fujin);
        initview();
        List<CellInfo> cellInfoList = telephonyManager.getAllCellInfo();

        if(cellInfoList.size()>0){
            for (CellInfo cellInfo : cellInfoList) {
        // 這里輸出附近基站信息<1> System.out.println("*****@ALL"+cellInfo.toString()); }
        // 判斷GSM基站信息 if(cellInfo instanceof CellInfoGsm){ } } } } } public void initview(){ datas=new ArrayList<>(); listView= (ListView) findViewById(R.id.listview); telephonyManager = (TelephonyManager) JizhanFujin_Activity.this.getSystemService(Context.TELEPHONY_SERVICE); image_back= (ImageView) findViewById(R.id.image_back); image_back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); } /** * * */ // String operator = telephonyManager.getNetworkOperator(); // /**通過operator獲取 MCC 和MNC */ // int mcc = Integer.parseInt(operator.substring(0, 3)); // int mnc = Integer.parseInt(operator.substring(3)); // GsmCellLocation location = (GsmCellLocation) telephonyManager.getCellLocation(); // // // /**通過GsmCellLocation獲取中國移動和聯(lián)通 LAC 和cellID */ // int lac = location.getLac(); // int cellid = location.getCid(); // // 開始************* // StringBuilder str = new StringBuilder(); /* * * * * **/ }

2.

<1>輸出附近所有信息為:

這里有個mRegistered=YES 表示當(dāng)前服務(wù)基站?

<2>

LTE物理小區(qū)標(biāo)識(PCI): 0-503
GSM Cell ID (CI): 0-65535
PCI: 物理小區(qū)標(biāo)識,用來區(qū)分來自不同LTE小區(qū)的信號,類似UMTS中的PCS。
CI: 小區(qū)標(biāo)識,網(wǎng)絡(luò)中小區(qū)的編號,與MCC,MNC及LAC號組合得到小區(qū)全球識別碼,用來在全球范圍內(nèi)唯一識別某一小區(qū)。

MCC:移動國家號碼,由3位數(shù)字組成,唯一地識別移動用戶所屬的國家。我國為460。

MNC:移動網(wǎng)號,由兩位數(shù)字組成,用于識別移動用戶所歸屬的移動網(wǎng)。在移動為00,聯(lián)通為01

<2>

TAC LTE的追蹤區(qū)

LAC GSM的位置區(qū)
一般LTE的TAC配置的就是區(qū)域內(nèi)GSM的LAC,如果配置不一致會導(dǎo)致呼叫失敗無法接通

<MCC,MNC為固定值那么這里L(fēng)AC用于區(qū)分標(biāo)示基站唯一標(biāo)示的話,見下面的輸出信息:只有當(dāng)mRegistered=YES時才能得到TAC,那樣怎么得到附近所有基站標(biāo)示?>

PCI:504個PCI分成168組,每組包含連續(xù)的3個PCI, 同eNodeB的三個小區(qū)的PCI要求來自同一組,全網(wǎng)復(fù)用。
CI: 沒有特殊限制條件,可在0-65535中任意取值,但在同一個LAC下不能重復(fù)。

<!--而 if(cellInfo instanceof CellInfoCdma)代碼這里,能找到cellinfoLTE,CDMA,GSM,卻找不到移動的TD-SCDMA?-->


  CellInfoLte:{mRegistered=YES mTimeStampType=oem_ril mTimeStamp=1267052294487436ns CellIdentityLte:{ mMcc=460 mMnc=0 mCi=219105291 mPci=133 mTac=20951}CellSignalStrengthLte: ss=23 rsrp=-93 rsrq=-6 rssnr=2147483647 cqi=2147483647 ta=2147483647}
  CellInfoLte:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052294487436ns CellIdentityLte:{ mMcc=2147483647 mMnc=2147483647 mCi=2147483647 mPci=127 mTac=2147483647}CellSignalStrengthLte: ss=12 rsrp=-104 rsrq=-4 rssnr=2147483647 cqi=2147483647 ta=2147483647}
 CellInfoLte:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052294487436ns CellIdentityLte:{ mMcc=2147483647 mMnc=2147483647 mCi=2147483647 mPci=44 mTac=2147483647} CellSignalStrengthLte: ss=12 rsrp=-126 rsrq=-20 rssnr=2147483647 cqi=2147483647 ta=2147483647}
  CellInfoLte:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052294487436ns CellIdentityLte:{ mMcc=2147483647 mMnc=2147483647 mCi=2147483647 mPci=241 mTac=2147483647} CellSignalStrengthLte: ss=18 rsrp=-92 rsrq=-5 rssnr=2147483647 cqi=2147483647 ta=2147483647}
   CellInfoLte:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052294487436ns CellIdentityLte:{ mMcc=2147483647 mMnc=2147483647 mCi=2147483647 mPci=0 mTac=2147483647} CellSignalStrengthLte: ss=31 rsrp=0 rsrq=0 rssnr=2147483647 cqi=2147483647 ta=2147483647}
   CellInfoGsm:{mRegistered=YES mTimeStampType=oem_ril mTimeStamp=1267052311836811ns CellIdentityGsm:{ mMcc=460 mMnc=0 mLac=20951 mCid=38417} CellSignalStrengthGsm: ss=13 ber=99}
  CellInfoGsm:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052311836811ns CellIdentityGsm:{ mMcc=460 mMnc=0 mLac=20951 mCid=38411} CellSignalStrengthGsm: ss=16 ber=99}
  CellInfoGsm:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052311836811ns CellIdentityGsm:{ mMcc=460 mMnc=0 mLac=20951 mCid=38413} CellSignalStrengthGsm: ss=18 ber=99}
 CellInfoGsm:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052311836811ns CellIdentityGsm:{ mMcc=460 mMnc=0 mLac=20951 mCid=46942} CellSignalStrengthGsm: ss=13 ber=99}
  CellInfoGsm:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052311836811ns CellIdentityGsm:{ mMcc=460 mMnc=0 mLac=20951 mCid=3115} CellSignalStrengthGsm: ss=16 ber=99}
  CellInfoGsm:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052311836811ns CellIdentityGsm:{ mMcc=0 mMnc=0 mLac=0 mCid=-1} CellSignalStrengthGsm: ss=12 ber=99}
  CellInfoGsm:{mRegistered=NO mTimeStampType=oem_ril mTimeStamp=1267052311836811ns CellIdentityGsm:{ mMcc=460 mMnc=0 mLac=20951 mCid=11562} CellSignalStrengthGsm: ss=11 ber=99}
  

3.是不是有其他什么方法實現(xiàn)?能夠得到附近基站的標(biāo)識?


今天多一點積累,明天少一分煩惱

總結(jié)

以上是生活随笔為你收集整理的移动基站问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。