Welcome, Guest. Please login or register.

Username: Password:

Author Topic: Connection Timeout when disconnecting and reconnecting  (Read 2672 times)

OscarCK

  • Newbie
  • *
  • Posts: 4
    • View Profile
Connection Timeout when disconnecting and reconnecting
« on: March 27, 2018, 20:01:53 »

Hi,

I am building a remotely controlled system and have made an AstroEQ using an original Mega2560, in general I pretty much always get a connection the first time I connect to the controller but if I connect to it at some point disconnect and try to reconnect right away, EQMod gives me the Connection Timeout error, only by disconnecting the USB and reconnecting it I can get it to connect again, this happens on both computers I use, am I missing something, how many of you have this happen, is it an EQMod problem or a Windows problem, when I disconnect the telescope I can still here the steppers being on (energized/braking) even though tracking is off, when I do the trick and get it to reconnect I can hear the stepper turn off for a few seconds and when the software shows it is connected they are reenergized.

I'm running Win 10 Pro on a pretty powerful desktop so I don't think it is the hardware, and Win 10 Home on a low-end laptop which is what I'm going to use most of the times.

Thanks
Oscar
Logged

Washy

  • Full Member
  • ***
  • Posts: 19
    • View Profile
Re: Connection Timeout when disconnecting and reconnecting
« Reply #1 on: April 02, 2018, 21:03:38 »

What's your definition of "right away", 1s, 5sec?  How are you powering the 2650?  There's a couple of things that happen when you disconnect and reconnect the serial with resetting the processor.

If you power your 2650 using USB as the power source I believe you will not get the symptoms you describe as every time the serial reconnects it should cause the Arduino to reset thus the motors should not hold.

The "correct" solution I believe should be a 50uF capacitor between reset and ground.
« Last Edit: April 02, 2018, 21:06:27 by Washy »
Logged

Washy

  • Full Member
  • ***
  • Posts: 19
    • View Profile
Re: Connection Timeout when disconnecting and reconnecting
« Reply #2 on: April 02, 2018, 21:11:49 »

Oh and you can avoid unplugging the cable by either rebooting the computer or disabling the USB hub in device manager.
Logged

OscarCK

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Connection Timeout when disconnecting and reconnecting
« Reply #3 on: April 08, 2018, 08:09:20 »

Hi,

Was a little bit busy and forgot to check the forum, the Arduino is powered through usb, the problem comes when I disconnect the ASCOM driver from the software (C2A, SGP, Poth Hub), the time between connecting the driver again doesn't really matter, I have also waited longer, the USB reconnecting isn't actually physical I do it through a usb server client, the actual device never looses power, but it disappears from Device Manager as if its disconnected completely.

Oscar
« Last Edit: April 08, 2018, 08:40:26 by OscarCK »
Logged