久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='ymFbG'></bdo><ul id='ymFbG'></ul>
    <legend id='ymFbG'><style id='ymFbG'><dir id='ymFbG'><q id='ymFbG'></q></dir></style></legend>

    <i id='ymFbG'><tr id='ymFbG'><dt id='ymFbG'><q id='ymFbG'><span id='ymFbG'><b id='ymFbG'><form id='ymFbG'><ins id='ymFbG'></ins><ul id='ymFbG'></ul><sub id='ymFbG'></sub></form><legend id='ymFbG'></legend><bdo id='ymFbG'><pre id='ymFbG'><center id='ymFbG'></center></pre></bdo></b><th id='ymFbG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ymFbG'><tfoot id='ymFbG'></tfoot><dl id='ymFbG'><fieldset id='ymFbG'></fieldset></dl></div>

      <small id='ymFbG'></small><noframes id='ymFbG'>

      <tfoot id='ymFbG'></tfoot>
      1. 核心藍牙 - 范圍內設備的持續 RSSI 更新

        Core Bluetooth - constant RSSI updates of in-range devices(核心藍牙 - 范圍內設備的持續 RSSI 更新)
        • <bdo id='0n6pz'></bdo><ul id='0n6pz'></ul>

            <small id='0n6pz'></small><noframes id='0n6pz'>

            <legend id='0n6pz'><style id='0n6pz'><dir id='0n6pz'><q id='0n6pz'></q></dir></style></legend>

              <i id='0n6pz'><tr id='0n6pz'><dt id='0n6pz'><q id='0n6pz'><span id='0n6pz'><b id='0n6pz'><form id='0n6pz'><ins id='0n6pz'></ins><ul id='0n6pz'></ul><sub id='0n6pz'></sub></form><legend id='0n6pz'></legend><bdo id='0n6pz'><pre id='0n6pz'><center id='0n6pz'></center></pre></bdo></b><th id='0n6pz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0n6pz'><tfoot id='0n6pz'></tfoot><dl id='0n6pz'><fieldset id='0n6pz'></fieldset></dl></div>
                <tbody id='0n6pz'></tbody>
              <tfoot id='0n6pz'></tfoot>

                  本文介紹了核心藍牙 - 范圍內設備的持續 RSSI 更新的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我剛開始使用 iOS 的核心藍牙框架,我正在開發一個需要不斷掃描 BLE 設備的應用程序,以便我可以每分鐘左右檢索它們的 RSSI 編號.

                  I just started with the core bluetooth framework for iOS and I'm developing an app that needs to constantly scan for BLE devices so that I can retrieve their RSSI number every minute or so.

                  目前我有:

                  manager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
                  NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:FALSE], CBCentralManagerScanOptionAllowDuplicatesKey, nil];
                  [manager scanForPeripheralsWithServices:nil options:options];
                  

                  這將啟動我的應用程序掃描 BLE 設備并在發現設備時調用此委托方法:

                  this starts my app scanning for BLE devices and calls this delegate method when a device is discovered:

                  - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI {
                      NSLog(@"Did discover peripheral. peripheral: %@ rssi: %@, UUID: %@ advertisementData: %@ ", peripheral, RSSI, peripheral.UUID, advertisementData);
                      //Do something when a peripheral is discovered.
                  
                      rssiLabel.text = [RSSI stringValue];
                  
                      [manager retrievePeripherals:[NSArray arrayWithObject:(id)peripheral.UUID]];}
                  

                  這個方法可以得到我可以顯示的外圍設備的 RSSI 號碼.最后一行然后調用這個委托方法:

                  this method gets me the peripheral's RSSI number which i can display. The last line then calls this delegate method:

                  - (void) centralManager:(CBCentralManager *)central didRetrievePeripherals:(NSArray *)peripherals {
                  
                      NSLog(@"Currently known peripherals :");
                      int i = 0;
                      for(CBPeripheral *peripheral in peripherals) {
                          NSLog(@"[%d] - peripheral : %@ with UUID : %@",i,peripheral,peripheral.UUID);
                  
                      }
                  
                       NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:FALSE], CBCentralManagerScanOptionAllowDuplicatesKey, nil];
                       [manager scanForPeripheralsWithServices:nil options:options];
                  
                  }
                  

                  這段代碼似乎在工作,并且大約每 1 分鐘掃描一次,但我不知道它為什么工作......

                  This code seems to be working and doing a scan roughly every 1 minute, but I don't exactly know why it working...

                  關于核心藍牙的文檔非常少,所以如果有人對如何做到這一點有任何想法,或者有更好的方法來完成我想要完成的工作,我將不勝感激!

                  The documentation on core bluetooth is pretty sparse so if anyone has any idea on how to do this, or has a better way to do what I'm trying to accomplish I'd appreciate the help!

                  推薦答案

                  你試過把掃描選項改成YES嗎?

                  Have you tried changing the scan option to YES?

                  NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber  numberWithBool:YES], CBCentralManagerScanOptionAllowDuplicatesKey, nil];
                  [manager scanForPeripheralsWithServices:nil options:options];
                  

                  如果您這樣做,您的 iPhone 看到的每個廣告包都會收到您的didDiscoverPeripheral"回調,通常大約每 100 毫秒(盡管我發現對于同一設備,此回調時間變化很大).這包括它看到的每個設備的 RSSI.

                  If you do this you will get your "didDiscoverPeripheral" callback with every ad packet that is seen by your iPhone, which would normally be about every 100ms (although I see this callback timing varying a lot for the same device). This includes the RSSI of each device it sees.

                  這應該比您大約 1 分鐘的更新速度快很多.

                  This should be a lot faster than your ~1 minute update rate.

                  這篇關于核心藍牙 - 范圍內設備的持續 RSSI 更新的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))

                • <i id='NzdS4'><tr id='NzdS4'><dt id='NzdS4'><q id='NzdS4'><span id='NzdS4'><b id='NzdS4'><form id='NzdS4'><ins id='NzdS4'></ins><ul id='NzdS4'></ul><sub id='NzdS4'></sub></form><legend id='NzdS4'></legend><bdo id='NzdS4'><pre id='NzdS4'><center id='NzdS4'></center></pre></bdo></b><th id='NzdS4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='NzdS4'><tfoot id='NzdS4'></tfoot><dl id='NzdS4'><fieldset id='NzdS4'></fieldset></dl></div>

                  <small id='NzdS4'></small><noframes id='NzdS4'>

                  <legend id='NzdS4'><style id='NzdS4'><dir id='NzdS4'><q id='NzdS4'></q></dir></style></legend>
                      <tbody id='NzdS4'></tbody>

                          • <bdo id='NzdS4'></bdo><ul id='NzdS4'></ul>
                          • <tfoot id='NzdS4'></tfoot>
                            主站蜘蛛池模板: 日韩视频一区在线观看 | 中文字幕一区二区三区四区不卡 | 欧美国产激情 | 香蕉大人久久国产成人av | 日一日操一操 | 国产一区在线免费 | 国产成都精品91一区二区三 | 在线观看免费毛片 | 一级片免费视频 | 久久国产一区二区三区 | 亚洲成人综合在线 | 天天艹逼网 | 国产精品久久久久久影视 | 欧美日韩国产在线观看 | 成人在线免费电影 | 亚洲毛片在线观看 | 国产日韩欧美一区二区 | 亚洲欧美日韩电影 | 视频二区国产 | av男人的天堂在线 | 欧美伊人| 黄色一级在线播放 | 欧美一级久久久猛烈a大片 日韩av免费在线观看 | 欧美精品成人一区二区三区四区 | 精品欧美一区二区在线观看欧美熟 | 365夜爽爽欧美性午夜免费视频 | 91精品国产一区 | 精品国产一区二区三区性色av | 国产一二区视频 | 成人精品毛片 | 美国一级片在线观看 | 五月天天丁香婷婷在线中 | 6996成人影院网在线播放 | 四虎网站在线观看 | 国产精品视频网 | av 一区二区三区 | 羞视频在线观看 | 99精品视频在线 | 国户精品久久久久久久久久久不卡 | 成人国产在线视频 | 国产99精品 |