Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 🚀

@eerkunt

This comment has been minimized.

Copy link

@eerkunt eerkunt commented Dec 29, 2020

👏 Great solution!

@DefConBill

This comment has been minimized.

Copy link

@DefConBill DefConBill commented Jan 9, 2021

Great work! Waiting on my new GEM45 next week and we'll see if it sorts out the hub issue. Fingers crossed!!!!!

@packrat12

This comment has been minimized.

Copy link

@packrat12 packrat12 commented Jan 24, 2021

Works great!! Thanks for the effort and education!

@timucingelici

This comment has been minimized.

Copy link
Owner Author

@timucingelici timucingelici commented Jan 25, 2021

Great work! Waiting on my new GEM45 next week and we'll see if it sorts out the hub issue. Fingers crossed!!!!!

@DefConBill did it work?

@timucingelici

This comment has been minimized.

Copy link
Owner Author

@timucingelici timucingelici commented Jan 25, 2021

Works great!! Thanks for the effort and education!

@packrat12 I am glad it helped. The same took days of digging and debugging for me. :)

@DefConBill

This comment has been minimized.

Copy link

@DefConBill DefConBill commented Jan 25, 2021

Great work! Waiting on my new GEM45 next week and we'll see if it sorts out the hub issue. Fingers crossed!!!!!

@DefConBill did it work?

I didn't get the GEM45. After calling to confirm they had it in stock, my order showed "pending shipment" for three weeks and after multiple emails with no response I cancelled the order and got an EQ6R-Pro instead. The update made the new 6 work perfectly though

@timucingelici

This comment has been minimized.

Copy link
Owner Author

@timucingelici timucingelici commented Jan 26, 2021

@DefConBill May be that was a sign for you to give up from iOptron 😄

I am glad it got sorted out for you at the end. Now all you need is a clear sky!

@SteveWasT

This comment has been minimized.

Copy link

@SteveWasT SteveWasT commented Feb 9, 2021

Above you use command touch /root/authorized_keys but then later say echo to touch /root/.ssh/authorized_keys is that right?

And for a novice with public keys is the content literally YOUR_PUBLIC_KEY or as I presumed I need to generate my own key(s)? I must be doing something wrong as I get 'Server refused our key' or still get asked for password.

@timucingelici

This comment has been minimized.

Copy link
Owner Author

@timucingelici timucingelici commented Feb 9, 2021

Above you use command touch /root/authorized_keys but then later say echo to touch /root/.ssh/authorized_keys is that right?

And for a novice with public keys is the content literally YOUR_PUBLIC_KEY or as I presumed I need to generate my own key(s)? I must be doing something wrong as I get 'Server refused our key' or still get asked for password.

@SteveWasT touch is there to create an empty file as there shouldn't be one by default but echo "some-content" > /path/to/a/file should also do the same, so feel free to skip running the touchcommand.

And the public key is the public key of any key pair. On Unix-like systems (including Mac or the Linux terminal of the Raspberry Pi itself), you can always create a new pair by using ssh-keygen - See the following for how to do it https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

If your connection request is getting refused, please be sure that;

  • You didn't skip running the chmod command. /root/.ssh folder and its content is only accessible by the root user (hence the permissions 600)
  • You have copied the content of your public key file into /root/.ssh/authorized_keys by using the echo command
  • And you're using the right private key when you're SSH'ing to the device. You can specify which file to use with -i of the ssh command when you're connecting from your laptop/PC to the Raspberry Pi device. i.e. ssh -i ~/my_other_private_key_file root@asiair

Let me know if this helps and feel free to share any additional problem you may encounter with!

@SteveWasT

This comment has been minimized.

Copy link

@SteveWasT SteveWasT commented Feb 9, 2021

Above you use command touch /root/authorized_keys but then later say echo to touch /root/.ssh/authorized_keys is that right?
And for a novice with public keys is the content literally YOUR_PUBLIC_KEY or as I presumed I need to generate my own key(s)? I must be doing something wrong as I get 'Server refused our key' or still get asked for password.

