Unable to add Camera module to designer within VS 2010

Having an issue with adding the Camera module to Gadgeteer project in Visual Studio 2010. All other modules work except for the Camera, which is the one I really need to work. I just picked up the Hydra, Camera module, and the touchscreen and can’t really even test that the parts arrived intact until I can build within Visual Studio. They should be fine, but can’t be too sure.

Attached is a screenshot of the error that I see when I try to add the Camera module in the designer.

I also manually added references in the project and in the Program.generated.cs file, which raised these errors when attempting to build


Assembly: GTM.GHIElectronics.Camera (1.0.0.0) needs assembly 'GHI.Premium.USBHost' (4.2.1.0)
Assembly: GTM.GHIElectronics.Camera (1.0.0.0) needs assembly 'GHI.Premium.System' (4.2.1.0)

Doing a bit of digging on the computer yielded no results for these assemblies so I’m at a standstill. Before doing anything I’d installed the latest build of the .NET Microframework as well as GHI NETMF v4.2 and .NET Gadgeteer Package (Beta 6-22-2012). Uninstalling these and re-installing them didn’t alleviate the problem. I also tried adding references to them myself, hoping that they would show there even if there were no individual files, but that didn’t work either since they weren’t in the list of available assemblies that Visual Studio knew about.

Is there another location that I can grab these files from, or another install that needs to happen in order to get this to work? Are there any other steps that I need to take in order to just be able to get a build going?

Thanks ,
{wm}digital

Welcome to the forums! I do not have good news… :frowning:

The Hydra does not have a USB host socket (H) which is required for the module camera.

