×
INDI Library v1.8.6 Released (21 Aug 2020)

August 2020 release of INDI Library v1.8.6 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Serial Timeout with Moonlite Focuser

5 months 2 weeks ago 5 months 2 weeks ago by Marc2b.
Marc2b
Expert Boarder
Expert Boarder
Posts: 119
Karma: 1
More
Serial Timeout with Moonlite Focuser #53297

knro wrote: You have the full log? Can you also debug the INDI Moonlite driver to see where it is having issues with the response?


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

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

5 months 2 weeks ago
ChrisRowland
Platinum Boarder
Platinum Boarder
Posts: 537
Karma: 9
More
Serial Timeout with Moonlite Focuser #53298
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 Marc2b

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

5 months 2 weeks ago
Marc2b
Expert Boarder
Expert Boarder
Posts: 119
Karma: 1
More
Serial Timeout with Moonlite Focuser #53301
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
Attachments:

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

5 months 2 weeks ago
knro
Administrator
Administrator
Posts: 8445
Karma: 51
Serial Timeout with Moonlite Focuser #53311

Marc2b wrote:

knro wrote: You have the full log? Can you also debug the INDI Moonlite driver to see where it is having issues with the response?

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


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

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

5 months 2 weeks ago
Marc2b
Expert Boarder
Expert Boarder
Posts: 119
Karma: 1
More
Serial Timeout with Moonlite Focuser #53312
git clone github.com/jbrazio/ardufocus.git

:) Thanks

- Marc

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

5 months 2 weeks ago
knro
Administrator
Administrator
Posts: 8445
Karma: 51
Serial Timeout with Moonlite Focuser #53318
Thank you. I just finished testing this:

1. GT# command sometimes times out. I tried changed polling period to 1 second, which makes this timeout appear less, but it still happens at random times. Maybe the Arduino is looking for the sensor and taking quite a bit of time there? Not sure.
2. The board returns NOT MOVING even though when it is moving. It happens randomly, maybe 5-10% of the time, but it's definitely there. See screenshot below, I was at 13,000 steps and commanded it to 20,000 and at 14956, it decided to return 00# for the :GI# command. Why? beats me.

The reason you don't see these errors is because you're not running in a loop. Most of the time, these things work OK, but because the drivers continuous reads the value, you see them. The timeout error is not critical and can probably be improved with increasing the polling period. I even stopped reading temperature completely while in motion, but I still kept getting random time out commands.


Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
Attachments:

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

5 months 2 weeks ago
Marc2b
Expert Boarder
Expert Boarder
Posts: 119
Karma: 1
More
Serial Timeout with Moonlite Focuser #53320
Thanks a lot Jasem. :) So I guess I need to find a better firmware for my focuser :(
if someone has a good plan for this ...

Anyway, thanks again for your time and kindness.

- Marc

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

5 months 2 weeks ago
ChrisRowland
Platinum Boarder
Platinum Boarder
Posts: 537
Karma: 9
More
Serial Timeout with Moonlite Focuser #53332
The Moonlite hardware works well with the Moonlite driver. Better than leeching off other people's work.

Looking at that repository it's typcal linux. Precious about it's own copyright, with messages plastered over everything, while being completely contemptous of other peoples copyright, including part of MY ASCOM driver documentation.

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

5 months 2 weeks ago
Marc2b
Expert Boarder
Expert Boarder
Posts: 119
Karma: 1
More
Serial Timeout with Moonlite Focuser #53341
Chris,

I'm sorry to hear this thing infringes some of your own copyrights.How would have I known ? At least, now everybody here knows it is faulty :) Thanks, Jasem !
You're not talking about the Linux world (remember, this thing runs under an Arduino, not under Linux, Windows or Mac.) You're talking about people who do not respect the work of others.
And this kind of people, you can find them on both side, Copyrights and Copylefts ;) Also, remember your beloved Mac runs under Darwin which is ... Free Software deriving from NextStep (Copyright) and BSD (Free Software). Only the GUI is Copyright. I guess things are never binary in the real world :)

Now, you've made your point and you were right to do so. Let's end this, this is not the place for that kind of discussion..

- Marc

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

5 months 2 weeks ago
ChrisRowland
Platinum Boarder
Platinum Boarder
Posts: 537
Karma: 9
More
Serial Timeout with Moonlite Focuser #53346

Marc2b wrote: Chris,

I'm sorry to hear this thing infringes some of your own copyrights.How would have I known ? At least, now everybody here knows it is faulty :) Thanks, Jasem !

I'm not blaming you, you weren't to know of course. OTOH you were perfectly aware that this driver was built using MoonLite's proprierty work.

You're not talking about the Linux world (remember, this thing runs under an Arduino, not under Linux, Windows or Mac.) You're talking about people who do not respect the work of others.

It's the way that the whole open software scene seems to be, the most importand thing - frequently the only documentation - is a copyright message.

And this kind of people, you can find them on both side, Copyrights and Copylefts ;) Also, remember your beloved Mac runs under Darwin which is ... Free Software deriving from NextStep (Copyright) and BSD (Free Software). Only the GUI is Copyright. I guess things are never binary in the real world :)

Beloved Mac? You mut be thinking of someone else. I have an iPad which runs SkyDemon when I'm flying but for development Windows C#, RaspPi, occasionally Arduino or more likely Teensy, and PicAxe.


Now, you've made your point and you were right to do so. Let's end this, this is not the place for that kind of discussion..

- Marc

Some of your points needed a reply but don't see a need to continue.

The sad thing is that it's easier to do this using a protocol that suits the Arduino and is more resilient.

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

5 months 2 weeks ago
Marc2b
Expert Boarder
Expert Boarder
Posts: 119
Karma: 1
More
Serial Timeout with Moonlite Focuser #53347
Chris wrote :

"Beloved Mac? You must be thinking of someone else."

Right, my mistake. Sorry.

Marc

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

5 months 2 weeks ago 5 months 2 weeks ago by Marc2b.
Marc2b
Expert Boarder
Expert Boarder
Posts: 119
Karma: 1
More
Serial Timeout with Moonlite Focuser #53348
Chris wrote :

"The sad thing is that it's easier to do this using a protocol that suits the Arduino and is more resilient. "

You have something in mind ? Any suggestion ? I'm starting to think I'd better write it myself. I'm not a lazy man and I have some experience on the subject. ( But not with the Arduino .)
Any advice welcome as long as I can write it in C.

- Marc

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

Time to create page: 0.555 seconds