{"action":"created","issue":{"url":"https://api.github.com/repos/nkolban/esp32-snippets/issues/172","repository_url":"https://api.github.com/repos/nkolban/esp32-snippets","labels_url":"https://api.github.com/repos/nkolban/esp32-snippets/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/nkolban/esp32-snippets/issues/172/comments","events_url":"https://api.github.com/repos/nkolban/esp32-snippets/issues/172/events","html_url":"https://github.com/nkolban/esp32-snippets/issues/172","id":271413336,"number":172,"title":"Not able to connect the external Server with ESP32 (sampleclient.cpp program)","user":{"login":"vishnunaik","id":32255022,"avatar_url":"https://avatars0.githubusercontent.com/u/32255022?v=4","gravatar_id":"","url":"https://api.github.com/users/vishnunaik","html_url":"https://github.com/vishnunaik","followers_url":"https://api.github.com/users/vishnunaik/followers","following_url":"https://api.github.com/users/vishnunaik/following{/other_user}","gists_url":"https://api.github.com/users/vishnunaik/gists{/gist_id}","starred_url":"https://api.github.com/users/vishnunaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishnunaik/subscriptions","organizations_url":"https://api.github.com/users/vishnunaik/orgs","repos_url":"https://api.github.com/users/vishnunaik/repos","events_url":"https://api.github.com/users/vishnunaik/events{/privacy}","received_events_url":"https://api.github.com/users/vishnunaik/received_events","type":"User","site_admin":false},"labels":[{"id":475842271,"url":"https://api.github.com/repos/nkolban/esp32-snippets/labels/question","name":"question","color":"cc317c","default":true},{"id":697522254,"url":"https://api.github.com/repos/nkolban/esp32-snippets/labels/waiting","name":"waiting","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2017-11-06T09:46:19Z","updated_at":"2017-11-18T21:14:44Z","closed_at":null,"author_association":"NONE","body":"We entered our service UUID and Characteristic UUID of external server in sampleclient.cpp program. After flashing the program to ESP32 we are unable to search or connect the external server, we are getting error in our debug window as follows.  \r\n![debug_window_output](https://user-images.githubusercontent.com/32255022/32434870-5529ac50-c305-11e7-8a96-9f10568f193b.png)\r\nThank you very much."},"comment":{"url":"https://api.github.com/repos/nkolban/esp32-snippets/issues/comments/345471745","html_url":"https://github.com/nkolban/esp32-snippets/issues/172#issuecomment-345471745","issue_url":"https://api.github.com/repos/nkolban/esp32-snippets/issues/172","id":345471745,"user":{"login":"nkolban","id":3421732,"avatar_url":"https://avatars0.githubusercontent.com/u/3421732?v=4","gravatar_id":"","url":"https://api.github.com/users/nkolban","html_url":"https://github.com/nkolban","followers_url":"https://api.github.com/users/nkolban/followers","following_url":"https://api.github.com/users/nkolban/following{/other_user}","gists_url":"https://api.github.com/users/nkolban/gists{/gist_id}","starred_url":"https://api.github.com/users/nkolban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkolban/subscriptions","organizations_url":"https://api.github.com/users/nkolban/orgs","repos_url":"https://api.github.com/users/nkolban/repos","events_url":"https://api.github.com/users/nkolban/events{/privacy}","received_events_url":"https://api.github.com/users/nkolban/received_events","type":"User","site_admin":false},"created_at":"2017-11-18T21:14:44Z","updated_at":"2017-11-18T21:14:44Z","author_association":"OWNER","body":"ARGHHH!!!   I'm an idiot (and lots of people across the world are now nodding).  I have managed to confuse myself between what services are available within a BLE device and what services are advertised by the BLE device.  Now that you point it out it seems obvious so a HUGE thank you.\r\n\r\nWhen we run a BLE scan from the ESP32, we are receiving advertising packets from the BLE partners.  The ESP32 logs/displays/returns what ever the BLE partner chooses to advertise.  Now, put that to one side.  When we CONNECT to a BLE partner, we can ask it \"What services and characteristics do you offer?\".   These two interactions are NOT the same (and that's where I messed up).  An advertisement is what ever a BLE device broadcasts for others to find.  A listing of exposed services and characteristics is what a BLE partner claims to be able to support/offer WHEN the partner ACTUALLY connects to it.\r\n\r\nWhen running the Linux scan/examination tool ... we \"scanned\" for devices and the tool showed the device.  We then ran \"info\" against the device and say the services and their characteristics.  Where I goofed was thinking that the return from \"info\" was the result from the scan ... it wasn't.  It was the result from ACTUALLY connecting to the device and asking it what it offered.\r\n\r\nThe working hypothesis is that the BLE target device is \"advertising\" a 16 bit UUID but offering up a 128 bit UUID which can't be deduced from the 16 bit value.  Obviously I don't like these hypothesis because it pushes the issue onto a third party device (the BLE partner) and I always assume that if something is not working then its because of MY failure to understand/code and not something inherent in the partner.  However, now that mr @chegewara has pointed it out clearly, nRFConnect is saying \"I found a 16 bit UUID\" (which is what ESP32 also claims) HOWEVER, the actual partner device is advertising a 128bit UUID."}}
{"actor":{"display_login":"nkolban"}}