Skip to content

Troubleshooting

Doug Henderson edited this page Jan 4, 2024 · 14 revisions

At the moment there isn't a lot of local troubleshooting that can be done, but the driver generates one or two log files that are very useful when reporting issues.

Camera works in Sony Imaging Edge Remote, but not detected by driver

A couple of users have reported this problem. For both, the solution was to reinstall the Sony Imaging Edge software suite. That seems to have fixed the problem. I suspect this is because the Sony installer sets up the USB to work in MTP mode for the Sony devices.

Latest Sony cameras (A7RIV, A7SIII, and probably any newer ones).

Sony have changed the default OS driver they use to talk to these camera models. They DO still work with the driver, but you need to tell Windows to use it's built-in "MTP" driver otherwise the camera won't be detected. When the MTP driver is being used for these cameras, the Sony Remote software will not be able to see them.

Driver won't load

If your imaging app complains that it cannot load the driver, or you get a complicated error message when trying to click the "Properties" button in the ASCOM chooser, try this:

Run the SonyCameraInfo.exe app. This is normally located in the C:\Program Files\Common Files\ASCOM\Camera. This must be run from the command-line - if you run it by double-clicking you won't get time to read the output.

  1. Find the program using Windows Explorer
  2. Click "START" then "Run" (or just press Windows-R)
  3. Type cmd and press OK
  4. DRAG the SonyCameraInfo.exe from Explorer to the command window - you should see something like C:\Users\yourname>"C:\Program Files\Common Files\ASCOM\Camera\SonyCameraInfo.exe"
  5. Press Enter

Here's what the output looks like on my computer:

C:\Users\dougf>"C:\Program Files\Common Files\ASCOM\Camera\SonyCameraInfo.exe"
Sony Camera Info
~~~~~~~~~~~~~~~~

Loaded 'turbojpeg.dll' from 'C:\WINDOWS\SYSTEM32\turbojpeg.dll'
Loaded 'libraw.dll' from 'C:\WINDOWS\SYSTEM32\libraw.dll'
Loaded 'SonyMTPCamera.dll' from 'C:\WINDOWS\SYSTEM32\SonyMTPCamera.dll'
  Product Name:    Sony MTP Camera Driver
  Product Version: 1.0.0.27

Scanning for Cameras

...

If it pops up a message-box telling you that a file MSVCP120.dll couldn't be loaded, you need to install the VC 2013 Redistributable. See Below (General problems with libraw) Another user has complained about a similar missing DLL (MSVCP140.dll) - the solution is similar to the above (MSVCP120.dll) except you need to follow the instructions for Visual Studio 2015, 2017, 2019, and 2022 from the same page.

The ASCOM Driver Log

This is automatically created when you check the "Diagnostics" box in the driver setup dialog in APT/NINA/SharpCap. It generates a new file every time the driver is loaded (normally every time you connect to the camera). The log only contains ASCOM specific logging and isn't usually super useful when trying to diagnose an issue with a misbehaving camera. The logs generated when this option is enabled show up in your Windows home folder under "Documents" > "ASCOM" > "Logs YYYY-MM-DD" (where that is the date). There is one file per "startup" of the driver.

These logs don't usually get to be too huge, but accidentally leaving them enabled is just a waste of your hard drive's time and effort.

The Driver DLL Log

This log has to be manually enabled. Unlike the ASCOM logs above, this log will get big in a hurry. Additionally, only one file will be created and it'll just grow every time you use the driver. It is suggested to only enable the log when you need to.

  • Enable the log
  • Perform the thing that is breaking
  • Disable the log

Note: Having logging on all the time can noticeably slow the speed of the driver - especially if you have an older or slower computer/hard drive.

The New Way (if you have a version downloaded after the update released on 4/1/2021

  1. Start -> Run -> "cmd"
  2. Type: cd "\Program Files\Common Files\ASCOM\Camera"
  3. Type: SonyCameraInfo.exe /d1 to enable logging, or SonyCameraInfo.exe /d0 to disable logging
  4. Restart the application that uses the driver - you should see the log file show up

When logging is enabled, the driver should create a file in your home folder called "sonycamera.txt". (your home folder is usually something like C:\Users\<your name>, i.e. "C:\Users\Doug").

If you'd like the file to show up on your Desktop instead, use "The Old Way" (below) and set the "Logfile Name" to %HOMEDRIVE%%HOMEPATH%\Desktop\sonycamera.txt

Note: It is suggested that you delete the prior log file before starting your application each time... it'll keep the size down and make things less complicated if you need to upload the log for troubleshooting.

The Old Way

Enabling the log

  1. Start -> Run -> "regedt32"
  2. From the navigator on the left, open "HKEY_CURRENT_USER" -> "Software" -> "retro.kiwi" -> "SonyMTPCamera.dll" (don't go any deeper)
  3. Move to the right-hand pane
  4. Right-click "New" -> "String Value". Set name to "Logfile Name"
  5. Double-click "Logfile Name" and type the full name (from file-explorer) of a text file you'd like the dll to log debugging to
  6. Right-click "New" -> "DWORD Value". Set name to "Log Level"
  7. Double-click "Log Level" and enter the number 1 (it doesn't matter which one of decimal or hex is selected)
  8. Close registry editor
  9. Restart the application that uses the driver - you should see the log file show up

Note: It is suggested that you delete the prior log file before starting your application each time... it'll keep the size down and make things less complicated if you need to upload the log for troubleshooting.

Disabling the log temporarily (this will still write to the log file, but much much less)

  1. Start -> Run -> "regedt32"
  2. From the navigator on the left, open "HKEY_CURRENT_USER" -> "Software" -> "retro.kiwi" -> "SonyMTPCamera.dll" (don't go any deeper)
  3. Move to the right-hand pane
  4. Double-click "Log Level" and enter the number 9 (it doesn't matter which one of decimal or hex is selected)
  5. Close registry editor

Disabling the log permanently (this will stop writing to the log file)

  1. Start -> Run -> "regedt32"
  2. From the navigator on the left, open "HKEY_CURRENT_USER" -> "Software" -> "retro.kiwi" -> "SonyMTPCamera.dll" (don't go any deeper)
  3. Move to the right-hand pane
  4. Double-click "Logfile Name" and delete the text in the box (alternatively, right-click "Logfile Name" and select "Delete"
  5. Close registry editor

General problems with libraw

Older versions of this driver used a version of libraw that required some old Microsoft runtime files. These are not auto-included, but can be downloaded and installed from the Microsoft website. Newer versions (since 1.0.0.38) have used a custom build that does not have this problem

https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0

  1. Look for the Visual Studio 2013 (VC++ 12.0) heading and click on the first link: Microsoft Visual C++ Redistributable Packages for Visual Studio 2013.
  2. Choose your language, and select either the 64-bit version (x64) if you have a 64-bit version of Windows, or the 32-bit version (x86) if you have an older 32-bit version of Windows.
  3. Once it has downloaded, double-click on the installer to install the code.

Hopefully this will fix your problem.

Once you feel you have a log that captures the problem happening, please email it to me (or a link to it) at retrodotkiwi@gmail.com.