Connecting Anytone-878 to a PC over Bluetooth #bluetooth


Eugene Medvedev
 

Sharing something that took me hours of experimentation, in case anyone comes looking:

It is possible to connect your Anytone 878 over Bluetooth to a PC, which can be useful for NBEMS and other digital-over-analog modes, and potentially has other applications, like a trivial ad-hoc parrot repeater which you don't have to use a cable with.

I have no idea if this is possible on Windows, and I definitely could not get it to work on Android. The reason is that the radio presents itself as a phone. While it will attempt to connect to any Bluetooth device, regardless of which services it presents, it has to present the services associated with a headset profile for the radio to send sound through. Fortunately, Linux, in particular, (and presumably, Raspbian) can do this out of the box. But modern distros bump into another problem: Anytone won't pair with them, because of how they expect the pin code to be entered. The recipe that finally got me success looks like this:

1. Invoke bluetoothctl. Might need to be sudo bluetoothctl
2. Use this incantation in it:

discoverable on
pairable on
agent KeyboardOnly
default-agent
 
3. Start pairing from the radio. It might not work on the first try, but repeat until you see something like this:
 
[NEW] Device 00:1B:10:2A:3C:2C Anytone
Request confirmation
[agent] Confirm passkey 096894 (yes/no): yes
[CHG] Device 00:1B:10:2A:3C:2C UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
[CHG] Device 00:1B:10:2A:3C:2C UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 00:1B:10:2A:3C:2C UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
[CHG] Device 00:1B:10:2A:3C:2C ServicesResolved: yes
[CHG] Device 00:1B:10:2A:3C:2C Paired: yes
Authorize service
[agent] Authorize service 0000111e-0000-1000-8000-00805f9b34fb (yes/no): yes
 
What you're looking for is the "Confirm passkey" prompt, and especially the subsequent "Authorize service" prompt, which is what invokes PulseAudio to present the headset profile. Obviously, answer yes to all prompts. You will see an extra sound card named "Anytone" which gives you input and output ports.

Setting up FlDigi to play nicely with it is left as an exercise for the reader. :)


Ron NR5ON
 

Thanks for posting. I'll likely use this.


garrobo1951
 

Now if we could only get it to send SMS messages through that path... 


On Thu, Sep 3, 2020 at 3:51 AM Ron NR5ON <ronelson99@...> wrote:
Thanks for posting. I'll likely use this.



--
Chirp + Editcp + MD380Tools on Linux
Celestial!!!
Chuck -- KP4DJT


garrobo1951
 

That would be on DMR of course


On Thu, Sep 3, 2020 at 4:51 PM Chuck Hast <kp4djt@...> wrote:
Now if we could only get it to send SMS messages through that path... 


On Thu, Sep 3, 2020 at 3:51 AM Ron NR5ON <ronelson99@...> wrote:
Thanks for posting. I'll likely use this.



--
Chirp + Editcp + MD380Tools on Linux
Celestial!!!
Chuck -- KP4DJT


--
Chirp + Editcp + MD380Tools on Linux
Celestial!!!
Chuck -- KP4DJT


Eugene Medvedev
 

On Fri, 4 Sep 2020 at 16:26, garrobo1951 <kp4djt@...> wrote:
Now if we could only get it to send SMS messages through that path... 
._,_._,

Incidentally, the radio does expose a serial port. While I was trying to get the pairing to happen with Blueman, connecting to it was the only success I got. Unfortunately, I haven't been able to get any data in or out.

A cursory glance through the bluetooth module firmware suggests it listens to AT-commands, or at least AT-style commands, and some of them apparently control the radio, but whether they can theoretically allow you to send SMS, I don't know.

--
Eugene Medvedev


garrobo1951
 

I shall have to look  at this too. Would be great to be able to
use it with a tablet/laptop or even a phone and have a decent
screen to send/receive text on.


On Sat, Sep 5, 2020 at 9:55 AM Eugene Medvedev <rn3aoh.g@...> wrote:
On Fri, 4 Sep 2020 at 16:26, garrobo1951 <kp4djt@...> wrote:
Now if we could only get it to send SMS messages through that path... 
._,_._,

Incidentally, the radio does expose a serial port. While I was trying to get the pairing to happen with Blueman, connecting to it was the only success I got. Unfortunately, I haven't been able to get any data in or out.

A cursory glance through the bluetooth module firmware suggests it listens to AT-commands, or at least AT-style commands, and some of them apparently control the radio, but whether they can theoretically allow you to send SMS, I don't know.

--
Eugene Medvedev



--
Chirp + Editcp + MD380Tools on Linux
Celestial!!!
Chuck -- KP4DJT


garrobo1951
 

