Device doesnt show up on Ble Scanner - gatt-service example in tools folder as per Documentation(doc)

Raul Piper raulpblooper at gmail.com
Tue Aug 31 04:40:23 EDT 2021


On Tue, Aug 31, 2021 at 12:08 PM Luiz Augusto von Dentz
<luiz.dentz at gmail.com> wrote:
>
> Hi Raul,
>
Hello Luiz,
> On Mon, Aug 30, 2021 at 11:32 PM Raul Piper <raulpblooper at gmail.com> wrote:
> >
> > Any inputs on this?
>
> Did you remember to advertise? I mean those only services but it
> doesn't necessarily advertise which is something perhaps could be
> updated on those samples so they become visible on the scanners.
>
Isnt ./gatt-service supposed to advertise as well?
I cross built and rant ./advtest with -h and it gave not much information :
./advtest --h
advtest - Advertising testing
Usage:
        advtest [options]

and when I ran
./advtest
it gave : At least 2 controllers are required
what other input does it take ? hci0?hci1?

when i try to run ./advtest -hci0
it gave :  Invalid command line parameters

 i tried to find bt controllers on my board and it gave :

hcitool dev
Devices :

It gave nothing.

Any idea how to proceed ?I suspect I need to enable the hci controller
or something?
But it is strange that ./gatt-service did not throw any error and
registered the services without any error?shouldn't  these examples
check for the ble controller first before proceeding further?


> > On Sun, Aug 29, 2021 at 11:42 PM Raul Piper <raulpblooper at gmail.com> wrote:
> > >
> > > Hello,
> > > I tried cross compiling the bluez and ported it to my linux platform.I
> > > think i have done it correctly as I am able to launch the gatt-service
> > > example successfully but i am not able to view it on the Smartphone
> > > app - blescanner or light blue.
> > >
> > > Below are the logs :
> > > ===============================================
> > > ./gatt-service
> > > gatt-service unique name: :1.18
> > > Registered service: /service1
> > > Registered service: /service2
> > > Registered service: /service3
> > > Get Primary: True
> > > Get UUID: 00001802-0000-1000-8000-00805f9b34fb
> > > Exist Includes: 00001802-0000-1000-8000-00805f9b34fb
> > > Get Includes: 00001802-0000-1000-8000-00805f9b34fb
> > > Includes path: /service3
> > > Get Includes: /service2
> > > Characteristic(00002a06-0000-1000-8000-00805f9b34fb): Get("Value")
> > > Descriptor(8260c653-1a54-426b-9e36-e84c238bc669): Get("Value")
> > > Get Primary: True
> > > Get UUID: A00C
> > > Exist Includes: A00C
> > > Characteristic(00002c07-0000-1000-8000-00805f9b34fb): Get("Value")
> > > Descriptor(FFFF): Get("Value")
> > > Get Primary: True
> > > Get UUID: A00D
> > > Exist Includes: A00D
> > > Characteristic(00002b06-0000-1000-8000-00805f9b34fb): Get("Value")
> > > Descriptor(0260c653-1a54-426b-9e36-e84c238bc669): Get("Value")
> > >
> > >
> > >
> > > I also tried to run the python example inside test/example-gatt-server
> > > but again I am not able to view the device name.
> > >
> > > Below are the logs :
> > > =======================================
> > > python3 example-gatt-server
> > > example-gatt-server:395: PyGIDeprecationWarning: GObject.timeout_add
> > > is deprecated; use GLib.timeout_add instead
> > >   GObject.timeout_add(5000, self.drain_battery)
> > > example-gatt-server:652: PyGIDeprecationWarning: GObject.MainLoop is
> > > deprecated; use GLib.MainLoop instead
> > >   mainloop = GObject.MainLoop()
> > > Registering GATT application...
> > > GetManagedObjects
> > > GATT application registered
> > >
> > > I even opened the btmon on a different tab but still I am not able to
> > > see anything on that.
> > > Is there any other application we have to run?
> > > Has any one ran  it successfully and able to view/connect and see all
> > > the 3 services it is advertising.
> > >
> > > Please advise / ask for any further information , I will provide.
> > >
> > > Thanks in advance !
> > >
> > > Regards,
> > > R
>
>
>
> --
> Luiz Augusto von Dentz



More information about the Kernelnewbies mailing list