Paul Nixon replied to the topic 'Relays for shutter release' in the forum. 3 months ago

Well...uhhhhh...yeah, easy. ;)

It's been 30 years since I built anything in Linux, and even then I don't recall mucking about too much.

Is there no way to build just the driver? Or would this create a mismatch in dependencies, etc.?

Read More...

Paul Nixon replied to the topic 'Relays for shutter release' in the forum. 3 months ago

I found the dsusb driver source online and feel confident I can make the changes. What do I need to install on my pi to compile the new driver? This thread: www.indilib.org/forum/astroberry/7751-libindi-compilation.html seems to suggest this is a huge undertaking. Does it have to be?

Thanks.

Read More...

Paul Nixon replied to the topic 'Relays for shutter release' in the forum. 3 months ago

Shoot - that makes sense. ;)

So, I'll see about modifying the existing dsusb driver.

Read More...

Paul Nixon replied to the topic 'Relays for shutter release' in the forum. 3 months ago

Sorry if this is a repeat - I thought I'd already replied.

I really like your idea - thank you! I notice the option is available in 3.5.4 but not 3.4.3, so I got my "newer" pi fired up and wrote the two scripts -one to close the relay (open the shutter), and the other to open the relay (close the shutter).

I can get the shutter to open, but I'm having to run my shutter_close script to manually close the shutter when using the Nikon driver, and when I am using the gphoto driver, I get the following error even though I have "port" blanked out.

2021-10-28T01:52:01: [ERROR] Error starting exposure
2021-10-28T01:52:01: [ERROR] Failed to open serial port: /dev/ttyUSB0
2021-10-28T01:52:01: [INFO] Starting 10 seconds exposure.
2021-10-28T01:52:01: [ERROR] Error starting exposure
2021-10-28T01:52:01: [ERROR] Failed to open serial port: /dev/ttyUSB0
2021-10-28T01:52:01: [INFO] Starting 10 seconds exposure.

I rebooted the pi to make sure it wasn't just a glitch. I know 10s is within the camera's capabilities without bulb mode, but I have force bulb mode on and am just trying to make sure I can control the relay correctly.

Thoughts?

Read More...

Paul Nixon replied to the topic 'Relays for shutter release' in the forum. 3 months ago

I've been looking at dsusbdriver and think I see some hope for the HID relays. I was going to experiment with creating a variation of that driver just for this purpose, but I don't seem to be able to get the sources with apt-get, so more thought required.

Since I can drive the HID relays using usbrelay, the specific commands to open and close the relay should be straightforward. I'll report back if I get anywhere.

Read More...

Paul Nixon replied to the topic 'Relays for shutter release' in the forum. 3 months ago

Thanks. I thought a bit more about recompiling, and I don't think that would gain me anything as it would then be an either/or situation. Best I can think of would be to "scrap" the KMTronic relay board and find more of these others, then recompile. That would be a shame, though. I like the KMTronic board. ;)

Read More...

Paul Nixon replied to the topic 'Relays for shutter release' in the forum. 3 months ago

Hi Kevin and many thanks for the quick reply!

I was able to get the UART-based USB relay to toggle by setting the port with
stty -F /dev/ttyUSB0 speed 9600 cs8

and then sending the on/off commands:

echo -n -e '\xA0\x01\x00\xA1' > /dev/ttyUSB0

echo -n -e '\xA0\x01\x01\xA2' > /dev/ttyUSB0

Those are very different from KMTronic's so not helpful, unfortunately. Unless the KMTronic commands were changed out somehow. I imagine that would require recompiling at least.

I am puzzled about the HID relay. I set the port to /dev/hidraw0, and the relay closes when I tell it to take a pic. It just doesn't open again, and subsequent attempts have it looking to /dev/ttyUSB0. Would I possibly be correct in assuming that once the relay is triggered, the pi (or driver) can no longer communicate with /dev/hidraw0, defaults to /dev/ttyUSB0, and then errors because that device is not present?

Read More...

Paul Nixon created a new topic ' Relays for shutter release' in the forum. 3 months ago

I have a D5100 that works fine using the KMTronic relay board for shutter release. I have two other relay boards, one is an HID-based board, the other sets up like a regular COM port.

From the command line using usbrelay S2OD2_1=1 and usbrelay S2OD2_1=0 I am able to toggle the relay on and off. In Ekos, when I set the port to /dev/hidraw0 and attempt to take a 1sec exposure, the relay closes but does not open. Subsequent attempts cause "Error opening /dev/ttyUSB0" though I've no idea why it is attempting to open /dev/ttyUSB0 when it should be trying /dev/hidraw0. I asked some time ago about such relays and was told dsusb *might* work but it would depend on the device ID or something. So, is there hope?

