×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Serial Timeout with Moonlite Focuser

  • Posts: 28
  • Thank you received: 0
Hi Chris - here is the log file from a test with 3.0.0. No serial timeouts and the focuser moves in and out correctly.
Regards
Kevin

File Attachment:

File Name: log_12-30-26.txt
File Size:51 KB
2 years 8 months ago #50453
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
I need a log with verbose logging turned on for the driver so the commands to the mount are shown.

Didn't realise that 3.0.0 was so old, December 2018.
2 years 8 months ago #50454

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 0
Verbose logging was selected, I added the mount. Is this what you needed?
Thanks

File Attachment:

File Name: log_13-14-09.txt
File Size:147 KB
2 years 8 months ago #50455
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
No, there's still no focuser serial command data. Adding the telescope just clogs the log with irrelevant telescope information. Maybe there earlier versions don't have the serial dta available.

I don't think there is anything more I can do. The logs with serial data show the correct commands being sent and no indication that they failed, yet the hardware behaves incorrectly. It doesn't seem to happen with the Raspberry Pi so that indicates there is no fundamental issue with the code.

Maybe someone else can help.
2 years 8 months ago #50457

Please Log in or Create an account to join the conversation.

  • Posts: 28
  • Thank you received: 0
Thanks for trying.
2 years 8 months ago #50460

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 28
Hi everybody,

A few days ago, I finished my own DIY focuser based on the Moonlite protocol.
It works with an Arduino, an A4988 driver and a NEMA17 stepper motor.
I have exactly the same problem as the one described here.

2020-05-05T18:25:47: [ERROR] Serial read error: Timeout error.

2020-05-05T18:20:44: [INFO] Focuser is moving to position 1500
2020-05-05T18:20:32: [INFO] Focuser reached requested position.
2020-05-05T18:20:31: [INFO] Focuser is moving to position 3480

Sometimes, the log says "[INFO] Focuser reached requested position. ", but the stepper didn't move.
Sometimes, the stepper goes the opposite direction when adjusting from Ekos. . . (focus in)

To be sure it didn't come from the firmware or the Arduino COM port, I wrote a small soft simply opening directly the COM port (Linux, blocking IO...) reading the greeting message then sending some commands to move the stepper, change the steps, move again etc...
Then I read the status. (Actual pos, step ...). Every thing works fine and I never, ever lose any char.

I have done this tenths of time, with the same result :

MarcusFocus 0.3 - Ready.
Un focuser Arduino/Moonlite sous INDI pour Greg :)

Command sent :SH#:SN0777#:FG#
Command sent :GP#:GH#
Response = 0777#FF#

Command sent :SF#:SN0000#:FG#
Command sent :GP#:GH#
Response = 0000#00#

n = 0


The problem is exactly the same with the two drivers (Moonlite and Moonlite Dro)

I also used the serial monitor of the Arduino IDE to send various commands. Again, no problem.

Hope this helps. :)

- Marc
2 years 6 months ago #53258

Please Log in or Create an account to join the conversation.

You have the full log? Can you also debug the INDI Moonlite driver to see where it is having issues with the response?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
2 years 6 months ago #53286

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 28

Hi, Jasem,

everything else in the log is irrelevant:
I can't turn on debugging of the driver. The button is non-responsive or it jumps immediately from 'ON' to 'DISABLE' (see ** in the log)

