Welcome, Guest. Please login or register.

Username: Password:

Author Topic: Loss of Com Port (Connection Timeout, Port not Available)  (Read 6482 times)

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Loss of Com Port (Connection Timeout, Port not Available)
« on: October 28, 2017, 00:01:30 »

Guys, I have been running my DIY AstroEq controller for just over a year with great succes, until recently when I started getting frequent 'Port unavailable' messages from EQMOD and nothing seems to rectify this when the problem occurs.

It sometimes happens when attempting to start the equipment but more often it will die during an imaging session.  Powering everything off and restarting again and again has no effect until it apparently decides to work, and runs perfectly again.

I first thought it was a laptop issue, so ran everything from a desktop machine, but the same issue arose quite quickly.  A second (more powerful) laptop also exhibited the problem (Win 10) so I reverted to a clean Win 7 install on that machine, blaming the Win 10 Creators update which had just been deployed.  THe Win 7 configuration has worked fine for 2 weeks of random testing until tonight, when it failed after 30 minutes of use.  It would not reconnect despite more than an hour of trying, including powering everything down, disconnecting and reconnecting cables, power supply, etc, then finally it burst into life for no obvious reason and has been running perfectly for almost 2 hours. When it is in failure mode, disconnecting all other devices/software has no effect, EQMOD running in isolation simply will not locate the port. I have a second AStroEQ unit that I use for experimenting with Stepper driver boards an when the problem occurs, this fails to connect also.

Device Manager always shows that the controller (Mega 2560) is connected and working properly, but EQMOD cannot find the port. The port settings in EQMOD and the COM Port are idential and never change. Tried different USB ports/cables/hubs (powered and non-powered) and am now tearing my hair out.

Any suggestions or obvious things I am missing would be gratefully received!  The controller is located in a small observatory which is dry and has good air circulation so I don't believe that condensation in he controller is an issue. I am running the kit from a 12v 6A switch mode psu - has anyone had issues with using these as power sources?  I have included 7808 supply regulators in my Arduino controllers (AstroEQ and focuser) for the processor board power, with decoupling and filter capacitors on the input and output of the regulator, so I believed that they should be immune to any EMC output from the PSU.

I should add that  only the necessary astro software is loaded on the PC, so no Anti-virus programs to give problems.

I am sure that this will eventually turn out to be something obvious, but until this happens, all suggestions are welcome!

Many thanks

Dave

UPDATE: after imaging for 95 minutes, the mount has stopped tracking again with the port timeout message and will not reconnect.  Off to bed now . . .
« Last Edit: October 28, 2017, 00:28:27 by Jonesdee »
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #1 on: October 28, 2017, 10:26:04 »

Hi,

If EQMOD is not finding the com port, it is unlikely to be the AstroEQ firmware. If it was a firmware issue, simply pressing the reset button on the Arduino should allow you to reconnect by closing and opening EQMOD - you shouldn't have to power off/on, change ports etc.

Have you made any changes recently? updated the firmware? changed the hardware?

Also, have you got another Arduino Mega you can test with? If it's been working fine for a year and you haven't changed anything, it may well be something on the Arduino board has failed (is it an official one or a clone?).
Logged
Tom Carpenter (AstroEQ)

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #2 on: October 28, 2017, 12:50:50 »

Hi Tom, many thanks for your fast reply!

I should first state that my reason for asking this question on your forum was purely to see if others had experienced the same issue in recent weeks or could advise on other things to check, not to question the AstroEQ functionality, which in my experience to date is excellent  ;)

I do not think that it is the controller that is causing issues, as I built two in order to try different stepper driver boards and the problem exists with both units.  My Mega boards are clones, but guided with PHD2, I get perfect 15 minute exposures with my setup, so I assume that they are working as they should.  I have just purchased a third with the intention of building it in a diecast metal box (my current units are housed in plastic enclosures) in case some kind of external EMC is causing issues.  In the meantime I could try wrapping the box in foil, however I wouldn't have expected serial port connections on a PC to be impacted by interference (??)

The only thing that has changed recently is the addition of a 12v 6A Switch mode PSU. I used to run the kit from two golf buggy batteries which are on charge at the moment in order to eliminate the PSU in further testing.

Over the past 2 weeks I have run the kit for more than 20 hours during the daytime and it has been absolutely fine. I tracked the sun using CduC, photographed with BYEOS and although I clearly couldn't guide in daytime, ran PHD2 in looping mode to be sure that I was not overloading the PC.  I also plate solved from image files using AstroTortilla, again to replicate the PC loading during an imaging session.