@SteveWasT touch is there to create an empty file as there shouldn't be one by default but echo "some-content" > /path/to/a/file should also do the same, so feel free to skip running the touchcommand.

And the public key is the public key of any key pair. On Unix-like systems (including Mac or the Linux terminal of the Raspberry Pi itself), you can always create a new pair by using ssh-keygen - See the following for how to do it https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

If your connection request is getting refused, please be sure that;

* You didn't skip running the `chmod` command. `/root/.ssh` folder and its content is only accessible by the root user (hence the permissions 600)

* You have copied the content of your public key file into `/root/.ssh/authorized_keys` by using the `echo` command

* And you're using the right private key when you're SSH'ing to the device. You can specify which file to use with `-i` of the `ssh` command when you're connecting from your laptop/PC to the Raspberry Pi device. i.e. `ssh -i ~/my_other_private_key_file root@asiair`

Let me know if this helps and feel free to share any additional problem you may encounter with!

Thanks, it is now working.

I generated the keys on another RPi4, where I had root access, and copied the public key to the sdcard in /root/.ssh/authorized.keys (with the chmod 600 cmd to set owner) and this time it worked. Using the ssh -i on both the PC and Pi with the private key let's me access the Asiair now.

@astrokring

This comment has been minimized.

Copy link

@astrokring astrokring commented Feb 11, 2021

This is AWESOME work and thank you for taking the time to share with the community. I thought I would add my struggles and learnings incase others like me (not very skilled at linux) would still like to do this. I am using a separate RPi4B.

first challenge! I forgot how to mount! but just worked around where the files auto-mounted which for me was /media/pi/[long key folder name]. I just prefixed all of your commands with that and it worked fine.

my next stumbling block was the "chmod -r 600 /root/.ssh" I get the error: "chmod: cannot access '600': No such file or directory". With sudo access, I could go into SD cards root, if I LS -aI I can see ".ssh" folder but chmod wouldn't run. After further fumbling I realized that it has to be a capital -R in order for chmod to work, so the correct command is "chmod -R 600 /root/.ssh" then it took and I continued on.

My RPi4B didn't have any keys, so I generated those. Not being familiar with this key process the generation was easy but I made the mistake a few times of copying the private key, not the public key. The keygen process generated two files which could be found on the RPi4B root (not the ASIairPro) called "authorized_keys" and "authorized_keys.pub" which I located in /root/.ssh/ folder. So I kept using the echo command to transfer the newly generated "authorized_keys" to the ASIair SD card "authorized_keys"... when I should have been echoing the "authorized_keys.pub". So for others, make sure you use the .pub file, go into that file and it should be a single long line of text looking like "ssh-rsa xxxxthisisthekeyxxxxx root@raspberrypi". at this point I still couldn't connect, so I gave a try to appending my public key to my RPi4B as well and then I was in, so you have to append the public key to both your linux machine as well as the ASIair.

the final SSH command I need to use "ssh -i ~/.ssh/authorized_keys root@172.10.10.60"

I confirmed the dmsg shows the device successfully attached to ttyUSB0 for me.

the final step - I didn't know what to choose inside ASIair Pro iPad app. Started with SkyWatcher SynScan,SkyWatcher SynScan Beta, EQMod Mount, EQMod with SkySafari and none work. Turns out it needs to be set to the Meade LX 200 Classic @ 115200 baud rate.

@kssolomon

This comment has been minimized.

Copy link

@kssolomon kssolomon commented Mar 10, 2021

I there anyone in the Houston Texas area that can help me with this fix for the AAP?

Kevin

@DefConBill

This comment has been minimized.

Copy link

@DefConBill DefConBill commented Mar 10, 2021

I there anyone in the Houston Texas area that can help me with this fix for the AAP?

Kevin
@kssolomon Are you comfortable backing up your card to a file and restoring it back when done? I'm not in Texas but if I had the card backup I can do the update and send the file back to you

@kssolomon

This comment has been minimized.

Copy link

@kssolomon kssolomon commented Mar 10, 2021

@kssolomon

This comment has been minimized.

