PDA

View Full Version here: : Linuxisation


stanlite
07-09-2015, 07:00 PM
Well I have been investigating the means by which I will control my telescope once I move into my new house in (hopefully) mid October. As such I have decided to run the gauntlet of switching over to Linux based image capture.

So far I have set-up a dual boot OS on my image processing machine and installed Kstars with Ekos and Indi libraries. The simulations so far have been promising.

One reason I am considering Linux is because of the ability to run the indi library as a remote server. This means that I will be able to use a Raspberry Pi (i am using a Pi2 but pi 1's work) as a server host at the scope that I can remote into with Ekos from inside the house using either wireless or Ethernet. Best of all the Pi runs of the same USB hub my other equipment will be plugged into. Not bad for only $35

This means that provided the wireless connection works in my location works I would be able to reduce cabling running up the mount to only one (power). I got the Pi today and have loaded the operating system and Indi server on to it and will be testing the remote server with some of my equipment in the coming days.

I will keep you advise of how it goes.

Octane
07-09-2015, 07:18 PM
Interested to know how you go!

H

RobF
07-09-2015, 08:59 PM
Yes, thanks for sharing Grady. Fascinating how small form factor PCs are starting to inflitrate the hobby.

lazjen
07-09-2015, 09:51 PM
I'm sure you're aware of the INDI forums. They should be able to help you out if you get stuck. I've seen some people there exploring using the Raspberry PI. I intend doing so myself if I can ever find time between other projects.

NeilW
08-09-2015, 10:32 AM
I'm interested to know what software you will use for camera control/image sequencing. Is there a Linux equivalent of SGP or APT?

stanlite
08-09-2015, 10:55 AM
Yes it is called Ekos it is a part of Kstars. It apparently does everything SGP does bar the mosaic generation.

It also has a built in guiding application.

here is the link

http://indilib.org/about/ekos.html

Octane
08-09-2015, 10:59 AM
Any idea if Ekos supports an STL-11000M with a self-guiding chip?

H

stanlite
08-09-2015, 11:42 AM
it appears so Octane.

http://www.indilib.org/devices/ccds/sbig-ccd.html

it says that they support dual cameras

Octane
08-09-2015, 12:09 PM
Oh, awesome.

Time to buy another Raspberry Pi 2. :)

H

stanlite
08-09-2015, 12:14 PM
Just a word of warning Octane, in my research I have found that if your imaging using a CCD you need to ensure that the CCD and other devices are plugged into a powered USB hub as the Pi lacks the amps. Also you have to ensure you plug the Pi into the same hub (for power) to ensure there is no differential between devices in regards Voltage and Grounding.