@ Mike - That’s a bummer, there wasn’t anything on the site that mentioned this or told me I wasn’t getting the right board for the part. It would have been very helpful to know this before making the purchase :frowning: According to the schematics (http://www.ghielectronics.com/catalog/product/328) there is a USB Device socket on the board. Is that not true??

I just tried doing this with the Spider and Cerberus boards, then again with just the camera itself. and still get the same errors in Visual Studio when trying to add the module. Do you have any insight perhaps into what is causing the main issue of not being able to add the module?

Thanks,
{wm}digital

For next time, please check the socket type. For example the camera page says, requires socket H and support for steaming. Only spider has that currently.

The catalog entry for the camera says a H socket is required, and the Hydra entry does not show a H socket.

the hydra has a USB client socket, which is normally used for program loading and debugging.

I believe the reason the hydra does not support USB host is the processor chip does not have that capability.

So at it’s core, is that a USB camera with an odd header? If so, it would be worth keeping the component to build into other Pi based projects that have full USB.

Not odd header, a gadgeteer header. Yes USB.

Ok, this makes sense and thank you all for clearing up the header issue on the Camera as it relates to the Hyrda board.

I’d like to get back to the original post topic about not being able to work in Visual Studio, though. I can always order a Spider board when it’s back in stock, but if I can’t code for the Camera I’m still in the same place.

Does anyone have any insight on how to get these assemblies or what may be going on in Visual Studio that is keeping me from using the Camera module?

Thanks,
{wm}digital

the designer should work with the camera if the mainboard is a Spider. If you are having problems adding a camera to a Spider project, trying uninstalling the GHI sdk and reinstalling.

I think it doesn’t work in 4.2 but does in 4.1, so with either the 22 June beta SDK of 4.2, or the still-current stable 4.1 SDK, if you create a Gadgeteer 4.1 project and select a Spider mainboard you should be able to drag a camera module onto the design surface.

@ Mike - In my original question I’d said that I get similar errors when I add the Spider board and then add the Camera module. Also, that I’d trued uninstalling and installing. Same results. Just tried now after a reboot and still getting a message saying “A required library could not be found.”

@ RorschachUKJunior - I’ve only run the 4.2 project and not the 4.1 version.

I’d referenced missing assemblies in the namespace, any idea on where to get these or if there will be an update coming out that fixes this?

For the time being I’ll have to wait patiently for a Spider board to come back in stock but would like to see this thread through so that my dev environment is ready for it.

Thanks,
{wm}digital

Or you could put the 4.1 firmware on the Hydra and start using your camera immediately.

@ RorschachUK - According to the specs and the GHI team the Camera won’t run at all on Hydra. Host/socket needed isn’t on the board to access the Camera module. Thanks for the suggestion of trying 4.1, I’m able to add a Spider board in VS2010 and a Camera module without an error. This looks good for 4.1 but version 4.2 still has issues.

The Cerberus board does have the H host/socket and is available on the GHI site, but that board configuration isn’t available under 4.1 of the framework. So I could get a Cerberus board but still won’t be able to use the camera since 4.2 is still throwing errors whenever I try to add a Camera module.

Since I don’t own a Spider board and can’t order one (out of stock right now) I’ll have to sit on the Camera for a while. Kind of a bummer as the idea I want to test relies pretty heavily on images.

If anyone does have a suggestion for how to fix this issue, please let me know. I’ve also tried re-installing Visual Studio and that didn’t work, either. So I’m pretty much out of ideas.

Thanks,
{wm}digital

I just defined a new 4.2 Gadgeteer project, using the June 22 Beta, and was able to attach a camera module a Spider mainboard in the Designer.
The project compiled without any errors or warnings.

I do not have my hardware setup for attaching the camera, so I don’t know for sure if the program will deploy. But, I believe you
were having trouble getting this far.

Might be worth while to start a new solution/project under 4.2 and document each step. Might give us a clue why you can’t
get the designer to work with a camera under 4.2.

This is what camera page says in bold text copy/paste http://www.ghielectronics.com/catalog/product/283

Requires a gadgeteer minboard with over 1MB of RAM, socket type H, and support for USB Cameras (ISO stream).

The first part makes it very clear that over 1MB is needed. Then seeing mainboards comparison here http://www.ghielectronics.com/catalog/compare/ you can see the available ram on mainboards. In short, the camera will only work on spider. I think GHI will be offering a serial camera in near future.

@ Mike I put a lot of info in the original post, I really don’t have any more to give. Let me recap.

I’d followed the instructions about installing the 4.2 QFE1 framework as well as the GHI NETMF v4.2 and .NET Gadgeteer Package (Beta 6-22-2012). Upon opening VS2010 I dragged a Hydra board and the Camera module into the designer and got the error. This was then replicated in new projects using the Spider and Cerberus boards. The error language was:

I have uninstalled and reinstalled these components as well as VS2010 and still have the same results (there was a reboot in there a few times). I’ve tried various install paths where I used the 4.2 framework which came with the Gadgeteer and ones where I used the installer for 4.2 QFE1. They all give me the same error when pulling the Camera module into the designer.

Creating a project under the 4.1 version of the framework allows me to make a project with the Spider board and Camera, but there is no Hydra or Cerberus support in VS2010 within the 4.1 framework.

Manually adding the Camera in code didn’t compile and said there were assemblies missing which I couldn’t find on my computer or a place to add a reference within Visual Studio. Here’s what I saw in the Output window:


Assembly: GTM.GHIElectronics.Camera (1.0.0.0) needs assembly 'GHI.Premium.USBHost' (4.2.1.0)
Assembly: GTM.GHIElectronics.Camera (1.0.0.0) needs assembly 'GHI.Premium.System' (4.2.1.0)

I have a feeling that those ‘Premium’ namespace items are the telling thing here, and just need to know if I can grab those somewhere or if there is an install that perhaps makes those items non-essential for build.

That’s everything in a nutshell. If there’s anything that doesn’t make sense (I’m pretty tired right now) or if you need more info please let me know.

Thanks,
{wm}digital

If they are not on your computer then you do not have the latest SDK installed.

@ Gus I was thinking something along those lines, but not sure now which is the most recent. Also, I tried both the one from Gadgeteer and the standalone installer for QFE1 and neither are working for me.

Wrong SDK. The Camera module is in the GHI SDK not the MS MF SDK.

What do you see in the folder “C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\Camera”?

I am on a 64 Bit OS. If you are on a 32Bit OS check folder “C:\Program Files\GHI Electronics\GHI .NET Gadgeteer SDK\Modules\Camera”

@ Mike I’m on 64-bit WIndows and have that path, can see the NETMF 4.1 and 4.2 folders in there as well. I added references to this module by browsing to the DLL there. Still having errors pop up when I create a new project, drag out a Spider and then add a Camera.

Still poking around, I see another Error popping up for me but this time in the Error List when I tried adding the Camera module to the Spider board:


The type or namespace name 'GHIElectronics' does not exist in the namespace 'Gadgeteer.Modules' (are you missing an assembly reference?)

If I have to do all this manually while it’s in Beta I’m fine with that, but knowing the steps I need to take in order to get things to compile would be great. Some things aren’t getting added or discovered when working with the modules, and for me the Camera is the one that triggers the errors. What references are made when the Camera module is added to the VS project?

Thanks,
{wm}digital