<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21423/receiving-onclientconnectionstate---status-133-on-custom-android-ble-app-that-uses-nus-service</link><description>Hello, 
 I am receiving the above error on Android BLE app while connecting to my pca10040 based board, and I developed this app with nRF Toolbox as a reference. 
 I am testing this on multiple Android versions and devices, out of which I dont face</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Apr 2017 14:18:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21423/receiving-onclientconnectionstate---status-133-on-custom-android-ble-app-that-uses-nus-service" /><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84036?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2017 14:18:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5bd7827-ec90-4dbb-9305-717cc192ff70</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@vivek: Yes, the source code for the nRF-Toolbox application for Android containt the nRF UART app which connects with the ble_app_uart example and uses the TX and RX characteristics in the Nordic UART Service.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84027?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2017 08:40:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebc4441d-685c-4f66-bdde-c704da3a7399</guid><dc:creator>Vivek</dc:creator><description>&lt;p&gt;@Bjørn Spockeli:
Sir, I have used following sources for my application:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;profile:
-BleManager,
-BleManagerCallbacks,
-BleProfileService&lt;/li&gt;
&lt;li&gt;uart:
-UARTService
-UARTManager,
-UARTManagerCallbacks,
-UARTInterface&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The above source code i have taken from &lt;strong&gt;nRF-Toolbox&lt;/strong&gt; .
So i wanted to know is these source are enough for ble Connection, RX and TX services.?&lt;/p&gt;
&lt;p&gt;I will be waiting for your feedback on this..
Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84028?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 12:01:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d55f0fd-971d-45ac-aa63-16b9609081a2</guid><dc:creator>Vivek</dc:creator><description>&lt;p&gt;Yes I&amp;#39;m able to connect with other phones except Mi phones with OS version higher than 5.0 . As these control is already available in nRF Toolbox source code.
I have used &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Blinky"&gt;Android-nRF-Blinky&lt;/a&gt; as a base for my application.&lt;/p&gt;
&lt;p&gt;Is there any solution to fix issue in connection with reference to Mi phones.?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84030?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 11:23:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecd49830-b182-49a6-9438-0cf674fecc4a</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;AFIK you should be able to connect without scanning first if you use getRemoteDevice(String address)  with the MAC address as the argument and then you&amp;#39;ll get the BluetoothDevice and then you can call connectGatt() to connect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84029?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 11:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dba4abf-d374-4616-ab07-58c20193efc2</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;Another inputs, by referrring &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Blinky"&gt;nrf blinky&amp;#39;s&lt;/a&gt; source, we also enabled scanning on modified app but we have the same results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84018?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 07:26:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d6ebe82-7e28-4564-aea5-83a2b037df8f</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;When I first try to pair with the device, it sends connect req but it immediately disconnects after that with error code 13 shown on pca10040, maybe because it was Bluetooth connection without Gatt not actual BLE. nrf-Toolbox unmodified code connects to the device with no problem.&lt;/p&gt;
&lt;p&gt;One more thing, we have disabled scanning in our modified app because we have the MAC address of the device available. So do we still have to scan?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84019?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 07:20:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8c8d0e8-fa5b-448d-8fdb-ad6494549df9</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Just to clarify, if you first try to pair with the device, which is not supported by the device, through the phones settings, then you&amp;#39;re able to successfully connect? Yes, please try with the unmodified nRF Toolbox app and see if you also have to try to pair before you can successfully connect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84021?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 07:13:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9d9f695-d74a-4136-8ce9-3e2ff30a68f4</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;I will again check with the nrf-Toolbox unmodified app&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84022?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 06:58:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f3d0ee9-7a0a-4edd-8b74-baf75ee2297d</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;I connected through the app we built on top of nrf-toobox, obtained from &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Toolbox"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84031?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 06:51:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32e51a11-33b4-43d2-b1ae-4b1785593e78</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@Anjali: When you say &lt;em&gt;we tried connecting to the board through the app, then it connects succesfully&lt;/em&gt;, do you mean that you used the unaltered nRF Toolbox application (either  Google Play or unmodified source from GitHub?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84024?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 06:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17a012b9-0e0b-417f-ab5c-82d3b7d3850d</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;We are observing this issue on another phone as well. We can add the logs out of it shortly. But my point is if this is not limited to only a single phone, then is there any way there is  missed out something from the BLE_manager? We are using the uart manager from nrf_toolbox, so whatever is managed from uart mnanger to ble manager, we haven&amp;#39;t looked at it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84026?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 06:30:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80896486-f6ee-4ffe-9ca0-9c229a2cea3e</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;Hi, I am adding the observations on Vivek&amp;#39;s behalf:&lt;/p&gt;
&lt;p&gt;I have put logs in function on_ble_event(), in cases BLE_GAP_EVT_CONNECTED and BLE_GAP_EVT_DISCONNECTED, but I do not receive those logs in the case I do not see the connect request on sniffer. So as you suggested the problem might be in the phone; But that is not all.&lt;/p&gt;
&lt;p&gt;We went into the phone&amp;#39;s settings, we tried to pair the pca10040 fromthere manually (which will fail ofcourse), and after that we tried connecting to the board through the app, then it connects succesfully. We observed all the logs in sniffer as well as on pca10040 according to the working phones sniffer I have attached. We have tried this multiple times, and it is confirmed that if we try to pair manually in device&amp;#39;s settings, and then try to connect through the app, it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84020?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 06:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4ae4dff-122d-4ff0-ac7b-75505a172715</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Yes, if you do not get any BLE events from the SoftDevice while you attempt to connect using the Mi Redme 3s phone in addition to the fact that you do not see any connection request on the sniffer trace, then it suggests that the issue lies with the Mi Redme 3s phone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84032?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 19:27:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:526a248e-1688-448d-9783-428278d39481</guid><dc:creator>Vivek</dc:creator><description>&lt;p&gt;Yes that&amp;#39;s true it should show up in the sniffer log, but the main problem is Mi phone is not able to send connection request, whereas others phone sends connection request..!
I will post the logs by debugging on pca10040 shortly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84033?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 14:32:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5ba21a6-0acb-492f-992a-7e47afb0709d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;If the Mi Redme 3s is sending a connection request, then it should show up in the sniffer log like the other phones. Do you have access to a Frontline/Elisys sniffer or similar? That way we could verify that the connection request is actually sent.  Are you able to debug the application on the PCA10040 board? If yes, are any BLE events propagated to the application, e.g. BLE_GAP_EVT_CONNECTED or BLE_GAP_EVT_DISCONNECTED?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84023?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 11:39:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd939536-c055-4da7-bbba-f7c3759a89b2</guid><dc:creator>Vivek</dc:creator><description>&lt;p&gt;Hi Bjorn,  Thanks for your prompt reply. As you correctly mentioned we are not able to see connection request being send when we try it through Mi phone. When we are executing Same thing from some other phone, We are able to see connection request packet.
So we are not sure why it is showing different behavior as far as Mi phone is concerned. Any help and guidance on this is appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84025?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 11:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6981c5c9-b308-48a3-a11c-0e9fa4975ec4</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@anjali: I cannot see any connection request in the mi_logs.zip capture, its only advertisment packets and scan requests/responses. Are you sure that you captured the connection attempt?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84034?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 10:31:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0796826-959a-4da6-9959-85af4acd051a</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;I have edited the question with logs obtained from sniffer on windows machine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84037?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2017 08:09:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4b90f11-c9d7-4bad-a5a6-6fdd06e0aeb9</guid><dc:creator>Vivek</dc:creator><description>&lt;p&gt;I am sorry to say this but nrf Sniffer is the most painful tool I have tried to work with. I have a linux machine so I followed the tutorial posted on:
&lt;a href="https://devzone.nordicsemi.com/blogs/750/ble-sniffer-in-linux-using-wireshark/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But after installation connection to sniffer is not successful:
Could not find device
Sniffer device list[]:&lt;/p&gt;
&lt;p&gt;So I also tried the link: &lt;a href="https://github.com/vshymanskyy/BLESniffer_Python"&gt;github.com/.../BLESniffer_Python&lt;/a&gt;
Which is posted in one of the comments. But the error it throws is:
Sniffer board is not responding.
Do you have any pointers on how to make this work on Linux?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service</title><link>https://devzone.nordicsemi.com/thread/84035?ContentTypeID=1</link><pubDate>Wed, 19 Apr 2017 10:52:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0133a20c-5299-48d5-87e7-c79cbbc63242</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Can you provide a sniffer trace of the communication between the nRF52 and the Xiaomi phone?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>