Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

Stellarium on Ubuntu - SynScan telescope control problems. (Long post warning)


Recommended Posts

Hi all,

Hoping someone can help, I'm at my wit's end with this one.. :D

Scenario:

Santa, as hoped, dropped a nice shiny Synscan upgrade kit for my EQ5 under our tree yesterday. I've been reading up on how to assemble, configure & control it for weeks in anticipation of its arrival. I've chosen stellarium as the software to use, and have had it up and configured with the "dummy" telescope server - in order to get familiar with it.

I have two PCs in this tale of woe, both running Linux. One's a 64bit Gentoo distro on my main desktop machine, the other's 32-bit Ubuntu 9.10 on my laptop.

The problem:

Running the "TelescopeServerNexStar" binary compiled on each machine produces varying results, i.e. it works perfectly on the Gentoo box - but fails to work on the Ubuntu laptop.

The specifics:

Sample output from the Gentoo box:


mike@mike $ ./TelescopeServerNexStar 10000 /dev/ttyUSB0
This is ./TelescopeServerNexStar, built on Dec 26 2009, 07:21:42
14604,07:53:04.652949: NexStarConnection::sendCommand(NexStarCommandGetRaDec)
14604,07:53:04.652981: NexStarConnection::sendCommand: NexStarCommandGetRaDec::writeCommandToBuffer ok
14604,07:53:04.652985: NexStarConnection::sendCommand(NexStarCommandGetRaDec) end
14604,07:53:04.653011: listening on port 10000
14604,07:53:04.653026: Connection::performWriting: writeNonblocking(1) returned 1; e
14604,07:53:04.771982: Connection::performReading: about to attempt readNonblocking
14604,07:53:04.772003: Connection::performReading: 120 bytes to read
14604,07:53:04.772034: Connection::performReading: readNonblocking completed
14604,07:53:04.772044: Connection::performReading: readNonblocking returned 13; A46CDB00,34BA
14604,07:53:04.772049: NexStarConnection::dataReceived: NexStarCommandGetRaDec->readAnswerFromBuffer returned 0
14604,07:53:04.787987: Connection::performReading: about to attempt readNonblocking
14604,07:53:04.788000: Connection::performReading: 107 bytes to read
14604,07:53:04.788010: Connection::performReading: readNonblocking completed
14604,07:53:04.788023: Connection::performReading: readNonblocking returned 5; BF00#
14604,07:53:04.788029: NexStarCommandGetRaDec::readAnswerFromBuffer: ra = -1536369920, dec = 884653824
14604,07:53:04.788035: ServerNexStar::raReceived: 2758597376
14604,07:53:04.788045: ServerNexStar::decReceived: 884653824

Yay! all working nicely..

Sample output when the server is run on the laptop:


mike@roadrunner $ ./TelescopeServerNexStar 10000 /dev/ttyUSB0
This is ./TelescopeServerNexStar, built on Dec 26 2009, 07:54:25
14604,07:56:04.060955: NexStarConnection::sendCommand(NexStarCommandGetRaDec)
14604,07:56:04.061011: NexStarConnection::sendCommand: NexStarCommandGetRaDec::writeCommandToBuffer ok
14604,07:56:04.061026: NexStarConnection::sendCommand(NexStarCommandGetRaDec) end
14604,07:56:04.061081: listening on port 10000
14604,07:56:04.061119: Connection::performWriting: writeNonblocking(1) returned 1; e

Bum :D. Not working.. The first "NexStarCommandGetRaDec" never seems to receive a result from the 'scope. It's not like its locked-up either. The server program will happily accept incoming connections from Stellarium in that state, it just won't communicate with the 'scope.

What I've tried:

I've verified that the USB to serial adapter is working correctly on the laptop by:

  • Checking that /dev/ttyUSB0 appears when it's plugged in.
  • Verifying it's "rw"-able by me.
  • Downloading the NexStar protocol PDF, using "minicom" to connect to the scope manually, and sending commands by-hand to the SynScan unit. It worked beautifully, slewing on command and reporting its RA/DEC with no probs.
  • Adding additional debug output to the source & recompiling. (Which you can see in the Gentoo box output, some of those lines won't appear in your versions. :p) All that's helped me to ascertain is that the "performReading" method is never called.

As far as I can tell I've ruled out all the usual sources of trouble, the 'scope itself works fine with another machine, and I can manually communicate with it on the offending laptop. It's just the TelescopeServerNexStar program that can't.

Which leads me to conclude that there's something wrong with the binary as compiled on the laptop. But what? I'm no C++ programmer (Java's more my bag..)

Does anyone have more C++ expertise? Or alternatively, does anyone have a working binary they've compiled themselves on a Ubuntu box they'd not mind sharing?

Thanks in advance ;). The thought of dragging this giant tower machine that normally lives under my desk outside just to control the 'scope doesn't appeal somehow. :)