Here is what I get with mine. I am on Ubuntu 20.04
NEW] Device 00:1B:10:1E:07:1A 00-1B-10-1E-07-1A
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[DEL] Device 00:1B:10:1E:07:1A 00-1B-10-1E-07-1A
At times it shows this prompt:
[bluetooth]#
Or this one:
[00-1B-10-1E-07-1A]# 
Which appears to be the mac of the BT on the radio. I only see it when I attempt to pair the radio to the
laptop.
I am never offered a place to enter a PIN.
 


garrobo1951
 

Has anyone else been able to do anything with this?
I set my laptop up and started playing with it. I invoked the
commands given, all of them taken, then I go over to the
radio and have it attempt to connect, it does show connected
on the radio and the ID of the computer shows up on the
connected list in the radio, but on the terminal screen I see
the following once I try to connect from the radio:
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[KP4DJT-878]# 
The a few seconds later I will get the following:
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[bluetooth]# 
So I end up with a screen of the following:
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[bluetooth]# 
I am trying to figure out if I need to enter something in the time
period between connection yes and no states? Sure would like
to dig deeper into this and even get it to send/receive data.


garrobo1951
 

On Sun, Aug 30, 2020 at 02:12 AM, Eugene Medvedev wrote:
discoverable on
pairable on
agent KeyboardOnly
default-agent
Have you been able to do anything more with this Eugene? I have followed
your instructions but I only get the following:
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[CHG] Device 00:1B:10:1E:07:1A Connected: no

I have tried to re-connect many times but always get the above indications
and no more. I am using Ubuntu 20.04.01 I am quite interested in trying to
get serial data through the BT system. 


g4xcp G4XCP
 

is the bluetooth device set up to receive data or audio?

I thought the bluetooth was audio only?
try a different program on your computet such as a trail version of blue soleil?


73 g4xcp


From: ANYTONE-878@groups.io <ANYTONE-878@groups.io> on behalf of garrobo1951 <kp4djt@...>
Sent: 13 January 2021 2:24 AM
To: ANYTONE-878@groups.io <ANYTONE-878@groups.io>
Subject: Re: [ANYTONE-878] Connecting Anytone-878 to a PC over Bluetooth #bluetooth
 
Has anyone else been able to do anything with this?
I set my laptop up and started playing with it. I invoked the
commands given, all of them taken, then I go over to the
radio and have it attempt to connect, it does show connected
on the radio and the ID of the computer shows up on the
connected list in the radio, but on the terminal screen I see
the following once I try to connect from the radio:
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[KP4DJT-878]# 
The a few seconds later I will get the following:
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[bluetooth]# 
So I end up with a screen of the following:
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[bluetooth]# 
I am trying to figure out if I need to enter something in the time
period between connection yes and no states? Sure would like
to dig deeper into this and even get it to send/receive data.


garrobo1951
 

That is a windows app, I am on Linux, I am following 
Eugene's instructions. The BT system is trying to talk
to the radio, the connection comes up but then the
radio tears it down, and the cycle repeats. NOTE
Eugene says that it does NOT work at all on Windows.

On Thu, Jan 14, 2021 at 4:05 AM g4xcp G4XCP <g4xcp1@...> wrote:
is the bluetooth device set up to receive data or audio?

I thought the bluetooth was audio only?
try a different program on your computet such as a trail version of blue soleil?


73 g4xcp

From: ANYTONE-878@groups.io <ANYTONE-878@groups.io> on behalf of garrobo1951 <kp4djt@...>
Sent: 13 January 2021 2:24 AM
To: ANYTONE-878@groups.io <ANYTONE-878@groups.io>
Subject: Re: [ANYTONE-878] Connecting Anytone-878 to a PC over Bluetooth #bluetooth
 
Has anyone else been able to do anything with this?
I set my laptop up and started playing with it. I invoked the
commands given, all of them taken, then I go over to the
radio and have it attempt to connect, it does show connected
on the radio and the ID of the computer shows up on the
connected list in the radio, but on the terminal screen I see
the following once I try to connect from the radio:
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[KP4DJT-878]# 
The a few seconds later I will get the following:
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[bluetooth]# 
So I end up with a screen of the following:
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[CHG] Device 00:1B:10:1E:07:1A Connected: yes
[CHG] Device 00:1B:10:1E:07:1A Connected: no
[bluetooth]# 
I am trying to figure out if I need to enter something in the time
period between connection yes and no states? Sure would like
to dig deeper into this and even get it to send/receive data.



--
Chirp + Editcp + MD380Tools on Linux
Celestial!!!
Chuck -- KP4DJT


Duarte Braga
 

I managed to make this work! I am now able to route the audio from teh AT-878 via bluetooth to my PC running windows. 
I followed Eugene instructions but it only worked after I installed "ofono" package. This is necessary because the AT-878 only accepts the HSP bluetooth profile so it thinks that the PC is a headset.
I am trying this setup for APRS using "direwolf" that offers full APRS functionality such as IGATE and DIGIPEATER - so my my AT-878 is a complete APRS station.
The problem I need to overcome is on the TX side. The AT-878 picks up the PC audio output right via the bluetooth, however it does not key the PTT.
The first thought is to activate VOX but from what I see, the VOX is not working for Bluetooth.
Does anyone know how to activate VOX for bluetooth operation?


