Errors due to port instability


×

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

Bi-monthly release with minor bug fixes and improvements

  • Posts: 243
  • Thank you received: 8

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

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

  • Posts: 67
  • Thank you received: 30
Hello Steve,

I see you are using a u-blox gps dongle. The usb port confilt is between the mount and the dongle.

If your GPSD service is started, you must modify the /etc/default/gpsd file so that the GPS launches after the mount and on another port.

The file should look like this

START_DAEMON="false"
GPSD_OPTIONS="-n"
DEVICES="/dev/gps0"
USBAUTO="false"

Or

DEVICES="/dev/ttyACM0"

The mount takes the port /dev//tyyUSB0 and the GPS /dev/gps0 or /dev/ttyACM0

A very good day

Stéphane
The following user(s) said Thank You: Steve Cohen
1 month 4 days ago #100327

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

  • Posts: 243
  • Thank you received: 8
Thank you, Stephane! I remember similar (but not identical) issues with 1.7 and I will try this. However I would like to understand better. I don’t remember this exact file in 1.7 and I don’t understand why /dev/ttyUSB0 exists until Ekos tries to use it, and then /dev/ttyUSB1 comes into existence and lasts until ekos tries to use it, at which point /dev/ttyUSB0 is again available. But thanks again for this quick reply.
1 month 4 days ago #100334

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

  • Posts: 67
  • Thank you received: 30
Ekos mounts the /dev/ttyUSB0 point for the dongle as can be seen in your image for the mount settings. And it will try to send on it the commands which will fail. The mount will be mounted on /dev/ttyUSB1 since the first port is used, but cannot be used by Ekos.

You must then remove the dongle and the USB cable from the mount to dismantle the dev points.

Systemd looks at the gspd file and first mounts the dongle with USBAUTO. With the value false, we prevent this. And START_DAEMON allows you to launch the gpsd service only on request, for example with Ekos.
1 month 4 days ago #100335

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

  • Posts: 161
  • Thank you received: 110
Hey Steve, serial comm is a PITA and this affects a lot of people. I am testing a small utility that will hopefully solve this problem once and for all. This will be a script that will mount your preferred devices under a static port like /dev/myAwesomeMount and we can feed then ekos with that value so that even if the real port will change, the linked one will be always fixed. Stay tuned
The following user(s) said Thank You: Stefan, Matteo, Steve Cohen
Last edit: 1 month 3 days ago by Mattia.
1 month 3 days ago #100338

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

  • Posts: 243
  • Thank you received: 8

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

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

  • Posts: 67
  • Thank you received: 30
Yes for chrony add these 2 lines.

nano /etc/chrony.conf

refclock SHM 0 offset 0.5 delay 0.2 refid NMEA
drift file /var/lib/chrony/drift

For START_DAEMON, I actually changed it to false to be sure to eliminate all conflicts. But if it works well with true then you might as well leave it like that
The following user(s) said Thank You: Steve Cohen
1 month 3 days ago #100342

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

  • Posts: 243
  • Thank you received: 8
Actually START_DAEMON must be set false from my experiments.

With that, and the chrony stuff, it's all good now.
1 month 3 days ago #100343

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

  • Posts: 243
  • Thank you received: 8
Nope. I spoke too soon. Somehow, in spite of all the changes, /dev/ttyUSB0 still goes away (only /dev/ttyUSB1 remains). Enough. Not going to fight this tonight. Willing to try anything else you might want to recommend another night.
1 month 3 days ago #100345

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

  • Posts: 67
  • Thank you received: 30
Hi Steve,

What we are missing to determine the problem are the logs and screenshots, as in your first message.

The ideal would be to first test the mount alone to determine if Ekos likes it and to use it for a few minutes. In the mount connection settings, you should see the name of your mount's driver above the "Port" line instead of the GPS name (like in your image in the first post).

Then, if it works correctly, connect the GPS and observe what is happening in the logs and settings panel.

And finally, if everything goes well so far, restart everything in order to determine which processes are blocking the dev points with the logs, screenshots, versions of Kstars and Indi and copy of your gpsd configuration file.
The following user(s) said Thank You: Steve Cohen
1 month 3 days ago #100350

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

  • Posts: 243
  • Thank you received: 8
After sleeping on the matter, I decided to say, to hell with the GPS. Since I have to enter the time and location every time I start the mount, I could just go with that, and use the "Mount updates KStars" for time and date setting. That would cover most of it. The only thing missing would be updating the system clock. I could live with that.

In any case that would fulfill your first test item. I will send you logs and screenshots. Then I would go back to trying the GPS, both after startup and before, and send those logs and screenshots and the other information you request.

But I am still wondering, what is going on on the system level here? Why doies tthe system decide that /dev/ttyUSB0 is no good, and set up /dev/ttyUSB1 instead? KStars and INDI logs provide no information on that, even at the most verbose level. Something is causing that to happen and I wonder if system logs would record some useful information about this.
1 month 3 days ago #100355

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

  • Posts: 67
  • Thank you received: 30
The problem comes from udev and its way of mounting dev points.
It is possible to create rules to obtain a static point according to the manufacturer's name
wiki.archlinux.org/title/Udev#Setting_static_device_names

A tutorial made by Indi to create the rules file
www.indilib.org/support/tutorials/157-pe...al-port-mapping.html

It would be interesting to know the identifier of your GPS and the USB/RJ cable of your mount. And check if they are in the rules /lib/udev/rules.d/25-gpsd-usb.rules and /lib/udev/rules.d/69-libftdi.rules
To find them, use the following command as noted in the tutorial

"To find out the serial ID, run the following command against the device node. For example, the find the serial id of the device connected to /dev/ttyUSB0:"

udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' | head -n1
The following user(s) said Thank You: Steve Cohen
1 month 2 days ago #100356

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

Moderators: Mattia
Time to create page: 0.545 seconds