Link to comment
Share on other sites

Hi Mike,

I run Ubuntu (well, Kubuntu, but it's the same at this level) and have got Stellarium telescope control running fine. I use the NexStar version of the telescope server with my HEQ5, so that should work for you too. If you PM me with an email address I'd be happy to send you a copy of my TelescopeServerNexStar binary (compiled on 32-bit Ubuntu 9.10).

Also, although this might not be relevant, I do find sometimes that my first attempt at getting things running doesn't work -- Stellarium doesn't display the telescope. But after restarting Stellarium and the scope server things suddenly start working. But I'm guessing you've tried restarting things quite a few times by now!

Ian

Link to comment
Share on other sites

If you PM me with an email address I'd be happy to send you a copy of my TelescopeServerNexStar binary (compiled on 32-bit Ubuntu 9.10).

That's mighty kind of you sir. PM sent.

Also, although this might not be relevant, I do find sometimes that my first attempt at getting things running doesn't work -- Stellarium doesn't display the telescope. But after restarting Stellarium and the scope server things suddenly start working. But I'm guessing you've tried restarting things quite a few times by now!

Heh, restarted? Yeah, once or twice.. :D

I've never had a problem with Stellarium connecting to the server, but it never displays the little scope cross-hairs. I'm guessing that's because the server's not managed to get RA/DEC co-ords from the scope, so doesn't know where it's pointing.

Cheers,

Mike.

Link to comment
Share on other sites

Received binary kindly sent from Breakintheclouds, but..

mike@roadrunner:~$ ./TelescopeServerNexStar 10000 /dev/ttyUSB0 
This is ./TelescopeServerNexStar, built on Oct 15 2009, 12:50:35
14604,10:34:25.704143: NexStarConnection::sendCommand(NexStarCommandGetRaDec)
14604,10:34:25.704217: listening on port 10000
14604,10:34:25.704242: Connection::performWriting: writeNonblocking(1) returned 1; e
14604,10:34:29.091728: connection accepted

This is getting frustrating. :)

That said, Ian's kind help has at least ruled this out as a compilation issue, leading me to look elsewhere...

I now suspect it may be something to do with the way the kernel module is handling the USB to serial converter, having noticed that "stty -F /dev/ttyUSB0 -a" reports different settings to my Gentoo box to that on the laptop. Given that I'm running quite an old kernel on the desktop machine, I'm wondering if the kernel module has been significantly updated.

--- <Mike goes away and checks..> ---

Mmm. Interesting..

Desktop machine:

mike@mike ~ $ dmesg | grep -i ftdi
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device
ftdi_sio 2-7:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232BM
usb 2-7: FTDI USB Serial Device converter now attached to ttyUSB0
usbcore: registered new interface driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver

Laptop:

mike@roadrunner:~$ dmesg | grep -i ftdi
[ 9.631899] USB Serial support registered for FTDI USB Serial Device
[ 9.631957] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
[ 9.634452] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 9.634507] usbcore: registered new interface driver ftdi_sio
[ 9.634510] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver

Yup, looks like the driver has been updated from 1.4.3 to 1.5.0 in the later kernel.

Off to read up on "stty"..

Thanks Ian - even if your binary hasn't directly resolved the issue, it might just have pointed me in the right direction. :D

Link to comment
Share on other sites

Mike,

Given that we know it all works on my Ubuntu computer, presumably things might be sorted if you just make sure you've got the same Ubuntu kernel as me? I've got 2.6.31-16-generic. Might be worth an update?

Ian

Ian, now that is interesting. My Ubuntu laptop is also running 2.6.31-16-generic.

Are you also communicating with your Synscan via a usb to serial converter? Does it also use the ftdi driver?

Link to comment
Share on other sites

What is your laptop? I recall more recent distros (esp on dell laptops) have a problem with FTDI USB->Serial chips/drivers - I believe you need to remove a package to make it work...

Connect the usb->serial and try

lsusb

Then try

apt-get remove brltty

And reboot then try

lsusb

Again and see if its connected and working. I seem to remember there was another step I needed to get my Arduino working (which uses an FTDI chip) but I cant recall right now...

Link to comment
Share on other sites

I am using a serial-to-USB adaptor. Mine is a pretty generic one, but it uses the standard Prolific driver, which most of these adaptors use. Does yours use different drivers?

Yes, it uses the FTDI drivers. Which explains a lot, having just solved the problem. :hello2:

It seems that Ubuntu 9.10 broke the FTDI kernel drivers:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/460857

The solution posted by Kendrick Shaw at the end of that page resolves the problem by patching the offending driver. Hopefully, the Ubuntu chaps will get this resolved properly in the near future.

Now, all I need is some clear sky..

Thanks to all who contributed thoughts, ideas and time. Much appreciated. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.