Can driver for Windows 10 Desktop be used for Windows 10 IoT directly? - windowsiot

On a Windows 10 Desktop, I can install Samsung's USB Driver for Mobile Phone, downloadable from Samsung's Developer portal, so that their mobile phone is recognisable in Windows 10 desktop when connected over USB port.
Since I don't have access to the driver source code, rebuilding the driver to be a Universal Driver is not an option. I'm also not sure whether this is already a universal driver or not.
So, the question is whether it is possible to directly use the driver binaries, such as .sys, .inf file extracted from the desktop driver on the Minnowboard Max running Windows 10 IoT? Would it be compatible? I noticed that in the GPIO sample driver project, in addition to the .sys and .inf file, a ACPI table dat file generated from ASL file is required for deploying the driver, is it possible to get around it if the desktop USB driver can be reusable directly?

Related

Why am I getting "Data source name not found and no default driver specified" and how do I fix it?

When trying to make a program on Windows that connects to a database via ODBC, I got the following error:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
I'm sure my code is right. It even worked on a different PC.
Why am I getting this error? And How do I fix it?
What causes this error?
The error message tells you, simply put, that the ODBC Driver Manager could not find the driver you specified in your connection string or DSN.
This can have 3 common causes:
The driver you tried to use is not installed on your system
The driver is installed, however, it doesn't match bitness of the code you're running
You made an error in typing the driver name
How do I check which drivers are installed on my system?
You can check the drivers which are installed on your system by going to the ODBC Data Source Administrator. To open it, press ⊞ Win + R, and type in: odbcad32.exe. Then check the tab Drivers for installed drivers. The Name column indicates the exact name you should use in your connection string or DSN.
If you're on 64-bit Windows, that only lists the 64-bit drivers installed on
your system. To see which 32-bit drivers are installed, press press ⊞ Win + R, and type in: C:\Windows\SysWOW64\odbcad32.exe, and go to the Drivers tab again.
The driver is installed, but it might be the wrong bitness, what do I do?
Then, you have two choices, either adjust the bitness your program is running in, or install a driver with a different bitness.
Some of the drivers that are installed by default on Windows only have a 32-bits variant. These can't be used with 64-bits programs.
You can usually identify which bitness a program is running under in task manager. In Windows 10, all 32-bit programs have (32-bit) appended to their name. If that isn't there, you're likely running a 64-bit program, and most modern programming languages and environments run on 64-bit by default, but allow you to switch to 32-bit. However, the specifics for different programming languages are outside the scope of this question.
How can I verify I didn't mistype the driver name?
An ODBC connection string looks like this:
DRIVER={DriverName};ParameterName1=ParameterValue1;ParameterNameN=ParameterValueN;
The driver name part needs to be delimited by curly braces if it might contain special characters, and needs to exactly match the installed driver name, as found in the ODBC Data Source Administrator, including spaces and typographical characters, but excluding capitalization.
Note that for deployed code, the driver must be present on the computer/server running the code.
I don't have the driver, or have the wrong bitness, where do I get the right one?
That depends on which driver you want to use.
A list of common drivers with download locations (all 32-bit and 64-bit at the same URL):
The Microsoft ODBC Driver 17 for SQL Server
The Microsoft Access database driver, which is part of the Microsoft Access Database Engine. Note that simultaneous installations of 32-bit and 64-bit Access ODBC drivers are not supported.
The MySQL ODBC connector by Oracle
The open-source SQLite ODBC driver by Christian Werner (non-official)
psqlODBC, the official PostgreSQL driver
If the driver you want to use isn't listed, the location is usually easily found using Google.
In design mode, a value has been set to the property of
TFDConnection.ConnectionDefName must be empty.

KDMF Driver Deployment to Windows 7 Virtual Machine

I get the following error when I try to deploy the KDMF Driver template to a provisioned Windows 7 host:
error: Network debugging is not available for Windows versions 6.1 or earlier.
I've tried updating the host by installing the latest WDK and the Windows SDK. I'm at a loss for what to do.
For a Windows 7 VM, you will need to do kernel debugging through serial. If you are using HyperV, you can simply configure a virtual COM port that goes through a named pipe.
In Visual Studio, you can then configure your kernel debugger settings for serial debugging over a named pipe. Even outside of Visual Studio, that's the most reliable way I know to kernel debug a Win7 VM.
The target computer must be windows 8 or later for kernel mode debugging over a network.

How to register ODBC driver?

