×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

wireless (esp8266 Arduino) moonlite focuser help request

  • Posts: 407
  • Thank you received: 74
Is there anyway to switch off Temperature updates for the Moonlite Driver. Reason is I am working on a Wifi (esp2866) controlled Arduino focuser - Just using the existing Moonlite Indilib driver. It uses UDP to communicate and works ok using the Moonlite Windows Application but Indi version keeps throwing up "termperature update timeout" but still works. My ESP8266 does not ,for now,support real temperature updates but just sends 16 back each time (shows up on Windows App). actual error message is

2018-10-28T18:32:55: [ERROR] 2018-10-28T18:33:04: [ERROR] updateTemperature error: Timeout error."
RPI3 Ubuntu 16.04 / AMD desktop Kstars under Ubuntu 16.04 Mounts :azeq6 ,SWAZGoTo

RPI3 Fedora testing out on AMD desktop Fedpra 28 - running kstars 2.9.4 , Indilib 1.7.4 ?????
5 years 6 months ago #30956

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

  • Posts: 1029
  • Thank you received: 301
Is it right at driver connection, which fails said connection?

-Eric
The following user(s) said Thank You: Clive Stachon
5 years 6 months ago #30969

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

  • Posts: 407
  • Thank you received: 74
Yes as soon as you connect the driver via Indi Devices it starts pumping out the message above at rapid regular intervals. I am going use Wireshark to see what is being returned but as I say using Moonlite's own Windows program I see the "temperature" figure I send (bogus number) and it either ignores problems or there isn't one when connected to the Windows program - note I use Com to UDP to talk to the Windows program as it obviously uses COM ports only.

But as I say it still works and moves the stepper as one expects both via Indi devices display and the Focus module.

I was just asking if the temperature option could be "switch off" as it seems a number of implementations don't use it anyway!

The only major problem I have had with the Arduino(Wemos D1 Pro) is a stack failure when I use the STOP function of Accel Library.

Thanks for replying :-)
RPI3 Ubuntu 16.04 / AMD desktop Kstars under Ubuntu 16.04 Mounts :azeq6 ,SWAZGoTo

RPI3 Fedora testing out on AMD desktop Fedpra 28 - running kstars 2.9.4 , Indilib 1.7.4 ?????
5 years 6 months ago #30972

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

  • Posts: 407
  • Thank you received: 74
Ran Wireshark - only see :C# (which I dont answer) , :GP# which I do answer and is being picked up, :GT# which I always answer with 00020# which on Windows Moonlite program is being shown.

I dont see any Temperature Calibration or Coeficient requests only the GT which is std temperature (I think :-) )
RPI3 Ubuntu 16.04 / AMD desktop Kstars under Ubuntu 16.04 Mounts :azeq6 ,SWAZGoTo

RPI3 Fedora testing out on AMD desktop Fedpra 28 - running kstars 2.9.4 , Indilib 1.7.4 ?????
5 years 6 months ago #30979

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

  • Posts: 407
  • Thank you received: 74
Had a quick look at sources of Indi Lib Moonlite - not my area but the following could be the problem :

1. GT command comes with C command just before
2. Default timeout is 3 (presume microsecs
3. UDP,although fast, is causing the timeout to be triggered

I did say its not my area LOL

bool MoonLite::updateTemperature()
{
int nbytes_written = 0, nbytes_read = 0, rc = -1;
char errstr[MAXRBUF];
char resp[16]={0};

tcflush(PortFD, TCIOFLUSH);

tty_write(PortFD, ":C#", 3, &nbytes_written);

if ((rc = tty_write(PortFD, ":GT#", 4, &nbytes_written)) != TTY_OK)
{
tty_error_msg(rc, errstr, MAXRBUF);
LOGF_ERROR("updateTemperature error: %s.", errstr);
return false;
}

if ((rc = tty_read_section(PortFD, resp, '#', MOONLITE_TIMEOUT, &nbytes_read)) != TTY_OK)
{
tty_error_msg(rc, errstr, MAXRBUF);
LOGF_ERROR("updateTemperature error: %s.", errstr);
return false;
}

tcflush(PortFD, TCIOFLUSH);
RPI3 Ubuntu 16.04 / AMD desktop Kstars under Ubuntu 16.04 Mounts :azeq6 ,SWAZGoTo

RPI3 Fedora testing out on AMD desktop Fedpra 28 - running kstars 2.9.4 , Indilib 1.7.4 ?????
5 years 6 months ago #30984

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

Time to create page: 0.700 seconds