LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-24-2017, 10:41 PM   #1
Indymaynard
Member
 
Registered: Apr 2006
Location: Twentynine Palms, California
Distribution: Fedora, Ubuntu
Posts: 40
Blog Entries: 14

Rep: Reputation: 15
Installing/Using device drivers


I know this seems slightly ridiculous, but I have a device driver that is not included in Fedora 25. It is a binary, and provided by the vendor. It is a single-file library, a pre-built binary driver.

How do I install this driver? How do I use this driver? Again, it seems ridiculous, but I can't find a single source on installing/using this driver with the provided software.

Is there a manual way to install and load a device driver (.so file) in Linux? Fedora is restrictive, but there must surely be a way to work around this.

Can I clarify? Can I get some help? What do I need to do?
 
Old 04-25-2017, 01:22 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
theoretically, the file should either be something fedora's package management can deal with, or it should include instructions.

yes, you can clarify.
show us that driver and all related files, links, documentation etc.
 
Old 04-25-2017, 06:52 AM   #3
kudsu
Member
 
Registered: Apr 2017
Location: from LA
Distribution: Slackware and anything
Posts: 50

Rep: Reputation: Disabled
Good Luck

if i remember correctly and i rarely do. You can post a list of your loaded drivers with the command lsmod. This shows you what drivers are running. There is another command for inserting a driver. This may very well crash your computer and give you other problems YMMV. Read the man for lsmod and insmod.
 
Old 04-25-2017, 09:10 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Device drivers tend to be ???.ko and in the /lib/modules/$(uname -r)/.../.../.../???.ko type places depending on what the driver is. But they tend to have to be compiled for a "specific" kernel version. Or the kernel needs settings that tell it to not care, much. Which is probably not the default and insecure. It really depends on WHAT the provided binary is based off of (ubuntu 10.04?).

Otherwise from sources options tend to be easier -ish. For example my rtl8723be driver.

$ git clone https://github.com/lwfinger/rtlwifi_new.git rtlwifi_new_20170425
$ cd ./rtlwifi_new_20170425
$ make
$ sudo make install

Assuming all the build tools and dependencies (linux-headers) are installed. And reboot for the easy way to load the new driver. Bear in mind that updates to the kernel in question will overwrite the updated driver. If you don't trust the make install as root bit, you can do that step more manually.

Code:
$ find . -iname '*.ko'
$ find /lib/modules/$(uname -r)/ -iname '*rtl_pci*ko*'
$ sudo cp ./rtl_pci.ko                   /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/ 
$ sudo cp ./rtl8192ee/rtl8192ee.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8192ee/
$ sudo cp ./rtl8192cu/rtl8192cu.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8192cu/
$ sudo cp ./rtl8192de/rtl8192de.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8192de/
$ sudo cp ./rtl8192c/rtl8192c-common.ko  /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8192c/
$ sudo cp ./rtl8723be/rtl8723be.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8723be/
$ sudo cp ./rtl8821ae/rtl8821ae.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8821ae/
$ sudo cp ./btcoexist/btcoexist.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/btcoexist/
$ sudo cp ./rtl8192se/rtl8192se.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8192se/
$ sudo cp ./rtlwifi.ko                   /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/
$ sudo cp ./rtl8723com/rtl8723-common.ko /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8723com/
$ sudo cp ./rtl8192ce/rtl8192ce.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8192ce/
$ sudo cp ./rtl_usb.ko                   /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/
$ sudo cp ./rtl8723ae/rtl8723ae.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8723ae/
$ sudo cp ./rtl8188ee/rtl8188ee.ko       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/wireless/rtlwifi/rtl8188ee/
$ sudo depmod -a
And probably some firmware stuff that ends up in /lib/firmware/rtlwifi/.

$ find . -iname '*.bin'
$ find . -iname '*.fw'

You could simulate this step with premade drivers if extractable and compatible with your kernel version. With dpkg -x or ar and tar steps for .deb type drivers. The biggest hurdle being the compatible with your kernel. Which is probably an instant fail. The short answer, install and use the probably outdated, but blessed distro to use that device with the provided driver. Probably ubuntu 14.04 if it's something recent, to never be updated even when ubuntu 24.04 is the current LTS.
 
Old 04-27-2017, 10:03 AM   #5
Indymaynard
Member
 
Registered: Apr 2006
Location: Twentynine Palms, California
Distribution: Fedora, Ubuntu
Posts: 40

Original Poster
Blog Entries: 14

Rep: Reputation: 15
Driver fiasco

To all who responded, thank you. It turns out that the driver (which is for a Ginkgo USB-CAN adapter from www.viewtool.com) is the API and driver kind of rolled up into one. I can call it from Python scripts as shown in the sample applications, but the pre-built application won't load its own driver. The Windows version will load it fine, except that the driver signing is an issue.

I guess I'll have to keep trying to develop the Python scripts for it to see if I can get things to work out that way. The frustration is that I can't use the application that is supposed to give you access to the functions of the device as a demo.

If anyone feels like looking at it, by all means. I don't expect that many people would want to look at it if they don't own the hardware, though.
 
Old 04-27-2017, 12:05 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,622

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
a very quick google search and the 5th hit in the list is a git page for it
https://github.com/b/libusbcan

this is a cmake project

just fallow the instructions to build on the page i linked
 
Old 04-27-2017, 01:16 PM   #7
Indymaynard
Member
 
Registered: Apr 2006
Location: Twentynine Palms, California
Distribution: Fedora, Ubuntu
Posts: 40

Original Poster
Blog Entries: 14

Rep: Reputation: 15
Solved

Again, thanks to everyone who responded. I found the answer. Part of it was stupidity on my part. I was running the application the only way I could get it to start, which was not as root (sudo). This caused the driver not to have access to the device. Attempting to start with sudo or root would give me an error:

QXcbConnection: Could not connect to display
Aborted
No protocol specified
Error: couldn't open display :0
Core dumped

Typing this:

Code:
xhost local:root
solved the problem. Now I can access the device as the program advertises. Now to the next step: reading my vehicle's CAN bus.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux device drivers : how can i unregister a character device ? zampa Linux - General 5 06-21-2012 05:34 AM
Trouble installing drivers for wireless usb device in Backtrack 5 toneloc51 Linux - Networking 5 03-22-2012 09:49 PM
[SOLVED] URGENT : How to handle one device through two separted device drivers Khadidja Linux - Kernel 2 02-16-2011 02:33 AM
How do I go about installing webcam drivers? -Are there drivers for my camera? mitchell7man Linux - Hardware 3 10-31-2009 03:42 AM
problems in installing drivers for myson mtd80x fast based ethernet card drivers pop_harish Linux - Hardware 0 02-12-2005 05:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration