×

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

Bi-monthly release with minor bug fixes and improvements

Toupcam driver question

  • Posts: 10
  • Thank you received: 0
HI all,

I am going through the documentation and cannot find any help about this. Where is the documentation about how to make a driver understand which devices it should open and service? I do know there is a directory with rules files, but it seems incomplete as far as making a real determination.

The Toupcam driver is set up to be the driver for vendor id "0547" according to the rules files. That driver does work for my Solomark camera (product id b123) which makes sense since it was shipped with a disk of Toupcam drivers for PC and Mac systems.

The Mallincam camera I have (DS16C) that I am trying to generate a driver for also uses vendor id 0547. How does the Toupcam driver distinguish the camera product ids that it should not open?

Note the Toupcam driver also will not recognize my Orion Starshoot which is 0547:a004.

I did see that there is a rule for one product id in the 0547 vendor id within the qhyccd rules - product id 1002.

But this question is why and how does the Toupcam driver determine that it should ignore some of the cameras/ids in that vendor range?

Thanks,
John
4 years 8 months ago #41752

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

  • Posts: 1309
  • Thank you received: 226

Replied by Andrew on topic Toupcam driver question

I can not provide a complete answer, but as far as I can tell you are one the right path.
A udev rule with the Vendor ID, Product ID, sometimes the serial port number, and the mode is needed. Then a Symlink created.
This script, intended for creating consistent rules for a serial GPS, may offer a little insight.
github.com/rlancaste/AstroPi3/blob/master/udevRuleScript.sh

Edit: udevadm monitor may provide more detailed information on the camera when it's connected as well.
Last edit: 4 years 8 months ago by Andrew.
4 years 8 months ago #41821

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

  • Posts: 10
  • Thank you received: 0
Thanks for the response. That confirms and expands on some of my reading, so I appreciate the help.

But my confusion is this. in my system, 99-toupcam.rules contains only these lines:

ACTION=="add", ATTR{idvendor}=="0547"., RUN+="/bin/sh -c '/bin/echo 256 >/sys/module/usbcore/parameters/usbfl_memory_mb'"
# All ToupCam Devices
SUBSYSTEMS=="usb", ATTR{idvendor}++"0547", MODE="0666"

There is no list of the productid's that are served by this driver. In reading your comment above, I do see the MODE="0666" on this file. Is it possible that this is what the driver or something in either linux or the astroberry software is using to eliminate other cameras form this driver? Is it possible to read the mode value from a camera? How would I get that value for a Mallincam camera having the camera plugged into a computer?

Thanks again,
John
4 years 8 months ago #41840

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

Time to create page: 0.700 seconds