×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Connecting indi via Bluetooth to a computer

  • Posts: 983
  • Thank you received: 375
I'm glad you got it solved! As the matter of fact you can do all of these from GUI by clicking bluetooth icon on your taskbar, selecting bluetooth dongle, pairing devices and connecting the dongle. All of these will expose bluetooth serial port to a user - ready to use by INDI serial connection.
What was discussed with petarm is a generic approach for people keen on terminal and cli. Depending on linux distribution it might be the only approach available to a user. However in majority of cases GUI approach will work out of the box.

BTW. my experience is that in some cases neither of the approaches is sufficient and you need to use bluetoothctl to pair and connect the device.
6 years 11 months ago #16140

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

  • Posts: 69
  • Thank you received: 20
This is how I got the Shoestring Astronomy bluetooth adapter for Eqmod to start automatically. I have not tested on Raspberry pi but this shouild work for any systemd based distro. Please keep in mind that I am not an expert and that this includes this first systemd service file that I have written. I would be delighted if anyone can improve this.

1). First I created a file in /etc/modules-load.d/ to enable the rfcomm module to load at boot.

/etc/modules-load.d/rfcomm.conf

# Load rfcomm at boot
rfcomm

2). Then I made script and placed it in /usr/bin/

/usr/bin/rfcomm0.sh

#! /bin/sh
rfcomm bind rfcomm0 xx:xx:xx:xx:xx:xx

Where xx:xx:xx:xx:xx:xx is the MAC address of the bluetooth adapter.
Don't forget to make script executable.

3). Lastly I wrote a service file and placed it in /etc/systemd/system/.

/etc/systemd/system/rfcomm0.service

[Unit]
Description=Eqmod port

[Service]
Type=idle
ExecStart=/usr/bin/rfcomm0.sh

[Install]
WantedBy=multi-user.target

I enabled the service with sudo systemctl enable rfcomm0.service
rebooted
Now I can connect to Eqmod Mount through port /dev/rfcomm0
The following user(s) said Thank You: Jasem Mutlaq, Andres Rossi
6 years 9 months ago #17252

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

Thanks, but this is basically a nightmare for new users who have no background in LInux, there is no easy way for this?
6 years 9 months ago #17253

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

  • Posts: 152
  • Thank you received: 28
Hi tseckler thanks for your response regarding auto binding a shoestring bt adapter.

I tried your solution on my rpi3. But when I then start kstars and do the connection with ekos I get the same error as I was initially getting (see my post #16099).

The only difference this time is the red led on the shoestring adapter now stays on (its not flashing) which means it is still connected.

I'll keep tinkering to see if I can cracking it.

Regards
6 years 9 months ago #17268

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

  • Posts: 69
  • Thank you received: 20
You may want to make sure /usr/bin/rfcomm0.sh is executable.
sudo chmod +x /usr/bin/rfcomm0.sh.
6 years 9 months ago #17269

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

  • Posts: 152
  • Thank you received: 28
Hi tseckler, I just checked to make sure the service for enabled, it was. Still the same issue. The port auto binds but when i try connecting to it in ekos, the port is unresponsive. I checked on my server to make sure the bt was connected and the bt manager shows a perfect connection??? Very weird.

Could it have anything to do with my auto indi server startup? Could it be an issue with the order in which things start up? To start up my indiserver automatically i did this:

Set up Rpi3 to Automatically Start indiserver

Connect all equipment to the rpi3 (heq5, guider, ccd, focuser etc etc) and power up rpi3. You will notice that the BT adapter’s red LED flashes which means it is NOT connected to the rpi3 yet.

To start indiserver automatically, open a terminal and type:

sudo pluma /lib/systemd/system/indi.service

and add the following to the file:

[Unit]
Description=Start INDI server at startup.
[Service]
User=username
Group=usergroup
Type=simple
Restart=always
ExecStart=/usr/bin/indiserver indi_eqmod_telescope indi_asci_ccd indi_gphoto_ccd indi_joystick
[Install]
WantedBy=graphical.target
WantedBy=multi-user.target

and save the file and then activate is via

sudo systemctl enable indi.service
6 years 9 months ago #17272

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

  • Posts: 1309
  • Thank you received: 226
Pair and connect BT Adapter
To the file /etc/rc.local add this line of code.
Don't miss the trailing & in this code and sub XX's for adapter MAC address.
rfcomm bind hci0 XX:XX:XX:XX:XX:XX 1 &
6 years 8 months ago #17880

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

  • Posts: 125
  • Thank you received: 24
Sorry to revive this thread. I tried all the steps mentioned above and but i am unable to get the mount connected on ekos . Could some one suggest what I am doing wrong here.

Trying to connect BT2EQ6 on astroberry@RPI3

Attached screenshot of the error log
6 years 3 months ago #21516
Attachments:

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

  • Posts: 1309
  • Thank you received: 226
I'm not sure. It should be available on rfcomm0
6 years 3 months ago #21527

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

  • Posts: 281
  • Thank you received: 29
Hi, I have tried all the different approaches as described in this thread, but got the same error message as described by tkottary.

I am also using the Rpi3, with the Shoestring BT adapter for the EQ6.

Would be great if someone with similar set up could describe once again how to set up!

Thanks in advance, Helge
6 years 2 months ago #22558

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

  • Posts: 1309
  • Thank you received: 226
The last time I tried my Bluetooth adapter was after I remade it. I encountered that error and left it at that for the time being, assuming I made a mistake. But perhaps there is a bug?
Last edit: 6 years 2 months ago by Andrew.
6 years 2 months ago #22559

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

  • Posts: 281
  • Thank you received: 29
Hi Ilhoujin,

Thanks for responding! Are you also using the Shoestring BT Adapter? If I may ask, in one of your previous posts you were suggesting to add a 1 and the & behind the MAC address, -what is the purpose of the „1“?

Anyway, sounds like your solution was working, but not anymore - so it might really be a sort of „bug“.

Best, Helge
6 years 2 months ago #22560

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

Time to create page: 2.602 seconds