[CLOSED] Getting firmware from a Windows driver?

If it doesn't relate to Debian, but you still want to share it, please do it here

[CLOSED] Getting firmware from a Windows driver?

Postby edbarx » 2017-03-19 07:09

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.
User avatar
edbarx
 
Posts: 5378
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E

Re: Getting firmware from a Windows driver?

Postby pendrachken » 2017-03-19 15:01

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
pendrachken
 
Posts: 1251
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Getting firmware from a Windows driver?

Postby phenest » 2017-03-19 22:23

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.
Dell XPS 17 L702X i7 2860QM 2.5GHz - 32GB RAM - 4G WWAN - Pioneer TD05-BDR
NEC Spirit 550 P4 3.8GHz HT - 2GB RAM - nVidia 7600GT - Pioneer BDR-209DBK
ASUS P8P67 EVO i7 3770K - 32GB RAM - 2x nVidia 660GTX SLI'd
User avatar
phenest
 
Posts: 1434
Joined: 2010-03-09 09:38
Location: The Matrix

Re: Getting firmware from a Windows driver?

Postby edbarx » 2017-03-20 09:19

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.
User avatar
edbarx
 
Posts: 5378
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E

Re: Getting firmware from a Windows driver?

Postby millpond » 2017-03-23 07:28

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?
millpond
 
Posts: 582
Joined: 2014-06-25 04:56

Re: Getting firmware from a Windows driver?

Postby edbarx » 2017-03-25 12:10

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
edbarx
 
Posts: 5378
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E

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

Postby pylkko » 2017-03-25 13:05

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
pylkko
 
Posts: 884
Joined: 2014-11-06 19:02

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

Postby edbarx » 2017-03-25 16:26

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
edbarx
 
Posts: 5378
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E

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

Postby mor » 2017-03-25 16:52

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
mor
 
Posts: 969
Joined: 2010-08-28 15:16
Location: mor@debian

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

Postby edbarx » 2017-03-26 05:08

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.
User avatar
edbarx
 
Posts: 5378
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E


Return to Offtopic

Who is online

Users browsing this forum: Cyborg and 2 guests

fashionable