org.kde.kstars.indi: EQMod Mount : "[INFO] updateLocation: long = 9.52667 lat = 42.5603 "
org.kde.kstars.indi: EQMod Mount : "[INFO] Observer location updated: Longitude (9.52667) Latitude (42.5603) "
org.kde.kstars.indi: EQMod Mount : "[INFO] Saving device configuration... "
org.kde.kstars.indi: EQMod Mount : "[INFO] Device configuration saved. "
org.kde.kstars.indi: EQMod Mount : "[INFO] Setting UTC Time to 2020-05-06T14:24:23, Offset 2 "
org.kde.kstars.indi: EQMod Mount : "[INFO] Saving device configuration... "
org.kde.kstars.indi: EQMod Mount : "[INFO] Device configuration saved. "
org.kde.kstars.indi: MoonLite : "[ERROR] Serial read error: Timeout error. "
org.kde.kstars.indi: MoonLite : "[ERROR] Unknown error: focuser temperature value (#) " // we don't care, The Arduino is bare, no temp probe
org.kde.kstars.indi: EQMod Mount : "[INFO] Saving device configuration... "
org.kde.kstars.indi: EQMod Mount : "[INFO] Device configuration saved. "
org.kde.kstars.indi: EQMod Mount : "[INFO] Saving device configuration... "
org.kde.kstars.indi: EQMod Mount : "[INFO] Device configuration saved. "
org.kde.kstars.indi: EQMod Mount : "[INFO] Setting UTC Time to 2020-05-06T14:25:54, Offset 2 "
org.kde.kstars.indi: EQMod Mount : "[INFO] updateLocation: long = 9.52667 lat = 42.5603 "
org.kde.kstars.indi: EQMod Mount : "[INFO] Observer location updated: Longitude (9.52667) Latitude (42.5603) "
org.kde.kstars.indi: EQMod Mount : "[INFO] Saving device configuration... "
org.kde.kstars.indi: EQMod Mount : "[INFO] Device configuration saved. "
org.kde.kstars.indi: MoonLite : "[INFO] Debug is enabled. " ** Debug then immediately disable debugging again **
org.kde.kstars.ekos: "Re-disabling debug logging for MoonLite..."
org.kde.kstars.indi: MoonLite : "[INFO] Debug is disabled. "
org.kde.kstars.indi: MoonLite : "[ERROR] Serial read error: Timeout error. "
org.kde.kstars.indi: MoonLite : "[INFO] Moving to Preset 2 with position 1800. " // Nope, returns from 3500 to Pos 128 :)
org.kde.kstars.indi: MoonLite : "[INFO] Focuser reached requested position. " //Actually, this is wrong, as the window in Ekos gives the true position, 123...
org.kde.kstars.indi: MoonLite : "[ERROR] Serial read error: Timeout error. "
org.kde.kstars.indi: MoonLite : "[ERROR] Serial read error: Timeout error. "


So I tried to verify what cxxone said about Kstars 3.0.0 . Of course Kstars doesn't know much about COM ports, but I used the INDI git tree to return to the commit contemporary of Kstars 3.0.0 ( git checkout a06fbccc544296333a59b585b2685f7573501952 ) recompiled it and used the last Kstars with the old indiserver (!).
Well cxxone was right, no more Timeout error and the focuser works perfectly.

Now I'm a bit stuck. The indiserver log doesn't say much about Moonlite.
Is there a way to enable debugging of the drivers from the command line when launching the indiserver ? I don't remember.

If you have an Arduino (UNO or Nano V3) it only takes 5 minutes to setup a working Moonlite (Bare, no need of a driver or a stepper motor to test ) ...
You just plug the Arduino to an USB port, use the IDE to upload the firmware and you're good to go. Really takes 5 minutes.

- Marc
Last edit: 2 years 6 months ago by Marc.
2 years 6 months ago #53297

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
I've just tried and in order to turn driver logging on logging needs to be enabled in EKOS

In the logs window set verbosity to Verbose and set the Output to File.
Then logging in the INDI control panel can be enabled and remain on. I enable logging in the driver and check every box This gives a driver log in ~/.indi/logs/<date>/<driver>.

It's all a bit strange because any change in the EKOS logs settings seems to disable logging but setting verbose and file seems to cause the driver debug settings to remain.

Chris
The following user(s) said Thank You: Marc
2 years 6 months ago #53298

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 28
Well here comes the MoonLite driver log.... I filtered the relevant infos to shorten the file.
It appears every serial Timeout occurs after a :GT# command (Get temperature). Sometimes the response seems to fit, and sometimes, it generates a Timeout.
One time, there is an incomplete answer (chars lost) without Timeout and not after a :GT# command. ( see ??????????? )
The response to the :GI# command (Is the motor moving ?) should have been “01” if the motor is moving, otherwise “00”
To be honest, I must say there is no physical temp probe so far, as I didn't receive the componant yet. The question now is why the Timeout only occurs sometimes?
And why did older versions did not lose chars (See my previous message), when this one does ?

- Marc
2 years 6 months ago #53301
Attachments:

Please Log in or Create an account to join the conversation.


What files exactly do I need to flash to Arduino UNO? I have one over here.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
2 years 6 months ago #53311

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 28
git clone github.com/jbrazio/ardufocus.git

:) Thanks

- Marc
2 years 6 months ago #53312

Please Log in or Create an account to join the conversation.

Time to create page: 0.853 seconds