You can plug them in separately but it creates image noise (because the Pi isn't independently grounded.)

Octane
08-09-2015, 02:10 PM
Cheers, Grady.

Yep, I'm using a good powered hub with plenty of slots free. :)

It'll make for some fun experimenting. I'm hoping the Pi has the guts to run my rig. If not, I'll just go back to the XP laptop.

H

stanlite
08-09-2015, 02:21 PM
That's the beauty of the indi system (well compared to ascom). The Pi doesn't have the grunt to do the heavy lifting but Indi allows you to create a server using the Pi and have the CPU heavy processing be done by a decent rig inside the house.

Essentially its like a cheap Ethernet USB hub lol. The Pi 2 has (theoretically) the grunt to do the imaging capture as well but it is advisable to merely us it as a imaging sever.

NeilW
08-09-2015, 04:05 PM
Ohh...this looks really interesting, thanks Grady :thumbsup:

NeilW
08-09-2015, 04:39 PM
BTW, what's your distro of choice for the main PC inside?

stanlite
08-09-2015, 07:57 PM
Distro on main pc is plain unbuntu 15.04 although I am looking at changing to Astrodistro 3.0.

The Pi is running raspberian

lazjen
09-09-2015, 05:36 PM
About the only thing the Pi may struggle with is doing plate solving at reasonable speed. However, INDI can be run in a remote operation, so perhaps the heavy lifting can be done on a remote computer and the Pi just controlling the mount, etc. Something to consider/explore I guess.

pmrid
10-09-2015, 07:03 AM
That's certainly the advice the INDI developers give. It's advice based on the original Raspberry 1 but despite the advances in the new 2B version, probably still holds good - use the RP as server at the scope and remote in from a computer with more grunt. I'm looking at a 2B as server and an Intel Stick Compute as a remote host. Haven't got either yet - Intel Stick on oder though. Anyone tried doing this?
Peter

stanlite
10-09-2015, 08:54 AM
The only limiting factor about the stick is that it only has wireless connection which is fine if you can run everything on the stick but not so good if your wireless connection is dodgy. Also it costs $189 to replace if you have a Dew event as opposed to $35 for the Pi 2.

If this doesn't work though I will probably go down the stick method lol.

Octane
10-09-2015, 10:12 AM
I can't get the INDI library to install. I'm running Raspian. Something about libc6 being less than version 2.17; I didn't think there was any versions greater than 2.13 for the ARM processor.

Any suggestions?

H

rcheshire
10-09-2015, 05:32 PM
http://rts2.org/

http://www.astro.louisville.edu/software/

Is this of any help?

Octane
10-09-2015, 06:12 PM
I'm building from source at the moment. Looks to be good. :)

Will check your links, Rowland, cheers.

H

NeilW
11-09-2015, 01:06 PM
Guys, my Linux knowledge is a bit rusty these days. I have an HEQ5 with a serial/USB adapter cable. KStars/Indi says it can't find the telescope (defaults to /ttyS0), and it just hangs when trying to search for the scope on available ports. Any hints would be welcome (might have to dust off Linux for Dummies :lol: )

Octane
11-09-2015, 03:22 PM
Don't you have to change the ttyS0 to usb0? I thought I saw it on their forum somewhere.

Or, maybe it is ttyS0? Not sure! I'm still stuck while building from source. Need to try another version of gcc/g++ tonight.

H

rcheshire
11-09-2015, 04:00 PM
Xephem is not as pretty but uses INDI and accepts lx200 connections either serial or usb.

NeilW
11-09-2015, 05:18 PM
When I first played around with Linux years ago my computer didn't even have a USB port! ;)

pmrid
11-09-2015, 05:40 PM
I can identify with that. Over the past 25 years or so, I have loaded and unloaded a parade of Linux distros so many times, I could not even guess at the number. In the early days, with command-line only, the flirtation was usually brief but then the GUIs came along and it took longer for me to get frustrated and abandon the effort. I had a brief fling with Astro Distros 1 and 2 last year and actually got INDI/Ekos/KStars going but found that the INDI library still lacked support for some of my gear (SX cameras in particular - at that time). I always hoped that the developers would come up with a GUI/interface that didn't have so many dependencies and require such a large commitment in effort and time to learn. Hell, I/m still struggling with PI.

But I'm a tiger for punishment and have decided to dive in again - this time with an Intel Computer-on-a-stick device running Ubuntu. Ah, the irrepressible urge to fiddle around will never go away!.

Peter

gary
13-09-2015, 12:04 PM
Hi Neil,

USB serial devices are often instantiated as /dev/ttyUSB0, /dev/ttyUSB1
and so on.

If you still have trouble and are using something like a FTDI USB
Serial converter device, see if the driver is loaded by doing
an lsmod.

For example -


% lsmod | grep ft
ftdi_sio 50508 0
usbserial 36296 1 ftdi_sio
usbcore 185584 8ftdi_sio,usbserial,usb_storage,uhc i_hcd,ohci_hcd,ehci_hcd,usbhid


Best Regards

Gary Kopff
Mt Kuring-Gai
(Using UNIX/Linux nearly every day continually since 1976 and still learning)

NeilW
14-09-2015, 11:55 AM
Thanks Gary, I'll give that a try. Spent several hours on the weekend trying to get KStars/Indi to see my HEQ5 without success. Doing an "lsusb" suggests that the system is recognizing that the Serial/USB is there. I'll keep trying :rolleyes:

rcheshire
15-09-2015, 06:40 AM
Does this type of hardware require a special udev rule or is it likely to be covered under the generic usb stuff?

gary
15-09-2015, 02:01 PM
Hi Rowland,

In the following I am talking generic Linux here. I am not familiar with
the kernel these guys might be using with their Raspberry PI boards.
But given it is likely to be a reasonably up to date version of the kernel,
the following should hopefully still hold true.

Firstly, you would need to check if
CONFIG_USB_SERIAL_FTDI_SIO=y
is in the running kernel.

You can do that from within a running system -
# zcat /proc/config.gz | grep CONFIG_USB_SERIAL_FTDI_SIO

If it were not set, you would need to set it in the .config file of the
kernel source, do a make, go drink coffee for a while and
when the image is ready, load the new kernel.

When you insert the FTDI USB Serial device and type
# dmesg

somewhere toward the bottom you should see a message of the type -

[ 60.123920] usb 1-1.1: Detected FT232RL
[ 60.127866] usb 1-1.1: Number of endpoints 2
[ 60.132156] usb 1-1.1: Endpoint 1 MaxPacketSize 64
[ 60.136982] usb 1-1.1: Endpoint 2 MaxPacketSize 64
[ 60.141823] usb 1-1.1: Setting MaxPacketSize 64
[ 60.150705] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0

If you do a
# ls /dev/ttyUSB*
you should also see the device instantiated there.

Now, if that was the only USB Serial device you ever used, you
could always access it via /dev/ttyUSB0.

If you had more than one and sometimes the various ttyUSBn's got
mixed around, you might then want to add a udev rule to create
a persistent name.

Here is a link on how to do that -
http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/

In the example on that web page, the author exploits the unique
identification number of each adapter. As long as you kept the same
adapter coupled to the same telescope port or whatever, then you
can then address your peripherals using your own symbolic names.

All the above is probably of help to Neil, assuming he is using a FTDI
device and assuming whatever kernel he was running didn't have
FTDI support compiled in.

Best Regards

Gary

rcheshire
15-09-2015, 07:49 PM
Hi Gary. That's a trip down memory lane. It's been a long while since I compiled my own kernels and drivers and wrote a udev rule. I recall now, udev can be used to create a persistent name for the device.

phomer
31-01-2016, 02:22 PM
Grady,

How did you go with your INDI efforts, I am setting up a Raspberry PI 2 with Raspbian at the moment. It also has a Wi Pi and a Raspberry Pi case. Quite snazzy but not particularly water resistant but fairly responsive.

So far I have only performed some tests with my QSI 583 but I also want to set up PHd2 guiding to run my lodestar.

Regards

Paul

kens
31-01-2016, 07:20 PM
I installed Ubuntu Mate 15.10 on my Pi2. Then you can install PHD2 easily from https://launchpad.net/~pch/+archive/ubuntu/phd2
I'm now looking at Ekos which uses an adaptation of linguider. Also trying to work out how to run PHD2 on the desktop with the camera connected to the Pi2.
Another advantage of Indi is that you can run multiple noes. So for instance you could have the imaging cam on a different Pi from the guidecam.
I found the Ekos tutorial video at http://www.indilib.org/about/ekos/video-tutorials.html very informative

phomer
02-02-2016, 08:57 PM
My problem is that when running Ekos I can control my guide camera through the kstars INDI control panel but cannot work out how to connect PHD2 to the camera through INDI. I select INDI camera in PHD2 but keep getting a socket: connection refused.

I have tried doing this with INDI connected and disconnected from the camera but it makes no difference. A dialogue window pops up showing INDI Server, hostname: localhost, Port: 7624, with a connect button beneath.

Camera shows as Driver: empty, CCD: Guider, Port: empty.

There are no dropdown options with driver.

This is running under Raspbian with PHD2 built by me.

Regards

Paul

The_bluester
03-02-2016, 03:45 PM
Interesting to see this. I was thinking of building an Intel NUC for much this purpose (As I commented in another thread) but for use at home near my network if a Pi can do the remote work while another PC does the gruntwork it could be a great option. Plus cheap, small and low power consumption even compared to a NUC.

I believe the Pi2 is around six times the processor power of the original. I am using one as a home theater PC in my shed.

kens
03-02-2016, 07:13 PM
Try changing CCD to Main Imager. Guider is for a camera connected to the ST4 port
I have both Ekos and PHD connected in my setup.