Eugene Medvedev
 

On Fri, 24 Sept 2021 at 19:01, Duarte Braga <duarte.mbraga@...> wrote:

Does anyone know how to activate VOX for bluetooth operation?

VOX can be enabled separately for built-in microphone and headset, and I don't remember what the default is, but I got bitten by that when I tried to use my radio with a cable. I have not had cause to test whether this also handles a Bluetooth microphone, but the text distinguishes between "Internal" and "External" microphone and Bluetooth should, in theory, count as "External".

Check Optional Setting -> Vox/BT -> Vox Detection and set it to "Both" or only "External"

--
Eugene Medvedev


Spark
 

This is one of the main things holding me back on buying this HT. If the device has BT, I'd need it to function with my computer or phone for APRS or Winlink. Just being able to use a ptt button or headset as a halfway point is unacceptable to me.

I hope they release an update for the radio that allows the radio to function this way.

I know I can just go get a mobilink, but if the device has BT installed, I shouldn't need it.


garrobo1951
 

I have not tried it but recall some time back that someone
used the BT connection from a Linux machine and they found
that there were the end pieces for a serial data over Bluetooth
I was going to look at it and got busy, and forgot to look at it.


On Sun, Dec 5, 2021 at 9:56 AM Spark <sparkfly88@...> wrote:

This is one of the main things holding me back on buying this HT. If the device has BT, I'd need it to function with my computer or phone for APRS or Winlink. Just being able to use a ptt button or headset as a halfway point is unacceptable to me.

I hope they release an update for the radio that allows the radio to function this way.

I know I can just go get a mobilink, but if the device has BT installed, I shouldn't need it.



--

Chuck -- KP4DJT
HH -- 11259


Jerry AA2T
 

Agreed. Since the hw is there hoping they catch up with firmware. 


Richard Lenker KB3YRC
 

I updated and now have a Red A on the screen?

 

 

From: ANYTONE-878@groups.io [mailto:ANYTONE-878@groups.io] On Behalf Of Jerry AA2T via groups.io
Sent: Sunday, December 5, 2021 3:18 PM
To: ANYTONE-878@groups.io
Subject: Re: [ANYTONE-878] Connecting Anytone-878 to a PC over Bluetooth #bluetooth

 

Agreed. Since the hw is there hoping they catch up with firmware. 


--
Richard  Lenker
KB3YRC


Eddie W2FTL
 

The Red A is for Auto shut off that you have set on the HT.


Richard Lenker KB3YRC
 

It is a timed   auto shut down  timer

 

From: ANYTONE-878@groups.io [mailto:ANYTONE-878@groups.io] On Behalf Of Richard Lenker KB3YRC
Sent: Monday, December 6, 2021 1:39 PM
To: ANYTONE-878@groups.io
Subject: Re: [ANYTONE-878] Connecting Anytone-878 to a PC over Bluetooth #bluetooth

 

I updated and now have a Red A on the screen?

 

 

From: ANYTONE-878@groups.io [mailto:ANYTONE-878@groups.io] On Behalf Of Jerry AA2T via groups.io
Sent: Sunday, December 5, 2021 3:18 PM
To: ANYTONE-878@groups.io
Subject: Re: [ANYTONE-878] Connecting Anytone-878 to a PC over Bluetooth #bluetooth

 

Agreed. Since the hw is there hoping they catch up with firmware. 


--
Richard  Lenker
KB3YRC


--
Richard  Lenker
KB3YRC


garrobo1951
 

Folks, please do not hijack the thread. It is regarding Bluetooth on
these radios, there was another thread regarding the [A]. Just
common courtesy. 

On Wed, Dec 8, 2021 at 10:10 AM Richard Lenker KB3YRC <KB3YRC@...> wrote:

It is a timed   auto shut down  timer

 

From: ANYTONE-878@groups.io [mailto:ANYTONE-878@groups.io] On Behalf Of Richard Lenker KB3YRC
Sent: Monday, December 6, 2021 1:39 PM
To: ANYTONE-878@groups.io
Subject: Re: [ANYTONE-878] Connecting Anytone-878 to a PC over Bluetooth #bluetooth

 

I updated and now have a Red A on the screen?

 

 

From: ANYTONE-878@groups.io [mailto:ANYTONE-878@groups.io] On Behalf Of Jerry AA2T via groups.io
Sent: Sunday, December 5, 2021 3:18 PM
To: ANYTONE-878@groups.io
Subject: Re: [ANYTONE-878] Connecting Anytone-878 to a PC over Bluetooth #bluetooth

 

Agreed. Since the hw is there hoping they catch up with firmware. 


--
Richard  Lenker
KB3YRC


--
Richard  Lenker
KB3YRC



--

Chuck -- KP4DJT
HH -- 11259