Raspi HQ & Webcam

Post Reply
chummee
Posts: 8
Joined: Fri May 15, 2020 1:51 am

Raspi HQ & Webcam

#1

Post by chummee »

First of all, a big thank you for designing an amazing polar alignment tool. I just purchased the SharpCap Pro license and was able to use it on my first try. Really intuitive to use, and I was amazed how much my PA done by my polarscope was off.

Second, I've a couple of questions about the cameras I'm using. I am using three cameras: 1) Sony a6000, 2) Raspi HQ camera, and 3) a webcam converted from a Raspi HQ camera using "showmewebcam." I was able to polar align and image using my Sony camera. I didn't try out the webcam in the field, but it seems to be working when I connected it to SharpCap. However, I cannot get the Raspi HQ camera to work.

My Raspi HQ camera is connected to the Raspberry Pi unit, which in turn is tethered to my laptop via an ethernet cable. When I try to have SharpCap connect the camera, I received a message saying that the camera isn't responding and then SharpCap crashed. I have the ASCOM driver installed already. Is it because Raspi recently upgraded to the Bullseye operating system or is it because SharpCap cannot control the Raspi HQ camera no matter what? I can control the camera separately through the Raspi unit, but it'll be a hassle if I want to dither, i.e., I'll have to stop guiding and imaging every X number of frames, manually dither, and then start everything again. Are there easier options available to me?

If the HQ camera proves to be too troublesome, I can conceivably convert both of my Raspi HQ cameras into webcams, but I won't be able to turn off the default "star eater" feature. But let's say I'm going to go down this route, can I connect two identical webcams at the same time? How does Sharpcap know which one is for the guider and which one is the imaging camera?
User avatar
admin
Site Admin
Posts: 13296
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Raspi HQ & Webcam

#2

Post by admin »

Hi,

I think that trying to work out why the ASCOM driver for the RaspiHQ is not working is probably the best way forward - although ASCOM isn't perfect, it gives better control of the camera for this sort of usage than the DirectShow/Webcam driver.

