Interfacing with TomTom device (Display devices screen on computer) - c#

Just a quick one, if anyone knows:
Is it possible to display a TomTom devices screen on a computer (so I can interface with it's navigation ability?)
They have an SDK, however that does not have any useful information on this question, but TomTom Home can do it - so can I? C# / C++ / Whatever.
Cheers

TomTom is running linux so you can get the raw image data from /dev/raw.
cat /dev/fb > /mnt/sdcard/screenshot.raw
on the device should do it
Then you need to transfer it to your computer (needs to be done quickly).
This should be possible to do over Bluetooth, over USB or possibly by using a Eye-Fi SD card.
I don't think it is possible to do it any other way.
Access the device by Bluetooth console

Related

Record video from camcorder in C#

I need to be able to record video from an external camera in a C# application.
Unfortunately a webcam is pretty much out of the question as the application will record outside and during the evening/night. That is why I was thinking of a camcorder since it also has manual control over exposure and focus, lower noise and better sensor.
So far I would use the AV/S-Video output from the camcorder and send the signal to a USB capture card (the computer is a laptop so no PCI-E cards).
How would I be able to access the video stream from the C# application, now that it comes from the capture card ?
Does my proposed system seem feasible (achievable, good video quality, good fps)? Does anybody have another working solution?
Thanks
This Code Project Article could be of a good starting point.
The Author mentions :
The main goal of the application was to make it flexible and
extensible. The application itself can communicate with any video
source – it may be an IP video camera or a server, it may be a local
camera attached to USB, it may be an MMS stream from a remote server,
or it may be any other video source. And more of it, the application
can work with all these video sources simultaneously, displaying them
all on a single screen.
The solution I used in the end was Microsoft Expression Encoder.

Audio capturing in C#

I have a MAYA 44 USB sound card and would like to interface it with C#. I want to record from the provided microphones and produce a data array.
I have found examples when using the internal sound card from my laptop but when it comes to external it does not quite work.
Has anyone every connected the above sound card with C# please?
Have you had a look at the DirectSound API (Windows only though, I think). Might provide what you're after.
On how to record audio with C# in general there are already multiple threads on SO, so I won't talk about that.
I see two possible causes for your program which have different solutions:
You need to change which audio sources are muted in the windows volume control ("sndvol32.exe /R")
When opening the audio device there are multiple devices. And you're simply opening device 0 instead of enumerating them and perhaps choosing another one. The external sound-card might appear as a second device.

Expose my program to other programs

I'm messing with the idea of writing a small program to mirror output of a video capture device. If you buy a video capture device you can only use it with one program at a time because the device gets locked. Instead of buying a second capture card id like to write a program to accept input from my capture device and expose the output to other applications.
Capture Device----->Program---->Flash Media Encoder
I've never done this type of thing before. Is it device driver related? Can I make my program look like a capture device to other programs without digging in device driver dev?
If someone could point me in the right direction that would be great.
Can I make my program look like a capture device to other programs without digging in device driver dev?
-No, I'm afraid not. You'd need to do exactly that, write a driver or capture source of your own. You could make some interface to serve up image to multiple apps (what a great idea!) but then it would need to be standardised, and you'd need other companies or developers to use that interface. Again a great idea but you'd need to agree on the feature set - and each developer would likely want something new or different.
(If you are talking about particular/specific other programs, they might have a particular interface you can work with already..)
(I was also assuming you were talking about realtime video capture: if you're talking about photo capture etc, you could write an image file to disk, and then import into the other apps ... not as joined up or integrated as ideal though)
Hope that helps - not an ideal situation though!
I will not say it is impossible, but I will say it is impossible in C# because this will require you to write a device driver software which can emulate virtual capture devices which your other program can use and your program can capture actual capture device and mirror or split the data to virtual capture devices that your device driver will create.
Very much same to Virtual CD Rom Drives that we can create with some software, you will need windows device driver kit for that.
You can write combination of application, one device driver and you can have some sort of C# api or program to control the operation.

Lock usb when plugged in c#

I am trying to make a program that when a usb is plugged into the computer it will lock the usb, so it is not accessable, and then when the user enters the correct password the usb will be accessable.
Is this possible?
Any help would be appreciated,
Thanks.
I found several articles by googling "usb policy c#". Here's the first one and it looks straightforward. The results also showed some CodeProject hits, which you can usually download and learn from.
What you are talking about is called "device control" in the security world. Commercial solutions exist in many flavours (Google it or take the question to SF/SU) but unfortunately I think it's quite complicated to implement on your own. In particular I think you would need to modify the device drivers in the USB layer, which in turn might disqualify C#. You would also need to whitelist certain devices or types of devices, for example your keyboard.
You could perhaps disable USB completely (in the BIOS for example), if it's a notebook and you don't strictly need USB for a keyboard or anything.
Use something like http://www.truecrypt.org/ - it ensures all data is inaccessible until correct password is entered.
I've noticed in other secure USB thumb drives that the encrypted, inaccessible portion is not considered a removable device (it shows up as another hard drive). The part that launches the executable to "login" to the encrypted drive is on a removable device.
FYI the device is a Imation PivotPlus.

How can I determine the speed of a USB port?

Is there an easy way to programmatically determine the speed (or version) of a USB port? I'm looking to control the speed of data sent to a usb port based its maximum bandwidth.
If you need a solution for Windows this should be a good start:
http://msdn.microsoft.com/en-us/library/ms793313.aspx
Basically you should try this:
Enumerate the USB devices and the symbolic names to their drivers
Open a handle to the USB device driver through its symbolic name via CreateFile
Perform a DeviceIoControl on the driver handle with the control code IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX. This will have you returned the structure USB_NODE_CONNECTION_INFORMATION_EX. There you have a member there called Speed of the type USB_DEVICE_SPEED.
(Close the driver handle)
This could also be interesting for you: CodeProject: Enumerate Properties of an Installed Device
To answer your question, I'm sure that there are ways of getting the information you need. I don't know the answer for windows, but Linux has files you can read within the sysfs directory structure.
Speed control is usually taken care of by the drivers and the hardware controlling the bus. Most modern USB controllers really have 2 controllers per port connected. 1 for the slower speed 12Mbps USB 1.0, and another for the higher pseed 480Mbps USB 2.0. There is a magic switch inside that connects it properly. The driver itself makes sure that everything is enumerated properly, controls the flow, etc. A higher level "user-space" application typically doesn't need to worry about these things.
Also, if you have a device that is capable of running at faster than 12Mbps, and you plug it into a 12Mbps port, it'll get dragged down to 12Mbps whether you like it or not. Is it that you want to know that is got dragged down?

Categories

Resources