Copy link

@kssolomon kssolomon commented Mar 10, 2021

@kssolomon

This comment has been minimized.

Copy link

@kssolomon kssolomon commented Mar 10, 2021

@timucingelici

This comment has been minimized.

Copy link
Owner Author

@timucingelici timucingelici commented Mar 13, 2021

This is AWESOME work and thank you for taking the time to share with the community. I thought I would add my struggles and learnings incase others like me (not very skilled at linux) would still like to do this. I am using a separate RPi4B.

first challenge! I forgot how to mount! but just worked around where the files auto-mounted which for me was /media/pi/[long key folder name]. I just prefixed all of your commands with that and it worked fine.

my next stumbling block was the "chmod -r 600 /root/.ssh" I get the error: "chmod: cannot access '600': No such file or directory". With sudo access, I could go into SD cards root, if I LS -aI I can see ".ssh" folder but chmod wouldn't run. After further fumbling I realized that it has to be a capital -R in order for chmod to work, so the correct command is "chmod -R 600 /root/.ssh" then it took and I continued on.

My RPi4B didn't have any keys, so I generated those. Not being familiar with this key process the generation was easy but I made the mistake a few times of copying the private key, not the public key. The keygen process generated two files which could be found on the RPi4B root (not the ASIairPro) called "authorized_keys" and "authorized_keys.pub" which I located in /root/.ssh/ folder. So I kept using the echo command to transfer the newly generated "authorized_keys" to the ASIair SD card "authorized_keys"... when I should have been echoing the "authorized_keys.pub". So for others, make sure you use the .pub file, go into that file and it should be a single long line of text looking like "ssh-rsa xxxxthisisthekeyxxxxx root@raspberrypi". at this point I still couldn't connect, so I gave a try to appending my public key to my RPi4B as well and then I was in, so you have to append the public key to both your linux machine as well as the ASIair.

the final SSH command I need to use "ssh -i ~/.ssh/authorized_keys root@172.10.10.60"

I confirmed the dmsg shows the device successfully attached to ttyUSB0 for me.

the final step - I didn't know what to choose inside ASIair Pro iPad app. Started with SkyWatcher SynScan,SkyWatcher SynScan Beta, EQMod Mount, EQMod with SkySafari and none work. Turns out it needs to be set to the Meade LX 200 Classic @ 115200 baud rate.

@astrokring Thanks a lot for this detailed comment.

After further fumbling I realized that it has to be a capital -R in order for chmod to work, so the correct command is "chmod -R 600 /root/.ssh"

You're absolutely right. I can't remember if I did a typo or the system I used at that time was accepting lowercase r but it should be R for sure.

I forgot how to mount!

This is something I understand and happens to all of us. At the time of writing, I knew I could provide more detailed guide but I didn't want to create a never ending guide and I was a bit reluctant to boost the confidence of inexperienced users. I also didn't know how ZWO would react to this, so a lot was going on in my mind. Since ZWO started to link this guide even without saying thanks (sending an 2600MM Pro as a thanks would be nice 😄 ), guess I should update this when I have time.

Again, thanks for sharing your progress. I'll try to include your pain points when updating it!

@timucingelici

This comment has been minimized.

Copy link
Owner Author

@timucingelici timucingelici commented Mar 13, 2021

@kssolomon @DefConBill I tried to create a rooted image without testing it on a real device. Please feel free to try and see if it works. It should be way easier than backup up and sending a 30 gig disk image back and fort :)

https://gist.github.com/timucingelici/217ac492bc2b127c6645ce033463d265#use-the-rooted-image

@packrat12

This comment has been minimized.

Copy link

@packrat12 packrat12 commented Mar 13, 2021

I have following since I performed my update at the end of January. I wanted to make an additional comment for those that are concerned about updating their AAP with this process and how it will affect future ZWO updates (as I was). Since performing this update, ZWO has updated the ASIAir Pro software and firmware. These did not cause any issues with either the ZWO update or the update I performed following this guide. My AAP kept working with my EQ6 without any headaches. @timucingelici has been very generous with the support given, IMHO has done a great service for ZWO in making the ASIAir Pro better for certain, very popular mounts, and yes does deserve a 2600MM from ZWO ;)