The other relay does show up as /dev/tyyUSB0, but when I try to activate it, I see no activity. usbrelay doesn't see it. I tested this relay in Windows so it is a working relay. 

I'm wanting to have a second USB shutter release for my second Nikon D5100. The KMTronic relay boards are available still, but of the two I previously purchased, only 1 was actually working. These other boards I have them in hand. Suggestions? Thanks.

 

Read More...

I was able to clone the "working" image, but it behaved the same as the non-working image. Yes, I can run raspian (buster?) no problem. 

What I had tried was updating using a Pi Zero. It got about 97% done but then stopped responding.

I took my "working" Pi and did the same thing. It, too, got to about 97% and then started giving errors. It had to do with some stuff not already installed. Once I installed what was missing, it was happy.

This updated image works in my second Pi just fine (so far). I haven't had much chance to really test it completely with it being monsoon season and all, but I have confidence. 
 

Read More...

Paul Nixon replied to the topic 'I killed gpsd somehow' in the forum. 6 months ago

As a followup - 

I flashed a new AB203 sd card. It came up fine.

I followed the instructions here: maker.pro/raspberry-pi/tutorial/how-to-u...-with-raspberry-pi-4

When I ran sudo cgps -s, I got the wrong gps coordinates. 

I ran sudo systemctl disable virtualgps.service

Repeated the instructions above

This time, sudo cgps -s returned the correct coordinates.

Rebooted

sudo -cgps -s returns: cgps: no gpsd running or network error: -6, can't connect to host/port pair

What am I missing?
 

Read More...

Paul Nixon created a new topic ' I killed gpsd somehow' in the forum. 6 months ago

Apologies if this is a duplicate - I thought I'd asked this last night but didn't see it listed under "My Topics"

Somehow, in troubleshooting my second Pi4 w/AB203, I have changed something on my primary Pi4 w/AB203 so that gpsd no longer comes up at boot. This is my primary Pi4 w/UART gps. It had an issue whereby it would sometimes show the wrong location, but I was told this was due to vgps running. Maybe when I disabled that I somehow disabled something else?

I have followed this page: askubuntu.com/questions/1120881/how-can-...unch-gpsd-on-startup. I had been able to manually start it, but now even that doesn't work.

BTW, the "problem" Pi4 is working fine, but it uses a USB dongle for GPS. 

What can I check? Thanks.

 

Read More...

Thank you again for the suggestion. I cloned the "working" image. Unfortunately, it behaves the same. :(

Read More...

Thank you! Very interesting.

I have had *some* success. I inserted the SD card into a PiZero I have, and it came up fine. I then attempted to do an update/upgrade to see if maybe that would help. Unfortunately, the PiZ doesn't have a lot of horse power and updates got to 96% before CPU went to 100%. However, I was able to do a safe shutdown.

I transferred the card to my "broken" Pi, and this time it came up all the way. It looked like it was working, but I wanted to double check the updates/upgrades. So, I reran the update commands. I got an error: "Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

So, I did. And I got various errors such as:
dpkg: dependency problems prevent configuration of astroberry-server-wui:
 astroberry-server-wui depends on gpsd; however:
  Package gpsd is not configured yet.

dpkg: error processing package astroberry-server-wui (--configure):
 dependency problems - leaving unconfigured
Setting up indi-full (1.9.1) ...
dpkg: dependency problems prevent configuration of astroberry-server-sysmod:
 astroberry-server-sysmod depends on gpsd; however:
  Package gpsd is not configured yet.

dpkg: error processing package astroberry-server-sysmod (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of virtualgps:
 virtualgps depends on gpsd; however:
  Package gpsd is not configured yet.
dpkg: error processing package virtualgps (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of astroberry-server-full:
 astroberry-server-full depends on astroberry-server-wui; however:
  Package astroberry-server-wui is not configured yet.
 astroberry-server-full depends on astroberry-server-sysmod; however:
  Package astroberry-server-sysmod is not configured yet.
 astroberry-server-full depends on virtualgps; however:
  Package virtualgps is not configured yet.

It goes on a bit, and ends with this:
dpkg: error processing package astroberry-server-full (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 gpsd
 astroberry-server-wui
 astroberry-server-sysmod
 virtualgps
 astroberry-server-full
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't yet have GPS, so I would have thought it would ignore gpsd.

Anyway, that's where I am presently. If you know a quick solution...;)

Thanks!
 

Read More...