Skip to content

Instantly share code, notes, and snippets.

@timucingelici
Last active November 27, 2023 07:12
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save timucingelici/217ac492bc2b127c6645ce033463d265 to your computer and use it in GitHub Desktop.
Save timucingelici/217ac492bc2b127c6645ce033463d265 to your computer and use it in GitHub Desktop.
How to connect EQ6-R Pro to AsiAIR (inc. other Raspberry PI solutions) through USB type B cable

How to connect EQ6-R Pro to AsiAIR (inc. other Raspberry PI solutions) through USB type B cable

Created at: Tuesday, 29th of Dec 2020 Updated at: Saturday, 13th of March 2021

Disclaimer

This document is simply describing my own personal experience and the steps I took to troubleshoot and solve a specific problem.

It also does not provide any guarantees and does not aim to encourage others to violate their vendors/suppliers' terms.

So follow or use it at your own risk. Any harm or unwanted result you may cause is your responsibility.

The Problem

The recent batch of EQ6-R Pro mounts is having connectivity problems with Linux based devices when connecting the mount with a USB Type B cable.

It seems SkyWatcher has updated the chipset they are using from PL2303 to PL23D3, which is a model not yet supported by the stable Linux Kernel, and that's the very reason for the problem.

As of writing this, 5.4.79 was the latest stable for Raspberry Pi OS, yet the new chipset requires a newer version.

How to check which chipset your mount has

  • SSH into your device (or open your terminal)
  • Connect your mount with the USB cable
  • Run dmesg

You should see something like the following;

[   47.052706] usb 1-1.3: new full-speed USB device number 4 using xhci_hcd
[   47.209669] usb 1-1.3: New USB device found, idVendor=067b, idProduct=23d3, bcdDevice= 4.05
[   47.209680] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   47.209688] usb 1-1.3: Product: USB-Serial Controller
[   47.209695] usb 1-1.3: Manufacturer: Prolific Technology Inc.
[   47.209702] usb 1-1.3: SerialNumber: xxxx
[   47.216323] pl2303 1-1.3:1.0: pl2303 converter detected
[   47.218982] usb 1-1.3: pl2303 converter now attached to ttyUSB1

Here, idProduct in line 2 is the chipset model, and the last two lines are simply saying that the OS has recognised it as a USB-to-serial converter.

If you see the device is connected but /dev/ttyUSBx is not created, you need to update your kernel.

Before the update

SSH access and internet connection are enough, but it's a good idea to be prepared if something goes wrong. So;

  • Create an image of your SD card (or disk) so you can restore it if needed
  • Make sure you have the necessary cables and adapters to debug your device with a physical screen and keyboard for potential troubleshooting.

Updating the kernel

rpi-update is your friend and the easiest way to do this for Raspberry Pi devices. Run it as root and watch it happens.

If you encounter any errors, especially in the post-installation phase, do not reboot your device and Google (or Duck?) for the error message(s) you get.

How to SSH into AsiAIR (or similar)?

AsiAIR is just a Raspberry Pi with a custom power board. It runs Raspbian and contains the licensed software (and scripts) of ZWO.

So as long as you bought the device through legitimate channels and did not intend to distribute ZWO's intellectual property, you should be free to do anything you want with the open-source software it comes with.

So my steps were;

  • Create an image of the working SD card in case you need to restore the working copy.
  • Either try the rooted image or root the device/image yourself
  • Once you have the SSH access, jump to After logging into AsiAIR section at the end

Use the rooted image

This guide was proven to be a bit tricky for inexperienced users. So I tried to create a rooted image. I haven't had time to test it properly, but please feel free to see if it can help you skip the next steps. You can download the image here.

Or root the device/image yourself

  • AsiAIR’s SD card had 4 partitions;
    1. /boot -> Fat32/LMB
    2. / -> ext4
    3. /home/pi -> ext4
    4. swap

Attach the SD card with a card reader into another Linux machine and mount the / partition into a folder.

  • Add your public SSH key to the device (/ means the root of the mounted partition here, not your local's root, so update the path accordingly)

    • mkdir /root/.ssh
    • touch /root/authorized_keys
    • chmod -R 600 /root/.ssh
    • echo "YOUR_PUBLIC_KEY" > /root/.ssh/authorized_keys (or just use the editor you’re comfortable with)
  • Unmount the partition, put the SD card back, turn the device on, hear the beep. The beep is good.

  • Ping the device to see if it's reachable over the network with ping IP_ADDRESS

  • SSH into the box with ssh root@IP_ADDRESS

If everything goes as expected, you should be able to log in to your AsiAIR and see the command prompt as root

After logging into AsiAIR

  • Re-mount the root partition with mount -o remount,rw /
  • Update the date with the current date date -s "Tue 29 Dec 2020 12:00:00 GMT"
  • Add a working DNS resolver to /etc/resolv.conf with echo "nameserver 1.1.1.1" >> /etc/resolv.conf
  • (Optional) Run apt edit-sources to comment the China mirrors and uncomment the default repo URLs
  • Run apt update
  • Run rpi-update to update your kernel and follow the instructions
  • Reboot. Hear the beep. Beep is good. Beep is love.

Now you should be able to connect your mount, see the missing output in dmesg and control your brand new EQ6-R Pro with AsiAIR 🚀

@timucingelici
Copy link
Author

Sharing this link: which is provided by ZWO as an already configured Image from ZWO (I think) at least, they shared it. I haven't tested and don't have a need to since my AAPs work fine since the hack.. but figured someone may want to use this if indeed they are now providing a new image with working USB drivers.
https://drive.google.com/file/d/1JAtW5I-RH2XD5qDjWKWRqhnjUjt_z73-/view?form=MY01SV&OCID=MY01SV

Link to ZWO post sharing it:
https://bbs.astronomy-imaging-camera.com/d/12603-connection-to-eq6-r-pro-mount-with-usb-port/8

@astrokring thanks for sharing. I haven't checked the image but I guess the up to date kernel finally took its place in stable versions of Raspbian, so the new chipsets are now supported out of the box.

Re-imaging the SD card is absolutely unnecessary to do this upgrade but since guess that was the easiest for ZWO. I can't say I appreciate how they manage these but 🤷 🙂

@BigBobDalton
Copy link

Awesome tutorial. I have two Raspberry's so ssh'ing in to correct the issue was a breeze thanks to these instructions.

Unfortunately timucingelici is slightly incorrect. Since the newest image doesn't update correctly from the .803 image that includes the USB driver (ASIAIR Pro won't restart, shutdown or Save previous connected devices), this is the "ONLY" way to correct the issue.

Maybe someday ZWO will update their initial image to include the driver, for now, the rpi-update is the best solution.

👍. Many thanks 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment