Astro Seoul

Connecting Meade’s #505 and a USB Serial Adapter (On Linux)

(Source for this was a couple of other sites that I neglected to record.)

Linking my telescope with Meade’s #505 cable and a serial adapter using /dev/ttyS0 just didn’t work, no matter what I tried. So, I couldn’t use Linux astronomy programs to control my LX90.

Here is what I did to solve the problem after getting a USB-Serial Adapter.

To set this up, plug in the USB-Serial adapter to my one remaining USB port. Then after a few seconds I ran “dmesg.” This was the output in relation to the adapter

usb 1-1: new full speed USB device using uhci_hcd and address 5
usb 1-1: configuration #1 chosen from 1 choice

You can do something like this to narrow down the results:

dmesg | grep usb

The thing was detected so now here’s the trick to get its details, although this little procedure probably isn’t necessary for most people. First unplug the adapter and type “lsusb.” This is what I got:

Bus 004 Device 001: ID 0000:0000
Bus 002 Device 002: ID 0a81:0203 Chesen Electronics Corp. Mouse
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 004: ID 413c:8000 Dell Computer Corp.
Bus 001 Device 001: ID 0000:0000

Now plug in the adapter again and run “lsusb” again. This is what I got:

Bus 004 Device 001: ID 0000:0000
Bus 002 Device 002: ID 0a81:0203 Chesen Electronics Corp. Mouse
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 006: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO
Bus 001 Device 004: ID 413c:8000 Dell Computer Corp.
Bus 001 Device 001: ID 0000:0000

It is easy to spot the adapter’s additional details. The ID shows the vendor id and the product id of the USB-Serial adapter. With this we can load the linux kernel module “usbserial” to activate the device, thus:

sudo modprobe usbserial vendor=0×0403 product=0×6001

Now run “dmesg” again. My output was this:

/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device
ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
usbcore: registered new interface driver ftdi_sio
usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

Next instruct Ubuntu to load the module automatically. Include the correct version of the following line in /etc/modules:

usbserial vendor=0×0403 product=0×6001

Fixing a Common Problem in Using ttyUSB0

Something I didn’t mention was that I also got this line further down and apart from the others:

ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0

I didn’t know why this was happening. I also found I couldn’t run anything on ttyUSB0 using Minicom or Gtkterm. Also, in the output from dmesg I noticed references to brltty. I presumed that was the culprit.

Go into Synaptic package manager and uninstall these packages:

brltty
brltty-flite
brltty-x11

But if you are a blind person, you may need them, and it would be a miracle that you just read this sentence. It is beyond me why Ubuntu distributions come with software for the blind as a default, especially when it is going to infere with other devices. Default software should be based on majority use.

Use Gkterm to Quickly Communicate With a Meade Telescope

Fire up or install Gkterm

sudo apt-get install gkterm

Find Ports under the menu and configure it to use /dev/ttyUSB0. Set hardware and software flow control to “No” and Bps/Par/Bits parameter to 9600 8N1. Make sure “Local Echo” is enabled.

Now in the terminal simply do a ctrl-f and you should see an “A” appear.

That means you’ve got a connection. You’re good to go.

Similarly Using Minicom to Communicate With a Celestron Nexstar Telescope

Here’s another method for using Minicom (although you could just as easily use Gkterm) to communicate with a Celeron Nexstar. This is from another source I forget.

In a terminal, as root, open minicom with the -s flag, to set the configuration. Once inside minicom, go to the “Serial port setup.”

Change the Serial Device to the one that you are using (most probably /dev/ttyS0 or /dev/ttyS1), set hardware and software flow control to “No”, and the Bps/Par/Bits parameter to 9600 8N1. Once you have done this, save the setup as a dfl file (in the same main menu), and exit Minicom.

Once you have configured Minicom, launch it without flags. Once inside, you can enable or disable the local echoing, so you can or cannot see what you type in the terminal. And, finally, you can type the commands directly into the terminal.

For example, to test the connection, type “Kx” and it return a “x#” from the telescope.

Note that all these commands specified here are run as root, but not necessarily must be run like him. If you want to gain access to the serial port as a simple user, you have several alternatives:

Give permissions to all users to read/write the device:

chmod 666 /dev/ttyS0

Change the ownership of the device to the specific user:

chown user.group /dev/ttyS0

Include the user in the group that owns the device. In Fedora, its the uucp group, in Debian, the dialout group. In both cases, you must edit the /etc/groups file to include the user into the group. After that, give read/write permissions to the group for the device.

chmod 664 /dev/ttyS0

This solution is a better approach for the problem.

With any of these changes, the simple user user will be able to read/write the device without special permissions. Even with this changes, the Minicom configuration must be done as root, because this configuration is saved as the system’s default, and you need special permission to write those files.


Testing A Meade #505 Cable Connection (On Windows)

Source: From: http://www.weasner.com/etx/autostar/as_testing.html

Note: you can also do the following test via Autostar and the Comm. Test.

This is for testing a communications between a telescope’s Autostar and a laptop connected with a 505 cable and serial adapter. These instructions are useful as a way of finding out what port it is on and establish that communications are working. If something’s not working, at least you can rule out a communications problem.

The following test is done in Windows, using Hypertermal to communcate with the Autostar. In place of Hyperterminal, you could use any terminal emulation program. The main thing is get keyboard entries to the Autostar and get a response.

First, connect up the Autostar and your computer, but only turn the computer on. Run Hyperterminal and name a New Connection or else just File > Properties to configure a connection. If creating a new connection, a box will pop up with a “Connect using” option.

Choose “Direct to COM1.” Then you’ll get a COM1 Properties pop up. Set it to 9600 bits per second, 8 data bits, Parity: None, StopBits: 1; Flow Control: None.

With Hyperterm set up and running, turn on Autostar. After initialization you may see an “X” appear on the Hyperterminal window. This is good news. It’s a kind of “wake up” signal. Press enter on Autostar to get to the Align option.

Now, type a single control-f on your PC’s keyboard. (You won’t see anything you type in the Hyerterminal window unless under Properties > Settings > ASCII Setup, you have local echo checked.) You should see output from the Autostar with an “A” or “P” depending upon whether it’s set up as Alt/Az or Polar mount. If that works, you’ve got communication!

Problems Connecting

If not, try a couple more control-f’s, but if that doesn’t work, something’s wrong.

Go back into Hyperterminal’s settings and move on to the next COM port. Remember to reset the baud rate, etc. Progress through the COM port offerings until you “find” the Autostar. Try the control-f to test.

If an A or P does appear, you can try #:GVF# (pound-sign colon G V F pound-sign). Again, you won’t see what you are typing, but you should get the response of Autostar’s identification string, including the word Autostar and a time and date (when the firmware version was built at Meade).

Once you have a response on a COM port, exit Hyperterminal. You must exit Hyperterminal if you want to use Meade’s Autostar Suite software on COM1.

Alternative Solution

This is what I did when the machine would freeze when I tried to connect to COM1. Also, the serial jack didn’t work for me no matter which COM port I chose. So, I bought a USE-Serial adapter/converter.

Setting this up is pretty easy. Windows usually detects the cable and installs the hardware for it. It also allots a COM port for it. All you need to do is going into Device Manager and see what the COM port is under the device’s properties, or else assign a COM port to your liking.

Next, go into Hyperterminal and use that COM port to test communications.


© 2009 Ubantu  - Powered by WordPress