×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Bluetooth connection to mount

  • Posts: 983
  • Thank you received: 375
The first thing to check is whether you have modemmanager installed (dpkg -l | grep modemmanager). It tends to mess things around. If so, remove it (sudo apt remove modemmanager)
Last edit: 4 years 4 months ago by Radek Kaczorek.
4 years 4 months ago #46450

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Thanks for the suggestion, I think ModemManager is long gone but I'll check. Right now it seems to have connected and is connecting data so I'm not going to disturb it. It's done this before, the snag is that it isn't reliable.
4 years 4 months ago #46451

Please Log in or Create an account to join the conversation.

  • Posts: 1309
  • Thank you received: 226
It seems like you have at least managed to get it to pair and connect. My go to advice has always been to remove modemmanager and add this to your /etc/rc.local file to automatically bind it at startup, replacing XXs with the mac address of the mount BT adapter.
# Bind Bluetooth to Mount Adapter.
rfcomm bind hci0 XX:XX:XX:XX:XX:XX 1 &
As for reliability, It's possible there could be interference causing your issues.
4 years 4 months ago #46452

Please Log in or Create an account to join the conversation.

  • Posts: 163
  • Thank you received: 26

Replied by Bart on topic Bluetooth connection to mount

Hi Chris,

I've had some trouble with my BT-modded iEQ mount (using HC05). It connected and disconnected in about 2 seconds.
What worked for me is to install (and use) Blueman.

sudo apt-get update -y
sudo apt-get install -y Blueman

In the applet I connect the paired device to a serial port.
It can also be done in console:
(sudo) rfcomm bind 0 ##:##:##(etc) 1

I have to do this every time I start Stellarmate, I've found no way yet to automate this.

Cheers!
Bart
4 years 4 months ago #46461

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 6
Hi,
I had a similar problem one month ago trying to connect a joystick in bluetooth to a RPI3 running stellarmate.
Following an advice given by Jasem, I updated BlueZ:
sudo add-apt-repository ppa:mutlaqja/bluez
sudo apt-get -y dist-upgrade.
Since this, BT works reliably.
Maybe it could help :)
Pierre-Yves
4 years 4 months ago #46462

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Thanks for the feedback everyone. It's just fallen over again, after about a couple of hours running with no problems. I'll try the things you suggested and get back to you.

Chris
4 years 4 months ago #46465

Please Log in or Create an account to join the conversation.

Right, BT had been notoriously unreliable on Linux (at least on Raspberry PI). An updated BlueZ stack would help. I believe the next LTS (20.04) would be shipped with all these bluetooth fixes over the last couple of years, but now try the BlueZ ppa.
4 years 4 months ago #46467

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Thanks Jasem and Pierre, I did the bluez upgrade and it seems much better.

It seems to connect more readily and so far has remained connected. It has been running for 4 hours so far. I'm getting isolated timeout errors, about one an hour. I should be able to gve it a go this evening. After weeks of cloud it looks as if we are going to get two clear nights in a row!

Chris
4 years 4 months ago #46475

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Spoke too soon, I shut down,carried my scope outside and restarted. It now won't connect with

Connection Failed: Traceback (most recent call last):
file "/usr/lib/python3/dist-packages/blueman/services/meta/SerialService.py", line 29 in connect
port_id=create_rfcomm_device(Adapter(props).get_properties() , props, 1)
File "_blueman.pyx", line 218 in _blueman.create_rfcomm_device
Exception: Can't connect RFCOMM socket
---
It looks as if I do have modemmanager:
chris@chris-raspi:~$ dpkg -l | grep modemmanager
rc modemmanager 1.10.0-1~ubuntu18.04.2 armhf D-Bus service for managing modems
chris@chris-raspi:~$
so let's remove it:
chris@chris-raspi:~$ sudo apt remove modemmanager
[sudo] password for chris:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'modemmanager' is not installed, so not removed
The following packages were automatically installed and are no longer required:
linux-image-4.15.0-1032-raspi2 linux-image-4.15.0-1047-raspi2
linux-modules-4.15.0-1032-raspi2 linux-modules-4.15.0-1047-raspi2
oxygen-icon-theme
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
chris@chris-raspi:~$ ^C
chris@chris-raspi:~$

Perhaps I don't have modemmanager installed.
Try some more things:-
chris@chris-raspi:~$ bluetoothctl
Agent registered
[bluetooth]# list
Controller B8:27:EB:A6:82:FC chris-raspi [default]
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:A6:82:FC Discovering: yes
[NEW] Device 63:B2:9D:07:4F:76 63-B2-9D-07-4F-76
[NEW] Device 28:11:A5:A3:40:83 28-11-A5-A3-40-83
[CHG] Device 20:19:07:12:17:24 RSSI: -58
[bluetooth]# info
[bluetooth]# info 20:19:07:12:17:24
Device 20:19:07:12:17:24 (public)
Name: NEXSTAR
Alias: NEXSTAR
Class: 0x00001f00
Paired: no
Trusted: no
Blocked: no
Connected: no
LegacyPairing: yes
RSSI: -58
[bluetooth]# pair 20:19:07:12:17:24
Attempting to pair with 20:19:07:12:17:24
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
[bluetooth]#
[bluetooth]# disconnect 20:19:07:12:17:24
Attempting to disconnect from 20:19:07:12:17:24
Successful disconnected
[bluetooth]# pair 20:19:07:12:17:24
Attempting to pair with 20:19:07:12:17:24
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
[bluetooth]# version
Version 5.51

Not sure where to go from here.
4 years 4 months ago #46481

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Something my father said was "If you are in hle the first thing is to stop digging."
So I took a step back and started again, building a new version, based on Mate 18.4, the current AstroPi3, and ASTAP. I was getting communication failures until I appriled the updates mentioned earlier in this thread, then it was fine, except for an occasional communication timeout.

This wasn't helped by cloud but aligning and guiding worked in spite of that - then the clouds cleared and I got this.



No darks or flats, just 10x30 sec stacked with ASTAP Live.

It's a start.

Chris.
4 years 4 months ago #46534
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
Every time I post saying i seems to be workig it falls over, in this case while I was sending that last message.

I'm beginning to wonder if it's a range issue, it's easy for the two devices not to be abe to see each other, even though they are no more than a metre apart. I've adjusted things so the RasPi and the BT device are about half a metre apart and with no metal between them.

If that doesn't work maybe I'll try running the mount from a second Pi using the WiFi connection, that seems to be reliable. Perhaps a Pi Zero running an INDI server with the mount driver and nothing else.
4 years 4 months ago #46559

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
I think I've got this sorted. I've been running for the last day with no errors or hang ups from my wireless connection to the mount.

The solution was to abandon Bluetooth entirely and use WiFi.
I now have a Pi zero loaded with Indi and the indi-web server set to start at startup. I connect to it with a remote connection. The scope is connected through USB using a FTDI adaptor.
And It Just Works! Sometims the way to succeed is to change the game. Kudos to the INDI team, it was all a lot easier than struggling with BT.

Setting up the Pi Zero was tedious because it's so slow but hacking the AstroPi3 RaspbianPi script to remove the Ekos stuff gave a good basis for getting it going. The rational way is to run headless. That's for another thread.

Chris
4 years 4 months ago #46700

Please Log in or Create an account to join the conversation.

Time to create page: 1.826 seconds