I have created a inventory system for my school project and I use SqlLite as standalone DB. I am able to run it as long as I install the SqlLite ODBC connection (separate installer).
But what I want is to create an installer and install the SqlLite ODBC Drivers along with my porject in one installer instead of of running two separate installer (my application and sqlLite ODBC driver installer).
Any idea how to do it? Or do you have any recommendation?
What I have done so far. I copy the SQLLite ODBC dll into my application folder and run it but an error shows telling that no ODBC driver installed. I failed to register the SqlLite odbc dll on both 32 and 64 bit windows OS.
You can use the odbcconf command to register the driver dll directly. Note there're both 32 bit and 64 bit ODBC drivers, so you will need to use the respective odbcconf command.
For example to install 64 bit ODBC driver on 64 bit machine:
odbcconf /A {INSTALLDRIVER "My Driver Name|driver=Path to my driver dll"}
To install the 32 bit driver on 64 bit machine:
%systemroot%/systemwow64/odbcconf /A {INSTALLDRIVER "My Driver Name|driver=Path to my driver dll"}
You can find more about the odbcconf command at Microsoft Docs
It was difficult to find, so i'm going to add it as an answer here on Stackoverflow. I knew the answer from spelunking the registry, but i wanted the supported method.
From Registry Entries for ODBC Components archive, we learn ODBC drivers are registered in the registry.
HKEY_LOCAL_MACHINE
SOFTWARE
ODBC
Odbcinst.ini
ODBC Drivers
will contain a value for each driver equal to "Installed":
So you would need to create something like:
HKLM\SOFTWARE\ODBC\Odbcinst.ini\ODBC Drivers
"SqlLite": REG_SZ = "Installed"
For each driver, there will then exist an
HKEY_LOCAL_MACHINE
SOFTWARE
ODBC
Odbcinst.ini
[Driver name]
In this folder is a series of Driver specifications:
Microsoft documents these items quite nicely in the Driver Specification Subkeys archive page on MSDN.
In the case of an SqlLite ODBC driver that would mean there is a key called:
HKLM\SOFTWARE\ODBC\Odbcinst.ini\SqlLite
and you would have to be sure to create all the values for the SqlLite ODBC driver.
But don't do that
Another item in the driver details is a reference count (called UsageCount). This Usage Count is not meant to be fiddled with by people; but instead is updated when you call the functions:
SQLInstallDriverEx archive
SQLRemoveDriver archive
So while you can push stuff into the registry yourself, you should be calling the documented API SQLInstallDriver.
And while it's probably safe to read the registry to see what drivers are installed, the documented say to get the list of drivers is:
SQLGetInstalledDrivers archive
What I would recommend for you is to create a bootstrapper installation package. You didn't mention the platform you are delivering for, but since you are writing about installers I will assume that the platform is Windows.
There are multiple installer frameworks you can use to create installers for your software on Windows, but the one I recently used and would recommend is WixToolset. They have some documentation on how to build bootstrapper bundles here
In great simplicity my wix bootstrapper came down to installing one exe installer and one msi installer and the configuration looked something like this (in great simplicity - the link I provided has full documentation on how to configure all the features)
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Version="..." Name="...">
<Chain>
<ExePackage Id = "x86redist" SourceFile="..." ... />
<MsiPackage Id = "myApp" SourceFile ="..." ... />
</Chain>
</Bundle>
</Wix>
in the end after building, my bootstrapper bundle looked like this
and made sure both my software and the redistributable package were installed on the machine when it was finished.
You could use exactly the same approach - the bundle could install the odbc driver using its original installer, and then install your software.

Remote usb connection C

I'm trying to connect to an USB device that's on a remote PC (because there is no 64-bit driver for it, remote PC is 32-bit).
I know the commands that I need to send to make settings on the device but I don't know how I can get connected to it. Is there a C++ or C# library that makes it possible to connect to this device on a remote PC?
You might be able to build something using Microsoft's RemoteFX technology, assuming Windows is your target platform.

VNC or NX from Mac client to Linux server

I run an NX server and tightvncserver on my linux box (Ubuntu 10.04), with default settings.
I have NX client and Chicken of VNC on my Mac (Snow Leopard).
I'd like to share desktop of the linux server with my Mac client, i.e., control the existing Linux user session from Mac.
But it seems that on my Mac both NX and VNC connections start a new session on the server.
I'd love to know how to do a "desktop sharing" instead of standalone remote session.
Try winswitch - it will give you a GUI where you can start/stop sessions, the X11 display of your Linux machine will be shown as an existing session which you can "shadow"/"copy" via NX or VNC. (there are installers for macs and windows too)
If you want to do this by hand you can use x0vncserver for VNC and nxagent -S for NX, but then you will also have to deal with port configuration and IP/hostname addressing.. (as well as configuring nx DISPLAY environment variable which is totally non trivial)

Resources