It appears that something suddenly happens to EQMOD which causes it to ignore the COM ports for a period of time (sometimes hours) then behave normally again. Strange though that the issue can persist after the PC has been sut down completely and restarted. After all the problems I had last night, it powered up normally again this morning (using the mains PSU)!

While this may sound odd, it also seems that the issue occurs primarily at night (!) and I am now wondering if something happens on my mains supply which causes the PSU to misbehave (although the PSU is rated for medical use).  Switching back to batteries will eliminate that, so a few more nights of testing should reveal any improvement in performance.

Thanks again for your help, will let you know if I have any success, as you can probably gather, this has been driving me to distraction in recent weeks  :(.

Kind regards

Dave


Logged

Victor_M

  • Full Member
  • ***
  • Posts: 29
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #3 on: October 28, 2017, 18:32:58 »

Just in case you haven't done it already: have you checked/replaced the USB cable from the computer to the Arduino box?

regards and good luck
VĂ­ctor
Logged

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #4 on: October 28, 2017, 19:01:12 »

Hi Victor

Yep, tried different cables/port/USB hubs to no avail :)

Rgds

Dave
Logged

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #5 on: October 28, 2017, 23:54:31 »

HGi Tom

A bit more information on my issue. 

This afternoon the kit started first time and ran for 4 hours before the port timeout occurred.  Nothing would make it reconnect and my spare controller was not recognised either, despite showing as connected in Device Manager.  THe EQMOD driver setup port search would pause for several seconds on the correct port, then run through to Port 16 and show 'not found'.

I figured that EQMOD should recognise and connect to the spare controller with no connection to the mount (bare box on USB port) and tried it on a different (Win 10) PC.  Again, EQMOD could not connect, despite pausing on the correct port for a number of seconds.  I then ran the AstroEQ utility and it immediately found the board.  I uploaded the config which looked fine and reloaded it to the board and on completion it successfully opened EQMOD  for testing.

As the mount was not connected, I exited the utility and tried connecting to EQMOD via the toolbox.  The Toolbox search tool then found the port immediately and EQMOD opened normally.  The spare controller then ran fine on the Win 7 laptop, despite failing to connect a great many times prior to running the firmware update utility.

Could something in my observatory setup be causing the AstroEq board to become invisible to EQMOD?

In the morning I will run he utility on the controller in my observatory and see if that connects again too.

Cheers

Dave
« Last Edit: October 28, 2017, 23:56:37 by Jonesdee »
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #6 on: October 29, 2017, 10:02:21 »

Hi,

I created a tool a while back that basically displays data being sent by EQMOD to the AstroEQ (actually between any two serial ports). It would be interesting to see what EQMOD is saying to the mount and whether anything is being said back.

You can download the SerialEcho tool from:
https://www.astroeq.co.uk/FileDump/SerialEcho.exe

Additionally you'll need to install com0com and set up a virtual serial port pair (with com port numbers <16 so EQMOD can see them). I have a copy of the setup files for 64bit and 32bit windows here:
https://www.astroeq.co.uk/FileDump/com0com-x64.exe
https://www.astroeq.co.uk/FileDump/com0com-x86.exe

There are plenty of instructions about on the internet for setting up com0com if you don't already have it. Just make sure to name the virtual ports COMx where x is a number <16.

Once set up, run the SerialEcho utility. In the bottom section drop down, select the AstroEQ com port. In the top section drop down, select one of the com0com ports. Then instruct EQMOD to use other com0com port.

When you open EQMOD, you should see the commands being sent to the mount and the responses. If the connection doesn't work (i.e. you hit the problem you are having), in SerialEcho window, press the 'q' key on the keyboard. This will close the SerialEcho tool and save a pair of log files at "C:\Temp\AstroEQUpper.log" and "C:\Temp\AstroEQLower.log". If you could send me those two files, I'll try to figure out what's going on.
Logged
Tom Carpenter (AstroEQ)

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #7 on: October 29, 2017, 11:06:54 »

Hi Tom

Many thanks indeed for your help with this - I will set it up later today and see what happens.

