×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

ttyUSB0 issues on OnStepp and RasPi4

  • Posts: 151
  • Thank you received: 27
hi pep!
well - ttySx is he standard UART, the old style miniDIN 9 COM1 port hardly to be found on any computer anymore (the pi still ha it via dedicated GPIO pins, but no direct connector). the ttyACMx thing - well - i don't think that this is the problem as your cp2102/9 hooks up to ttyUSB0. maybe a try with the pi3+ might shed more light on that problem ...
yours wolfi
4 years 2 months ago #48606

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

  • Posts: 389
  • Thank you received: 15

File Attachment:

File Name: 76-U-Blox.rules.txt
File Size:0 KB


Hello,

This is my rule for my GPS. My USB GPS always took the default ttyACM0 driver. This left out the AstroEQ. AstroEQ is a the motor driver similar to the OneStep. I use ttyACM by incremental use as allowed by the OS. I could not find a use case for ttyUSB within RPI. All other references were for i386 or AMD64 systems. Windows uses COM for its uses. The OS sets this up for RS232 ports. COM is similar to ttyACM. The RPI OS uses ttyACM for needy devices of asynchronous communications.
4 years 2 months ago #48617
Attachments:

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

  • Posts: 84
  • Thank you received: 0
Hi Arado,
Then you suggest I do a rules file like:
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="0001", MODE="0666", SYMLINK+="OnStep"
but change usb for ttyACM.? and left like next:
SUBSYSTEMS=="ttyACM", ACTION=="add", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="0001", MODE="0666", SYMLINK+="OnStep"ç
Is necessary to add someone other parameter on the rules file for this case (Kernel, run, ...)?
Someone knows how to change (if it's possible) the serial of the device?
Thanks,
Pep
4 years 2 months ago #48622

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

  • Posts: 84
  • Thank you received: 0
Hi guys,

A little bit light on my live... I executed "sudo lsof /dev/ttyUSB0" (this returns all the devices or process runs on the ttyUSB0. And the answer is:

sudo lsof /dev/ttyUSB0
[sudo] contrasenya per a astroberry:
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gpsd 1297 gpsd 8u CHR 188,0 0t0 22412 /dev/ttyUSB0


Then I understand that I need to KILL this device. Someone should help me to do it?
Thanks a lot,
Pep
4 years 2 months ago #48638

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

  • Posts: 389
  • Thank you received: 15

Hello Pep.

Somehow, the file that I gave is not reflected by this reply. Look carefully at these commands.

# 1546:01a7 U-BLOX AG
ATTRS{idVendor}=="1546",ATTRS{idProduct}=="01a7", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="1546",ATTRS{idProduct}=="01a7", ENV{MTP_NO_PROBE}="1"
KERNEL=="ttyACM*",SUBSYSTEM =="tty",ATTRS{idVendor}=="1546",ATTRS{idProduct}=="01a7",ATTRS{iProduct}=="u-blox 7 - GPS/GNSS Receiver",SYMLINK+="UBGPS",MODE:="0666"

The stuff following KERNEL== is "t t y A C M * ". Notice the "*" at the end of the ttyACM. The udevadm command KERNEL is required to initiate access to the kernel. I do not like extra noise in my syslog. The preceding commands are to not do MTP and MobileManager probes against this specific device. Yes. this device is a GPS device.

For RPI, use ttyACM. For x386 and AMD64 Linux (non Ubuntu Mate/Raspbian), you do use ttyUSB. I have not seen a single RPI reference to use ttyUSB.
4 years 2 months ago #48640

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

  • Posts: 73
  • Thank you received: 11
Hi Cicera,
I see a lot of Linux passing by which I honestly don't understand much of.....
This is my experience:
I have an EQDrive system on my G11 that mimics a Skywatcher mount and so is usable with EQmod.
Worked perfectly with Windows but with Stellarmate I ran into a problem when starting EKOS:

[WARNING] Port /dev/ttyUSB0 is already used by another driver or process.
[WARNING] Communication with /dev/ttyUSB0 @ 9600 failed. Starting Auto Search...

After some talk with Jasem :
"I'm starting to suspect that something else is interfering with it. Maybe the GPS daemon? in dmesg it was shown pps0
Try to disable gpsd:
sudo systemctl stop gpsd gpsd.socket"

That was it! EQDrive now worked on Stellarmate RPi !
But the problem returned so the final solution:
Now totally disabled the gpsd deamon. Edited the /etc/default/gpsd script and made:

START_DEAMON="false"
USBAUTO="false"
and also put # in front of the rest...

Since then I use it without a glitch :-)

Cheers, Arnold
The following user(s) said Thank You: Pep, Rafael Compassi, jiberjaber
Last edit: 4 years 2 months ago by Arnold de Bruin.
4 years 2 months ago #48651

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

  • Posts: 389
  • Thank you received: 15
Hello,

Yes, GPS devices are very needy and speedy at grabbing communication ports. If ttyACM0 is in use and ttyUSB0 is enabled, the GPS will claim ttyUSB0. I am puzzled why ttyUSB0 is even looked at. My RPI3B+ does not have a device labeled ttyUSB0 as default. Given the talk about Stellarmate, has Stellarmate established ttyUSB0? The device ttyUSB0 cannot be shared by greedy devices like a GPS. GPS devices are supposed to chatter.

Under Astroberry 1.1 and 2.0.0, I use ttyACM* for the multiple RS232 needs I have with my gear. I have both EQMount/EQDRIVE and GPSD running simultaneously. I have two rules for RS232 devices. One is GPS. The other is EQDRIVE. The GPS gets ttyACM0. The EQDRIVE gets ttyACM1. All other USB devices (three cameras) share ttyACM2.

GPSD is used to say the elevation and location of the scope. Manual setup of KSTARS is possible. Therefore, unnecessary devices should be disabled. Devices will only load if plugged in. Linux is cool that why. Have fun and clear skies.
4 years 2 months ago #48656

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

  • Posts: 84
  • Thank you received: 0
Hi to everyone,

Today I'll try it to "Kill" the gpsd from the ttyUSB0 and I'm sure that will work my little (But biggest) OnStep .

But last night I check if I had the cp210x drivers was installed (By modprobe cp210x) and seems that no are. Someone could help to me to install or re-install the drivers?

About the issue that I have, astroberry 1 or astroberry 2 are similars? It's mean, if I should install astroberry 1 I succed something diferent from astroberry2?

Thanks a lot,

Pep
4 years 2 months ago #48658

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

  • Posts: 84
  • Thank you received: 0
Hello guys,

<em><strong>WORKS!!!! </strong></em>



Thanks to everyone who helped me and supported me at all times: wolfi, Hy, Adaro, wbirk, aj55, ...:cheer: ... even when at some point I was tempted by the dark side ...:blink: :evil: :woohoo:
At the end it have been the "gpsd" .... ... the gpsd nightmare ...:evil: :sick: :silly:

Thanks again, all of you who helped me and I hope, this forum-topic, helps people who have a problem like this.
Curious that this is not fixed this issue on astroberry2, I suppose in the next version of astroberry they will already sock it.

By the way, with this I can update without any problems when needed, right?

Thanks again to all !!!!
Today I will sleep peacefully.:) ;)

