Re: bluez bluetooth problem

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

 



Hi Jay,

On Wed, Sep 07, 2016, Montague, Jay wrote:
> I have tried to send commands using the Eclipse IDE but when I send the following:
> 
> system("echo -e 'agent NoInputNoOutput\n | bluetoothctl");
> 
> On the Edison it reports "No agent is registered" and the following message:

bluetoothctl *is* the agent, and since I assume it exits after piping
the command to it, it's not really a surprise that bluetoothd says there
is no agent.

> #!/bin/sh
> rfkill unblock bluetooth
> sdptool add -channel=22 SP
> sleep 1
> bluetoothctl << EOF
> agent NoInputNoOutput
> EOF
> sleep 1
> 
> Again it just report "No agent is registered".

As I said earlier, that's because bluetoothd presumably exited. It needs
to run in order for an agent to exist.

Regarding sdptool & rfcomm usage, you might want to look into using the
profile API instead (see doc/profile-api.txt and test/test-profile).
It'll take care of the SDP and RFCOMM details for you, and e.g.
completely skip TTYs in favor of RFCOMM sockets (I see you reported that
you had some kernel issues with the TTYs).

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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