Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[CLOSED] Getting firmware from a Windows driver?

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

[CLOSED] Getting firmware from a Windows driver?

#1 Post by edbarx »

Hi, at the moment I am trying to make a USB digital oscilloscope work under wine. I was able to install and now also run its graphical interface, but I cannot use the device as its Windows drivers cannot be used under wine. WineHQ states that wine does not use hardware directly as that would require it to access kernel space. Searching I have learnt that a Windows driver can be used by directly calling rundll32. But my impression is this individual is running wine as root which is something I do NOT want to do.

My logic tells me to rely on what WineHQ states about wine's capability to use or not use a Windows driver. I found that there is some way of extracting the hardware firmware from Windows hardware drivers.

Can anyone help me?
Last edited by edbarx on 2017-03-25 12:12, edited 1 time in total.
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Getting firmware from a Windows driver?

#2 Post by pendrachken »

Not sure if this is exactly what you are looking for but:

You can extract the "driver" from the *.exe installer with 7zip, and then the payloads are GENERALLY in the .cab files, which should also be extractable with 7zip.

Depending on what the driver actually does, I.E. just provide an abstraction layer ( service that listens for device ID and data ) for default kernel calls that WINE can also use it may be usable. BUT, if the driver actually integrates into the NT kernel like a Linux kernel module into the kernel, WINE will not be able to use it.

You will probably have MUCH better luck with a good Windows VM and device ( serial / parallel / USB ) passthrough.
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P

User avatar
phenest
Posts: 1702
Joined: 2010-03-09 09:38
Location: The Matrix

Re: Getting firmware from a Windows driver?

#3 Post by phenest »

I learnt a trick once but it does require the use of Windows.

Start Windows, then start the driver installer. The installer should pause at the beginning because it's decompressing the contents. When that's done, leave the installer open and browse to the Temp directory which is a hidden folder in the Users' directory. In there will be a folder that will have the entire contents of what the installer decompressed. Copy that folder to somewhere else and then close the installer. You should then have everything you need.
ASRock H77 Pro4-M i7 3770K - 32GB RAM - Pioneer BDR-209D

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

Re: Getting firmware from a Windows driver?

#4 Post by edbarx »

It seems the first step at driver recognition is achieved if I am not mistaken. This is unfamiliar territory for me. Using ndiswrapper to attempt to use the Windows XP drivers, I got the following:

Code: Select all

root@edbarx-pc3:/home/edbarx# ndiswrapper -l
hantek6000b : driver installed
	device (04B5:6CDE) present
The Vendor ID agrees with what it should be. The next step is writing a .rules file for udev to provide a device node.
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

millpond
Posts: 698
Joined: 2014-06-25 04:56

Re: Getting firmware from a Windows driver?

#5 Post by millpond »

edbarx wrote:Hi, at the moment I am trying to make a USB digital oscilloscope work under wine. I was able to install and now also run its graphical interface, but I cannot use the device as its Windows drivers cannot be used under wine. WineHQ states that wine does not use hardware directly as that would require it to access kernel space. Searching I have learnt that a Windows driver can be used by directly calling rundll32. But my impression is this individual is running wine as root which is something I do NOT want to do.

My logic tells me to rely on what WineHQ states about wine's capability to use or not use a Windows driver. I found that there is some way of extracting the hardware firmware from Windows hardware drivers.

Can anyone help me?
I dont know if this will simplify anything, but you should be able to run rundll.exe as:

/usr/lib/i386-linux-gnu/wine/fakedlls/rundll32.exe

It should run normally, as it is not a Win executable. It is a Wine spoof.

If root is somehow required, just create a wine 'bottle' or prefix, and with winetricks or playonlinux install the program direectly into it. It would contain basically only the oScope files.

I have a Tektronix on the workbench, but would love to have a scope on the system here. What are you using?

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

Re: Getting firmware from a Windows driver?

#6 Post by edbarx »

Using virtualisation of Windows XP under QEMU was next to useless. Graphics could be seen lagging, resolution was poor, dragging windows was a pain, etc. So, in short, I had to install Windows 8.1 to get the oscilloscope working as it should.

I will mark the thread as closed, not solved, as that would be misleading. I wish I could use Linux, which is the OS of choice for me, but this time, I had to make friends with the devil, so to speak.

If anyone knows of a solution that can make Linux, the kernel, recognize Hantek USB oscilloscopes, that would be very nice news to me.
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: [CLOSED] Getting firmware from a Windows driver?

#7 Post by pylkko »

perhaps you already tried this, perhaps this does not pertain to the model that you have, however, I just googled "hantek usb oscillatoscope linux" and there were many guides about how to use hantek usb osciallatoscopes with linux. There is even a github hosting something called "openhantek", which apparently is a linux module for hantel devices. Other guides described how to get windows drives to work natively on linux, but they might be identical to what you already tried...?

https://github.com/OpenHantek/openhantek
http://openhantek.org/
https://flyingcarsandstuff.com/2016/03/ ... ith-linux/

etc

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

Re: [CLOSED] Getting firmware from a Windows driver?

#8 Post by edbarx »

pyllko, what is wrong with you? Why use that tone? :? phyllko, if there are some unsettled waters between us, please speek up.

Yes, I downloaded some code that after a whole week of attempts I compiled into an executable that displayed an interface but I couldn't make the driver work notwithstanding I wasted many hours spanned over several days of vain attempts. After a whole week, I decided it was time to use what is known to work. In my case, attempting to compile the source was a real pain. This project is a dead project from 2011. What I did was more like an attempt at resurrecting something that experienced Linux hackers didn't succeed to do and are still failing to succeed. Here, I am writing about cracking the Windows drivers to make them work under Linux.
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

User avatar
mor
Posts: 970
Joined: 2010-08-28 15:16
Location: mor@debian

Re: [CLOSED] Getting firmware from a Windows driver?

#9 Post by mor »

edbarx wrote:pyllko, what is wrong with you? Why use that tone? :? phyllko, if there are some unsettled waters between us, please speek up.
What tone? :shock:

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

Re: [CLOSED] Getting firmware from a Windows driver?

#10 Post by edbarx »

mor wrote:
edbarx wrote:pyllko, what is wrong with you? Why use that tone? :? phyllko, if there are some unsettled waters between us, please speek up.
What tone? :shock:
Sorry, too late. I have another lawyer. :P
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

Post Reply