Re: GattCharacteristic1 WriteValue fails parameter validation in a GATT Client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luiz Augusto von Dentz writes:

>You can use AcquireWrite and then write directly to the fd received.

I tried AcquireWrite as you suggest.  The result was "NotSupported".  I 
should mention that I have tried Nordic's NRF Connect on Android with 
the same GATT Server, and it is able to write to this 
UUID/characteristic just fine.


Using "dbus-monitor --system" I see both read and write flags on my characteristic "service0021/char0046" with the correct UUID:


signal time=1659368288.691466 sender=:1.3649 -> destination=(null 
destination) serial=968 path=/; 
interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded 

   object path "/org/bluez/hci0/dev_CC_F9_57_89_8B_D8/service0021/char0046"
   array [
      dict entry(
         string "org.freedesktop.DBus.Introspectable"
         array [
         ]
      )
      dict entry(
         string "org.bluez.GattCharacteristic1"
         array [
            dict entry(
               string "UUID"
               variant                   string "edf50100-681e-4b92-999c-e16b3a8bc047"
            )
            dict entry(
               string "Service"
               variant                   object path "/org/bluez/hci0/dev_CC_F9_57_89_8B_D8/service0021"
            )
            dict entry(
               string "Value"
               variant                   array [
                  ]
            )
            dict entry(
               string "Flags"
               variant                   array [
                     string "read"
                     string "write"
                  ]
            )
         ]
      )
      dict entry(
         string "org.freedesktop.DBus.Properties"
         array [
         ]
      )
   ]



However, AcquireWrite replies with "Not Supported" which is the text I see in the error message in my program:


method call time=1659368290.693590 sender=:1.3987 -> 
destination=org.bluez serial=10 
path=/org/bluez/hci0/dev_CC_F9_57_89_8B_D8/service0021/char0046; 
interface=org.bluez.GattCharacteristic1; member=AcquireWrite 

   array [
   ]
error time=1659368290.693700 sender=:1.3649 -> destination=:1.3987 error_name=org.bluez.Error.NotSupported reply_serial=10
   string "Operation is not supported"

Any ideas on where in the BlueZ source I could look for this?  Does anyone have an example of doing a GATT Write from a client?



John Klug




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux