<?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>DOMException: GATT operation not permitted.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91786/domexception-gatt-operation-not-permitted</link><description>Hi! 
 I used the next code from ready JS example from Chrome WEB bluetooth API to send bytes to BLE app UART example. 
 Connection is established ok. 
 But I can&amp;#39;t send data from function due to error: DOMException: GATT operation not permitted. 
 Please</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Jan 2023 22:47:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91786/domexception-gatt-operation-not-permitted" /><item><title>RE: DOMException: GATT operation not permitted.</title><link>https://devzone.nordicsemi.com/thread/404205?ContentTypeID=1</link><pubDate>Tue, 10 Jan 2023 22:47:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26363175-4a51-4f09-901b-5fdedf92d318</guid><dc:creator>Filip1122</dc:creator><description>&lt;p&gt;Looks like my issue was actually related to an incorrect UUID set in characteristic I had &amp;quot;10001111-0000-1000-8000-00805f9b34fb&amp;quot; and when changed to&amp;nbsp;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;10001000-0000-1000-8000-00805f9b34fb&amp;quot; it start working.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DOMException: GATT operation not permitted.</title><link>https://devzone.nordicsemi.com/thread/404204?ContentTypeID=1</link><pubDate>Tue, 10 Jan 2023 22:27:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72cd43a1-4028-43c1-b088-3bbbedb6cab2</guid><dc:creator>Filip1122</dc:creator><description>&lt;p&gt;Looks like I have exactly the same problem.&amp;nbsp; I am running the code in HTTPS, the code below&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="javascript"&gt;$(document).ready(function(){
&amp;#160; &amp;#160; let bluetoothDevice = null;
&amp;#160; &amp;#160; let requestDeviceParams = {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; filters: [
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; {name: [&amp;quot;ko&amp;quot;]}
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ],
&amp;#160; &amp;#160; &amp;#160; &amp;#160; optionalServices: [&amp;#39;10001001-0000-1000-8000-00805f9b34fb&amp;#39;]
&amp;#160; &amp;#160; }
&amp;#160; &amp;#160;
&amp;#160; &amp;#160; let name = document.querySelector(&amp;#39;#date-input&amp;#39;)
&amp;#160; &amp;#160; $(&amp;quot;#synch-date-time&amp;quot;).click(() =&amp;gt; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; if (document.querySelector(&amp;#39;#date-input&amp;#39;).value === &amp;#39;&amp;#39;) {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; console.error(&amp;#39;empty date field, please fill the fields&amp;#39;)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; return
&amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; &amp;#160; &amp;#160; asyncResultNotif();
&amp;#160; &amp;#160; })



&amp;#160; &amp;#160; async function asyncResultNotif(){
&amp;#160; &amp;#160; &amp;#160; &amp;#160; return await navigator.bluetooth.requestDevice(requestDeviceParams)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; .then(device =&amp;gt; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; bluetoothDevice = device.gatt;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; return device.gatt.connect();
&amp;#160; &amp;#160; &amp;#160; &amp;#160; })
&amp;#160; &amp;#160; &amp;#160; &amp;#160; .then(server =&amp;gt; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if (bluetoothDevice.connected) {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; return server.getPrimaryService(&amp;#39;10001001-0000-1000-8000-00805f9b34fb&amp;#39;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; } else {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; console.log(&amp;#39;cant connect to prime server&amp;#39;)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; &amp;#160; &amp;#160; })
&amp;#160; &amp;#160; &amp;#160; &amp;#160; .then(service =&amp;gt; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if (bluetoothDevice.connected) {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; return service.getCharacteristic(&amp;#39;10001111-0000-1000-8000-00805f9b34fb&amp;#39;); // write one value
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; } else {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; console.log(&amp;#39;cant connect to characteristic&amp;#39;)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; &amp;#160; &amp;#160; })
&amp;#160; &amp;#160; &amp;#160; &amp;#160; .then(characteristic =&amp;gt; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if (bluetoothDevice.connected) {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; // const resetEnergyExpended = Uint8Array.of(1);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; // return characteristic.writeValue(resetEnergyExpended);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; let data = &amp;#39;{&amp;quot;ssid&amp;quot;: &amp;quot;&amp;#39; +name.value
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; data +=&amp;#39;&amp;quot;}&amp;#39;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; console.log(data)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; let encoder = new TextEncoder(&amp;#39;utf-8&amp;#39;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; let val = encoder.encode(data);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; // return characteristic.writeValue(val.buffer)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; return characteristic.writeValue(new Uint8Array([1]))
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; } else {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; console.log(&amp;#39;cant send message over BLE&amp;#39;)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; &amp;#160; &amp;#160; }). then(() =&amp;gt; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; if (bluetoothDevice.connected) {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; bluetoothDevice.disconnect();
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; console.log(&amp;#39;&amp;gt; Bluetooth Device now disconnected&amp;#39;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; } else {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; console.log(&amp;#39;&amp;gt; Bluetooth Device is already disconnected&amp;#39;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; &amp;#160; &amp;#160; }).catch(error =&amp;gt; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; console.error(&amp;#39;Argh! &amp;#39; + error)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; });
&amp;#160; &amp;#160; }
});&lt;/pre&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DOMException: GATT operation not permitted.</title><link>https://devzone.nordicsemi.com/thread/385590?ContentTypeID=1</link><pubDate>Sat, 10 Sep 2022 20:49:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b85c116e-e8fe-46f8-a7f5-cfe9b3bc4fe4</guid><dc:creator>Zheckiss</dc:creator><description>&lt;p&gt;The way I understand Chrome, this means, that for some reason the&amp;nbsp;Write bit for that characteristic isn&amp;#39;t set? Argh! Please help! )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>