Deeply thanks,

Pep

I change the topic for [SOLVED]?
Last edit: 4 years 2 months ago by Pep.
4 years 2 months ago #48664
Attachments:

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

  • Posts: 389
  • Thank you received: 15
Hello,

Please send me your rules for these two devices.

LX200 OneStep.
GPSD

Also send me your lsusb dump.

Thank you.
Last edit: 4 years 2 months ago by John Robison.
4 years 2 months ago #48666

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

  • Posts: 84
  • Thank you received: 0
Hy Arado,

The OnStep rule is:

KERNEL=="ttyUSB*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0666", SYMLINK+="OnStep"

About GPSD rule I don't touch nothing I only do it that Aj55 suggest it about to not use from boot moment.
If you want I send it but is to large... (but I don't touch nothing inside).
Thanks,
Pep
PD:
Sorry... I look inside of the gpsd rule and I find my device: (I hope that was you ask me)

# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB) [linux module: garmin_gps]
ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", SYMLINK+="gps%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"
# Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241 and Wintec grays2 wbt-201) [linux module: cp210x]
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="gps%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"

# Cygnal Integrated Products, Inc. [linux module: cp210x]
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea71", SYMLINK+="gps%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"
Last edit: 4 years 2 months ago by Pep.
4 years 2 months ago #48667

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

  • Posts: 389
  • Thank you received: 15


Let's start with creating a 76-LX200.rules

In this document, place this string. No spaces between comments

KERNEL=="ttyUSB*",SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4",ATTRS{idProduct}=="ea60",MODE="0666", SYMLINK+="OnStep"

The second step is create a 76-GARMIN.rules. Add these strings. The "#" symbol is a comment field.

# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB) [linux module: garmin_gps]

KERNEL=="ttyUSB*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="091e", ATTRS{idProduct}=="0003", SYMLINK+="gps%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"

# Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241 and Wintec grays2 wbt-201) [linux module: cp210x]

KERNEL=="ttyUSB*", SUBSYSTEMS=="usb",ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="gps%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"

# Cygnal Integrated Products, Inc. [linux module: cp210x]

KERNEL=="ttyUSB*", SUBSYSTEMS=="usb",ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea71", SYMLINK+="gps%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"[/quote]

Reboot the system. See if there are two ttyUSB ports. If not, use dmesg udevadmn and post the results.
4 years 2 months ago #48668

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

Moderators: Radek Kaczorek
Time to create page: 2.901 seconds