Are Parameter types in GATT meaningless?

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

 



The manufacturer of the GATT service gives the types of two different services:

uint16

uint8[32]

Should uint16 be uint8[2]?


I am using the libgio interface to D-BUS.  This uses GVariants.
I am using the WriteValue method of GattCharacteristic1.

For the uint16 case, I find that if I use:

(aya{sv})

then I do not get an immediate error from a bad parameter type list (signature).

If I use:

(qa{sv})

Then I get the error:

Error message: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method "WriteValue" with signature "qa{sv}" on interface "org.bluez.GattCharacteristic1" doesn't exist

For the uint8[32] case I use (aya{sv}) which is what I would expect, and I get no error from the WriteValue.

Are byte arrays used in all cases with GATT from a D-Bus perspective?

Here is the message that fails which was logged by dbus-monitor:

  uint16 2                                                                                                         
   array [                                                                                                          
      dict entry(                                                                                                   
         string "type"                                                                                              
         variant             string "request"                                                                       
      )                                                                                                             
   ] 
error time=1660229364.819130 sender=:1.0 -> destination=:1.197 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=16                                                                           
   string "Method "WriteValue" with signature "qa{sv}" on interface "org.bluez.GattCharacteristic1" doesn't exist                                                                                            
"  

While this message/parameter list does not provoke an error:

   array of bytes [                                                                                                                                            
      00 02                                                                                                                                                    
   ]                                                                                                                                                           
   array [                                                                                                                                                     
      dict entry(                                                                                                                                              
         string "type"                                                                                                                                         
         variant             string "request"                                                                                                                  
      )                                                                                                                                                        
   ]                                         





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