Can you share the full content of the SharpCap log after you have tried to connect to the ASCOM camera and seen the error? Please make sure you are using the latest SharpCap 4.0 (https://downloads.sharpcap.co.uk) before testing.

thanks,

Robin
chummee
Posts: 8
Joined: Fri May 15, 2020 1:51 am

Re: Raspi HQ & Webcam

#3

Post by chummee »

This is the error message:
ASCOM.DriverException: CheckDotNetExceptions ASCOM.RPI_Camera_V3.Camera StartExposure System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.1.205:80
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at ASCOM.RPI_Camera_V3.Camera.StartExposure(Double Duration, Boolean Light) (See Inner Exception for details) ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.1.205:80
at void System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at WebExceptionStatus System.Net.ServicePoint.ConnectSocketInternal(bool connectFailure, Socket s4, Socket s6, ref Socket socket, ref IPAddress address, ConnectSocketState state, IAsyncResult asyncResult, out Exception exception)
--- End of inner exception stack trace ---
at WebResponse System.Net.HttpWebRequest.GetResponse()
at void ASCOM.RPI_Camera_V3.Camera.StartExposure(double Duration, bool Light)
--- End of inner exception stack trace ---
at ASCOM.DriverAccess.MemberFactory.CheckDotNetExceptions(String memberName, Exception e) in C:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 629
at ASCOM.DriverAccess.MemberFactory.CallMember(Int32 memberCode, String memberName, Type[] parameterTypes, Object[] parms) in C:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 421
at ASCOM.DriverAccess.Camera.StartExposure(Double Duration, Boolean Light) in C:\ASCOM Build\Export\ASCOM.DriverAccess\Camera.cs:line 577
at SharpCap.Cameras.ASCOM.NewCameraProxy.StartExposure(Double duration) in C:\Documents\Source Code\SharpCap\src\SharpCap.Cameras.ASCOM\NewCameraProxy.cs:line 880
at SharpCap.Cameras.ASCOM.NewCameraProxy.GrabFrame(CancellationToken token) in C:\Documents\Source Code\SharpCap\src\SharpCap.Cameras.ASCOM\NewCameraProxy.cs:line 846
at SharpCap.Base.CameraProxyBase.GrabFrameWithRateLimit(DateTime startTime, CancellationToken cancellationToken) in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\CameraProxyBase.cs:line 718
at SharpCap.Base.CameraProxyBase.GrabThreadProc() in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\CameraProxyBase.cs:line 643
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I have no computer background, but the IP address of the raspberry pi when I connected it to my laptop is 169.254.29.62. Is a mismatch of IP address the cause of the problem?
User avatar
admin
Site Admin
Posts: 13296
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Raspi HQ & Webcam

#4

Post by admin »

Hi,

yes, definitely an IP address problem of one sort or another.

The 192.168.1.205 address sounds like one that is coming from your broadband router (most of those are set up to give 192.168.X.X addresses). I guess you have configured that at some point in the ASCOM driver settings.

The 169.254.X.X address is the sort that gets assigned as a last resort fall back when all other attempts to get an address fail. It could happen if the RPi is not connecting to your home broadband properly?

If you are just connecting the RPi to the laptop via a network cable then the 169.254 address is probably fine and you need to update the ASCOM driver with that address. Be warned it may change every time you reboot the RPi/computer

cheers,

Robin
chummee
Posts: 8
Joined: Fri May 15, 2020 1:51 am

Re: Raspi HQ & Webcam

#5

Post by chummee »

Does "update the ASCOM driver" involve changing the code, compiling, and installing the driver every time the Raspi is assigned a new IP address? This is way beyond what I am capable of. Any easier alternatives?
chummee
Posts: 8
Joined: Fri May 15, 2020 1:51 am

Re: Raspi HQ & Webcam

#6

Post by chummee »

Not sure if this is the right way to do it, but I changed the IP address for the Raspberry Pi in Profile Explorer. Seems like the IP address was changed, but still getting an error message. I didn't type in ":80" (port number?) at the end of the IP address. Would this be where the problem is?
ASCOM.DriverException: CheckDotNetExceptions ASCOM.RPI_Camera_V3.Camera StartExposure System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 169.254.29.62:80
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at ASCOM.RPI_Camera_V3.Camera.StartExposure(Double Duration, Boolean Light) (See Inner Exception for details) ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 169.254.29.62:80
at void System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at WebExceptionStatus System.Net.ServicePoint.ConnectSocketInternal(bool connectFailure, Socket s4, Socket s6, ref Socket socket, ref IPAddress address, ConnectSocketState state, IAsyncResult asyncResult, out Exception exception)
--- End of inner exception stack trace ---
at WebResponse System.Net.HttpWebRequest.GetResponse()
at void ASCOM.RPI_Camera_V3.Camera.StartExposure(double Duration, bool Light)
--- End of inner exception stack trace ---
at ASCOM.DriverAccess.MemberFactory.CheckDotNetExceptions(String memberName, Exception e) in C:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 629
at ASCOM.DriverAccess.MemberFactory.CallMember(Int32 memberCode, String memberName, Type[] parameterTypes, Object[] parms) in C:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 421
at ASCOM.DriverAccess.Camera.StartExposure(Double Duration, Boolean Light) in C:\ASCOM Build\Export\ASCOM.DriverAccess\Camera.cs:line 577
at SharpCap.Cameras.ASCOM.NewCameraProxy.StartExposure(Double duration) in C:\Documents\Source Code\SharpCap\src\SharpCap.Cameras.ASCOM\NewCameraProxy.cs:line 880
at SharpCap.Cameras.ASCOM.NewCameraProxy.GrabFrame(CancellationToken token) in C:\Documents\Source Code\SharpCap\src\SharpCap.Cameras.ASCOM\NewCameraProxy.cs:line 846
at SharpCap.Base.CameraProxyBase.GrabFrameWithRateLimit(DateTime startTime, CancellationToken cancellationToken) in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\CameraProxyBase.cs:line 718
at SharpCap.Base.CameraProxyBase.GrabThreadProc() in C:\Documents\Source Code\SharpCap\src\SharpCap.Base\CameraProxyBase.cs:line 643
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
User avatar
admin
Site Admin
Posts: 13296
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Raspi HQ & Webcam

#7

Post by admin »

Hi,

updating would usually involve seeing if the author of the driver has made a new version available and downloading and installing that. I'm afraid since I'm unfamiliar with both the ASCOM driver in use here and the RASPI HQ software, I can't give very good advice, but I see that there is a thread on SGL discussing the driver - https://stargazerslounge.com/topic/3569 ... hq-camera/ - maybe worth posting your question there.

cheers,

Robin
chummee
Posts: 8
Joined: Fri May 15, 2020 1:51 am

Re: Raspi HQ & Webcam

#8

Post by chummee »

I see. Thank you, Robin.
Post Reply