{"action":"closed","issue":{"url":"https://api.github.com/repos/Mango-kid/maciot/issues/1","repository_url":"https://api.github.com/repos/Mango-kid/maciot","labels_url":"https://api.github.com/repos/Mango-kid/maciot/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Mango-kid/maciot/issues/1/comments","events_url":"https://api.github.com/repos/Mango-kid/maciot/issues/1/events","html_url":"https://github.com/Mango-kid/maciot/issues/1","id":409592197,"node_id":"MDU6SXNzdWU0MDk1OTIxOTc=","number":1,"title":"Cannot Run Bluetooth Scanner on MacIoT Board","user":{"login":"mso797","id":6619587,"node_id":"MDQ6VXNlcjY2MTk1ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/6619587?v=4","gravatar_id":"","url":"https://api.github.com/users/mso797","html_url":"https://github.com/mso797","followers_url":"https://api.github.com/users/mso797/followers","following_url":"https://api.github.com/users/mso797/following{/other_user}","gists_url":"https://api.github.com/users/mso797/gists{/gist_id}","starred_url":"https://api.github.com/users/mso797/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mso797/subscriptions","organizations_url":"https://api.github.com/users/mso797/orgs","repos_url":"https://api.github.com/users/mso797/repos","events_url":"https://api.github.com/users/mso797/events{/privacy}","received_events_url":"https://api.github.com/users/mso797/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-02-13T02:18:31Z","updated_at":"2019-02-13T03:14:40Z","closed_at":"2019-02-13T03:14:39Z","author_association":"NONE","body":"Hi,\r\n\r\nI'm trying to run the following code on my MacIoT board, but I keep on running into an error.\r\n/*\r\n   Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleScan.cpp\r\n   Ported to Arduino ESP32 by Evandro Copercini\r\n*/\r\n\r\n#include <BLEDevice.h>\r\n#include <BLEUtils.h>\r\n#include <BLEScan.h>\r\n#include <BLEAdvertisedDevice.h>\r\n\r\nint scanTime = 5; //In seconds\r\nBLEScan* pBLEScan;\r\n\r\nclass MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {\r\n    void onResult(BLEAdvertisedDevice advertisedDevice) {\r\n      Serial.printf(\"Advertised Device: %s \\n\", advertisedDevice.toString().c_str());\r\n    }\r\n};\r\n\r\nvoid setup() {\r\n  Serial.begin(115200);\r\n  Serial.println(\"Scanning...\");\r\n\r\n  BLEDevice::init(\"\");\r\n  pBLEScan = BLEDevice::getScan(); //create new scan\r\n  pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks());\r\n  pBLEScan->setActiveScan(true); //active scan uses more power, but get results faster\r\n  pBLEScan->setInterval(100);\r\n  pBLEScan->setWindow(99);  // less or equal setInterval value\r\n}\r\n\r\nvoid loop() {\r\n  // put your main code here, to run repeatedly:\r\n  BLEScanResults foundDevices = pBLEScan->start(scanTime, false);\r\n  Serial.print(\"Devices found: \");\r\n  Serial.println(foundDevices.getCount());\r\n  Serial.println(\"Scan done!\");\r\n  pBLEScan->clearResults();   // delete results fromBLEScan buffer to release memory\r\n  delay(2000);\r\n}\r\n\r\nHere is the error that I am getting: #error \"C++ exception handling must be enabled within make menuconfig. See Compiler Options > Enable C++ Exceptions.\"\r\n\r\nFrom my understanding, the Arduino IDE does not have this option.\r\n\r\nAny help would be greatly appreciated!"}}
{"actor":{"display_login":"mso797"}}