@timucingelici

This comment has been minimized.

Copy link
Owner Author

@timucingelici timucingelici commented Mar 15, 2021

@packrat12 Thanks for your kind words. 😊

I can confirm that the current implementation of ZWO (including firmware updates) doesn't touch anything related to kernel or the changes this guide suggests. And since you're only upgrading the minor version of the kernel to another stable version of it, there shouldn't be anything incompatible.

@DefConBill

This comment has been minimized.

Copy link

@DefConBill DefConBill commented Mar 15, 2021

I've done this update (thanks Tim and yes, they should send you a 2600 for your troubles and help - after all your helping them support their product) on a newly downloaded and updated image file so the image has no license associated with it. I am willing to share this file so people would only have to download it, burn it on a card and apply their own license to it. Since it would still need license activation does anyone think ZWO would have an issue with it? I'll ask on the FB page as well

@kssolomon

This comment has been minimized.

Copy link

@kssolomon kssolomon commented Mar 15, 2021

@timucingelici

This comment has been minimized.

Copy link
Owner Author

@timucingelici timucingelici commented Mar 16, 2021

I've done this update (thanks Tim and yes, they should send you a 2600 for your troubles and help - after all your helping them support their product) on a newly downloaded and updated image file so the image has no license associated with it. I am willing to share this file so people would only have to download it, burn it on a card and apply their own license to it. Since it would still need license activation does anyone think ZWO would have an issue with it? I'll ask on the FB page as well

@DefConBill The software shipped with the image is still an intellectual property of ZWO and they certainly avoid to make comments on the distribution of it. I tried to raise the question both on their forums and through the emails but they left that unanswered on both.

I know you won't be distributing it with a license, only the software, which requires a license to run, so definitely doesn't sound like to be an issue, and who knows, ZWO may be ok with that for a while. But the problem is that, what if they don't at some point? I guess they can blame others on the backdated distributions if that'd be case.

Another potential problem is that, ZWO can refuse to support the custom imaged devices for potential problems. They have right to refuse to support a custom image. So turning this into a movement and let it be adapted by a larger community may bite users back at some point.

One thing I am curious though; I found traces of othere open-source software, like PHD2 in the ZWO binaries. Not sure if they just re-purposed those projects and then distributed as their own. Lucky for them, they don't have to share the improvements back with the open source projects they use in either case. So they can still own the IP rights if they re-purposed PHD2 and other tools fall under the same license type.

TL; DR; I would show the way but wouldn't fix these for ZWO. May be we should look for alternatives and how to use them in a similar way. Something like AstroBerry but without the x-server/VNC overhead - which was the thing prevented me to start with it. Consumed too much CPU and crippled my RPi 4B for some reason.

@DefConBill

This comment has been minimized.

Copy link

@DefConBill DefConBill commented Mar 16, 2021

@timucingelici it seems we've been looking at all the same things. From what I've seen ZWO hasn't done anything ground-breaking here - they've taken existing open source solutions and brought them together in an elegant way (hat's off to them for that).

I've been running K-stars/Ekos on my ASI Air Pro more than the native software recently. I managed to get the power ports working through Ekos and I primarily image at my cottage so using a computer as opposed to my iPad is not an issue and even VNC is pretty snappy for unattended sessions. I've also been playing with an 8 Gb RPi with Ubuntu that I'm thinking I'll do an antenna mod on and toss it in the AAP case with the power board and a good antenna and see if I can build a driver for the power board to control outputs (right now they just supply 12v with my change)

@SteveWasT

This comment has been minimized.

Copy link

@SteveWasT SteveWasT commented Mar 16, 2021

There is an indi driver for the power board now. I've tried it on Astroberry & Stellarmate (indi-asi-power) kudos to Ken Self - allows adjustments on/off labels and dew power percentage (and the DSLR trigger too). See INDI 3rd party Drivers v1.8.9

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