This morning I am unable to connect to either controller via the Firmware update Utility - the EEPROM Read fails with' connection unavailable'.  This happens on both my machines.  Tearing my hair out now  :-[

Hopefully the com port tools will show what is happening . . .

Cheers

Dave
Logged

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #8 on: October 29, 2017, 19:24:39 »

Hi again Tom

I set up the virtual ports on my Win 7 machine and first tried connecting to my spare controller (Controller on COM5, VPs 10 & 11 (EQMOD on COM11)).

It connected immediately and a stream of data was visible in both windows of the Serial Echo tool.

I disconnected the spare controller and plugged-in the main controller which appeared in Device Manager on COM 5.  Following the same procedure, the controller failed to connect and the window for COM 10 simply showed
Port Open
:el*

Pressing 'q' did not appear to have any effect.

Hitting 'ASCOM Connect a second time gavethe same result, then the ASCOM Toolbox failed to respond.

Later I will change USB ports and cables to see if I get a different result.

Thanks again for you help!

Rgds

Dave
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #9 on: October 29, 2017, 20:28:23 »

I presume that was :e1* as opposed to :el*.

In any case the fact there is no response means that either the data is not getting through to the Arduino Mega serial interface, or the AstroEQ firmware is crashed.

What firmware version are you using? Could you try the beta version from the R&D section. With the new firmware it would be interesting to see if the status LED is solid on (indicates bad EEPROM in the new version).

Another thing, does the status LED blink when you try to connect with EQMOD? (indicates command received).
Logged
Tom Carpenter (AstroEQ)

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #10 on: October 29, 2017, 21:19:53 »

Hi Tom, My eyesight is not great these days, so yes I'm sure it would have been '1' rather than 'l'.  I have opened the controller case and think that the board is dead. The power LED lights up but nothing else.  The Firmware Update Utility is unable to conect to it and the Arduino IDE will not upload a simple sketch.  Apart from the odd fleeting blink of the Rx LED, nothing happens at all.  Pressing the reset switch has absolutely no effect.

I will load the BEta software and hook up my spare unit tomorrow and see how that runs.  I assume that it is OK to leave the mount running via the Virtual Port setup? That way if it stops I can attempt to restart it and log the results.

Regards

Dave
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #11 on: October 29, 2017, 21:55:51 »

Leaving the virtual port running shouldn't cause any harm. I can't say I've ever tried running it long term, so its entirely possible that it could crash.
Logged
Tom Carpenter (AstroEQ)

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #12 on: October 29, 2017, 22:28:12 »

Thanks Tom.  Woukd you recommend buying a genuine 2560 replacement board for my controller? Mine are clones, but have run happily for a year now, however I would make the additional outlay if there are advantages to be had from an original unit.

Cheers

Dave
Logged

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #13 on: October 30, 2017, 16:19:49 »

Hi Tom

I have loaded the Beta software successfully and it drives the mount via EQMOD as expected in test mode, using the slew controls.  When I connect to the mount using Cartes du Ciel, however, it slews extremely slowly and the motors are very noisy.  I checked the settings again via via the Update Utility and everything looked fine (I use the EQ-5 Custom Pulley config).  This time I invoked Spiral Search during testing and again the motors were very noisy. Apologies if I have overlooked something in the setup, however I don't think that anything has changed other than the firmware.

I also found that the utility was able to communicate with the Mega board which appeared to be dead yesterday.  I was able to update the firmware on this, but it appears to have an intermittent fault.  Sometimes when performing a firmware update it uploads the firmware, reads the EEPROM OK, indicates that it has loaded the config, but locks up and does not respond to the 'next' button.  This does not happen on my other Mega board, so I have installed the latter board in the controller to eliminate the possible intermittent problem.

I have left the mount tracking and have not had any port discnnect errors from EQMOD, however it frequently runs for 4 hours before failing.  To eliminate the switch mode PSU, I am running on battery.

The controller uses DRV8824 stepper drivers (low current, apparently now discontinued) as these gave some improvement in 1/32 stepping accuracy, plus I have the diode network implemented in this controller.

WIll update you later on the stability of the COM port :)

UPDATE 21:38 - when the lock-up mentioned above occurs, I have now found that the utility will continue processing after a delay of 1 - 2 minutes.  The point at which it stops and waits is shown in the attached screen clip[/i]  The mount has now been tracking without losing the port for 5.5 hours.

Dave
« Last Edit: October 30, 2017, 21:44:15 by Jonesdee »
Logged

Jonesdee

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Loss of Com Port (Connection Timeout, Port not Available)
« Reply #14 on: November 05, 2017, 12:30:40 »

Update on Connection Timeout problem:

I believe that this was caused by two contributing factors - an intermittent fault in the Mega 2560 board and an intermittent 12 volt supply connection issue.  I have swapped the Mega board and replaced the jack plug/socket power connector with a 2 pin screw-in connector. 

These changes don't fully explain all the symptoms I was experiencing (e.g. two different AstroEQ controllers both failing to connect to the mount), however the kit has now run happily for more than 30 hours over a number of test sessions, so I am gaining confidence that it is stable again.
Logged