×

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

Bi-monthly release with minor bug fixes and improvements

ttyUSB0 issues on OnStepp and RasPi4

  • Posts: 151
  • Thank you received: 27
hi!
from what i see, you are most likely not connected directly to the microcontroller (that should not be a ttyUSBx device according to the specs) but to the the little extra board on the right hand side of the PCB. a photo might help.

and isn't "astroberry" the default password? i have very little experience with astroberry ...
yours wolfi
4 years 2 months ago #48230

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

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

The guys who mounted the onstep board told me it was straight but I attached the photo to check it (the USB port cables are the ones above the battery {White, Green, Black and red, goes from battery to other side of the board in same high.})



I'm not sure if the "astroberry" user is a root user or is "pi" user the root? (pi user is disabled for security reasons (he says) I can able again if is necessary).

Then I understand that the issue should cames from the permision, doesn't it?
Last edit: 4 years 2 months ago by Pep.
4 years 2 months ago #48233
Attachments:

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

  • Posts: 1221
  • Thank you received: 565
I'm not familiar with OnStep, but I am a bit (unfortunately) familiar with ttyUSB0 issues. Whenever you have more than on serial device, I believe it's wise to use symbolic links rather than the specific device filenames that linux seems to randomly assign.

So, first, if you setup, and you're having this issue, figure out which device your OnStep was assigned. E.g. in a terminal type:
ls /dev/ttyUSB*
and perhaps you'll see /dev/ttyUSB0 and /dev/ttyUSB1.

Then you know your device is one of the two, and you can change the port (in your picture above) to the right device (test the both) and see if things are working.
If this doesn't work, sorry, I guess I misunderstand and ignore the rest of this post. If it does, continue.

The above is a short-term solution, though, because you probably don't want to do this every time you boot up your RPi.
Assuming though that this solved your problem in the short term, the next step is to permanently assign symbolic names to your OnStep device.

I have only done this on Raspbian, so I can't say whether the advice below will work on your OS (not sure what you're using) but this is what I do on Raspbian:

I have two serial devices (focuser and mount) that are randomly assigned, one to /dev/ttyUSB0 and one to /dev/ttyUSB1. To avoid this randomness,
I create symbolic device names for them by adding the following four lines to /lib/udev/rules.d/99-observatory.rules

# MoonLite Focuser
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A601WGWD", MODE="0666", SYMLINK+="focuser"
# EQMod Mount
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTA663FB", MODE="0666", SYMLINK+="mount"

You'll always want to use "usb" and "0666" above, but the other magic strings in quotes (after idVendor, idProduct, and serial) come from the commands below:

(a) the output of the 'lsusb' command gives you vendor and product:

> lsusb
...
Bus 001 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
...
Bus 001 Device 006: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
...

(b) you can get the value needed for "serial" from the below command:

# I'm sure the moonlite is connected to USB1 right now
udevadm info -a -n /dev/ttyUSB1 | grep '{serial}'
ATTRS{serial}=="A601WGWD"
ATTRS{serial}=="3f980000.usb"

(c) Of course, the SYMLINK name (in my case "mount" or "focuser" is arbitrary, but once you have chosen it, you
set your port for your OnStep to that, e.g. /dev/focuser
4 years 2 months ago #48258

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

  • Posts: 1221
  • Thank you received: 565
I didn't mention it above, but it's likely you have to reboot after you modify the /lib/udev/rules.d/99-observatory.rules file for the change to take effect.
4 years 2 months ago #48259

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

  • Posts: 151
  • Thank you received: 27
hi!
the udev changes suggested by hy certainly make sense. i am not too familiar with the onstep either - however, there is one deviation of your device compared to the PCB i saw.
i commented your photo:

there is no serial-to-USB converter - the infamous CP2xxx something - where one is supposed be. i am not too aware of the variants of onstep, and i don't know the STM32. so i can only speculate.
- either the STM has an onboard converter like the various ESP32 chips. i have not seen this from the documentation, but it is possible. (teensies, on the other hand, have a native USB interface, and they are ARM chips, too). then you see this converter chip. i don't understand why howard should have foreseen a separate converter in this case, but maybe the PCB serves different versions.
- or your board uses a native UART (=serial port) of the STM, which it seems to have. then it is adressable as a /dev/ttyS0 or similar device, and the CP2xxx converter you see in lsusb is from a different device (focuser maybe or some other gadget). this port would not show up in lsusb ...
yours wolfi
4 years 2 months ago #48260
Attachments:

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

  • Posts: 84
  • Thank you received: 0
Hi hy & wolfi,

I follow the way of hy and create aa new rule but continuous to tell me that other device use ttyUSB0.
I attach some pictures for to explain me and give you some light for help me.

Seems that recognise the device and is on ttyUSB0.
When I did the new rule for to check the serial



Really the are two devices on ttyUSB0, the serial 0001 is the cp210x nightmare zip, but the other one I don't know what it is. I have only connect OnStep USB and logitech camera.


And for other hand, I tried to purge from indi panel and appear this message about some file *. Xml that not exist.
.
Do you have any idea what is the next step?
Thanks for your suggestions
Pep
4 years 2 months ago #48273

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

  • Posts: 84
  • Thank you received: 0
Hi again wolfi,
If onstep are on ttySO or similar, how I can tell to indi panel to check the ttySO and not ttyUSB0?
And, how I can check where is they cp210x uart com?
What do you suggest about this uart converter?
Thanks a lot for your time, I'm deeply lost on this....
Pep
4 years 2 months ago #48274

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

  • Posts: 151
  • Thank you received: 27
hi!
remove the onstep and run lsusb - see whether there is another device :)

yours
wolfi
4 years 2 months ago #48275

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

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

I'm sorry but today raining a lot in my country and I can't acces to the "dome" (a way to named my telescope covert)

Attachment not found


When I can access to the telescope I 'll try it.
At the moment I attach another picture where you can see that really there are two devices on ttyUSB0, device with serial number 0001 is the onstey device.


For other hand, I lisent that is possible to use a Bluetooth like a serial port in astroberry... Then could connect onstep by bluethoot, doesn't it? But I don't know how to do it. Some one know how to do it?
Thanks,
Pep
4 years 2 months ago #48305
Attachments:

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

  • Posts: 151
  • Thank you received: 27
hi!
well - the strange thing is that two device claim ttyUSB0, this has to be in the udev rules. otherwise, you should see ttyUSB0 and ttyUSB1 ... bluetooth is a last resort, rather. maybe you can find out which other device also has a CP20xx built in (they are very widespread). that might be a first step ...
yours wolfi
4 years 2 months ago #48312

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

  • Posts: 84
  • Thank you received: 0
Hi wolfi and Hy,

I do the test that wolfi suggest and is amazing, the onstep device generate 2 devices. On next picture, you could see over red line: onstep connected on USB without power. And under of red line: USB disconnected physically to the raspi.
Some idea...???
Thanks

Pep
4 years 2 months ago #48321
Attachments:

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

  • Posts: 84
  • Thank you received: 0
Hi to all,
Should be a cp210x driver problem on raspi4? The USB always gives information of the device, but not needely means that have the driver for use the device, isn't it?
Then, some one could tell me how I can install this driver on raspi?
Thanis
Pep
4 years 2 months ago #48361

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

Moderators: Radek Kaczorek
Time to create page: 1.188 seconds