kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

How do I convert a linux driver to run on the Raspberry Pi

Wed Jul 09, 2014 3:49 am

I have a ZTE modem which came with a linux driver for installation on Linux how can I convert it and make it run on my raspberry pi?

fruitoftheloom
Posts: 25164
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 09, 2014 4:58 am

ZTE Modem is it USB ? is it for 3G ? then the driver disk is useless for the Pi.

Assuming it is a USB 3G Modem and you have Raspbian Wheezy installed, then plug in the Modem and power on the Pi.

Open up LXTerminal type in lsusb press enter and post the output.
The information is out there....you just have to let it in.

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 09, 2014 8:09 am

It displays

Bus 001 Device 008: ID 19d2:ffeb ZTE WCDMA Technologies MSM

fruitoftheloom
Posts: 25164
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 09, 2014 8:43 am

kene.dozie wrote:It displays

Bus 001 Device 008: ID 19d2:ffeb ZTE WCDMA Technologies MSM
http://myhowtosandprojects.blogspot.co. ... linux.html
The information is out there....you just have to let it in.

Ivan Tham
Posts: 75
Joined: Mon Jun 24, 2013 7:06 am

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 09, 2014 1:34 pm

If it is a 3G driver:

Code: Select all

sudo apt-get update; sudo apt-get -y install ppp
wget "https://raspberry-at-home.com/files/sakis3g.tar.gz"
sudo mkdir /usr/bin/modem3g
sudo chmod 777 /usr/bin/modem3g

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Thu Jul 10, 2014 8:33 am

I have tried that previously, when I use the sakis3g method it returns an error after detecting the modem.

When I use the wvdial method it does not see the network on the modem.

fruitoftheloom
Posts: 25164
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: How do I convert a linux driver to run on the Raspberry

Thu Jul 10, 2014 8:42 am

kene.dozie wrote:I have tried that previously, when I use the sakis3g method it returns an error after detecting the modem.

When I use the wvdial method it does not see the network on the modem.
Is the ZTE Modem recognised by Linux as a Modem or a Storage Device, that was mentioned in the link I posted ??
The information is out there....you just have to let it in.

User avatar
topguy
Posts: 6869
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: How do I convert a linux driver to run on the Raspberry

Thu Jul 10, 2014 8:51 am

Start the Pi, then plug in the modem, type "dmesg" and look at the last messages, that should give you an Idea if the modem is recognized properly.

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Fri Jul 11, 2014 3:51 am

When I typed in 'dmesg' it displayed
Usb 1-1.3: Product: Qualcomm CDMA Technologies

User avatar
topguy
Posts: 6869
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: How do I convert a linux driver to run on the Raspberry

Fri Jul 11, 2014 8:52 am

And thats all ??

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 2:25 am

I am sorry everyone I was away from my pi for these few days.
But I'm back

When I used dmesg it displays:

[ 3.945748] usb 1-1.3: Product: Qualcomm CDMA Technologies MSM
[ 3.966265] usb 1-1.3: Manufacturer: Qualcomm, Incorporated
[ 4.098454] usb 1-1.2.1: new full-speed USB device number 7 using dwc_otg
[ 4.246573] usb 1-1.2.1: New USB device found, idVendor=046d, idProduct=c52b
[ 4.268253] usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

it displays towards the end:

[ 9.012661] usbserial: USB Serial support registered for generic
[ 9.122279] usbcore: registered new interface driver zte_ev
[ 9.191954] usbserial: USB Serial support registered for zte_ev
[ 9.277885] zte_ev 1-1.3:1.0: zte_ev converter detected
[ 9.343641] usb 1-1.3: zte_ev converter now attached to ttyUSB0
[ 9.448368] zte_ev 1-1.3:1.1: zte_ev converter detected
[ 9.507542] usb 1-1.3: zte_ev converter now attached to ttyUSB1
[ 9.528379] zte_ev 1-1.3:1.2: zte_ev converter detected
[ 9.574636] usb 1-1.3: zte_ev converter now attached to ttyUSB2
[ 9.608363] zte_ev 1-1.3:1.3: zte_ev converter detected
[ 9.659271] usb 1-1.3: zte_ev converter now attached to ttyUSB3

So I think the Rpi is not detecting the ZTE device as modem yet.

User avatar
DougieLawson
Posts: 40486
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 4:31 am

I think you need to look at the power supply for your USB modem.
It connects, initialises then fails, reconnects, re-initialises and loops doing that.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 8:10 am

Ok thanks I will try that.

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 8:33 am

After connecting it to external power, and suing the commang "dmesg"

it gives:

[ 119.670844] usb 1-1.3: new high-speed USB device number 7 using dwc_otg
[ 119.772698] usb 1-1.3: New USB device found, idVendor=19d2, idProduct=ffeb
[ 119.772733] usb 1-1.3: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[ 119.772750] usb 1-1.3: Product: Qualcomm CDMA Technologies MSM
[ 119.772766] usb 1-1.3: Manufacturer: Qualcomm, Incorporated
[ 120.076621] usbcore: registered new interface driver usbserial
[ 120.076803] usbcore: registered new interface driver usbserial_generic
[ 120.076920] usbserial: USB Serial support registered for generic
[ 120.115991] usbcore: registered new interface driver zte_ev
[ 120.116123] usbserial: USB Serial support registered for zte_ev
[ 120.116217] zte_ev 1-1.3:1.0: zte_ev converter detected
[ 120.141705] usb 1-1.3: zte_ev converter now attached to ttyUSB0
[ 120.142294] zte_ev 1-1.3:1.1: zte_ev converter detected
[ 120.153253] usb 1-1.3: zte_ev converter now attached to ttyUSB1
[ 120.155972] zte_ev 1-1.3:1.2: zte_ev converter detected
[ 120.172659] usb 1-1.3: zte_ev converter now attached to ttyUSB2
[ 120.172878] zte_ev 1-1.3:1.3: zte_ev converter detected
[ 120.176852] usb 1-1.3: zte_ev converter now attached to ttyUSB3
[ 276.259130] zte_ev ttyUSB3: zte_ev converter now disconnected from ttyUSB3
[ 276.259285] zte_ev 1-1.3:1.3: device disconnected
[ 276.707984] usbserial: USB Serial deregistering driver zte_ev
[ 276.712587] zte_ev ttyUSB2: zte_ev converter now disconnected from ttyUSB2
[ 276.713042] zte_ev ttyUSB1: zte_ev converter now disconnected from ttyUSB1
[ 276.716634] zte_ev ttyUSB0: zte_ev converter now disconnected from ttyUSB0
[ 276.716734] usbcore: deregistering interface driver zte_ev
[ 276.716901] zte_ev 1-1.3:1.2: device disconnected
[ 276.717128] zte_ev 1-1.3:1.1: device disconnected
[ 276.717283] zte_ev 1-1.3:1.0: device disconnected
[ 276.717886] usbserial: USB Serial deregistering driver generic
[ 276.718005] usbcore: deregistering interface driver usbserial_generic
[ 276.718088] usbcore: deregistering interface driver usbserial
[ 277.397740] usbcore: registered new interface driver usbserial
[ 277.397865] usbcore: registered new interface driver usbserial_generic
[ 277.397972] usbserial: USB Serial support registered for generic
[ 277.420917] usbcore: registered new interface driver option
[ 277.421127] usbserial: USB Serial support registered for GSM modem (1-port)
[ 277.858385] option 1-1.3:1.0: GSM modem (1-port) converter detected
[ 277.862035] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[ 277.876101] option 1-1.3:1.1: GSM modem (1-port) converter detected
[ 277.876680] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[ 277.877432] option 1-1.3:1.2: GSM modem (1-port) converter detected
[ 277.877962] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[ 277.878586] option 1-1.3:1.3: GSM modem (1-port) converter detected
[ 277.886776] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3

so what do you think?

User avatar
DougieLawson
Posts: 40486
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 10:13 am

Ah, the extra log shows more. That one dongle appears as four /dev/ttyUSBn devices. What happens when you try to write data to those?
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 10:28 am

What do you mean by write data to it?

User avatar
DougieLawson
Posts: 40486
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 10:37 am

kene.dozie wrote:What do you mean by write data to it?
Everything on Unix is seen as a file. The normal operations on files are open(), write(), read() & close().

The device is appearing as four /dev files so you now need a program to send some data and read some results.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 10:45 am

Ok. so do you know how this can be done?

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 10:48 am

Now that the dmesg output looks more promising (thanks to the better power supply) try the sakis3g method again... and/or look at https://google.com/search?q=raspberry+pi+usb+3g+modem

User avatar
DougieLawson
Posts: 40486
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How do I convert a linux driver to run on the Raspberry

Wed Jul 16, 2014 10:51 am

It claims to be a modem. Therefore something like stty to set baud rates and parms then minicom to do the communications with the outside world.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Thu Jul 17, 2014 7:21 am

AndrewS wrote:Now that the dmesg output looks more promising (thanks to the better power supply) try the sakis3g method again... and/or look at https://google.com/search?q=raspberry+pi+usb+3g+modem
Thanks Andrew, I have tried that method but it gives an error message

kene.dozie
Posts: 11
Joined: Thu Jun 05, 2014 9:48 am

Re: How do I convert a linux driver to run on the Raspberry

Thu Jul 17, 2014 7:48 am

DougieLawson wrote:It claims to be a modem. Therefore something like stty to set baud rates and parms then minicom to do the communications with the outside world.
How can I use the stty and minicom?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27720
Joined: Sat Jul 30, 2011 7:41 pm

Re: How do I convert a linux driver to run on the Raspberry

Thu Jul 17, 2014 1:57 pm

kene.dozie wrote:
DougieLawson wrote:It claims to be a modem. Therefore something like stty to set baud rates and parms then minicom to do the communications with the outside world.
How can I use the stty and minicom?
You best bet would be to read up on those application - Google is your friend. You'll need a basic understanding of what they do to be able to use them anyway, rather than just blindly following instruction people may put on here which might make something work, but won't help towards your final target.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
topguy
Posts: 6869
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: How do I convert a linux driver to run on the Raspberry

Thu Jul 17, 2014 2:04 pm

http://www.linux-tutorial.info/modules. ... nicom.html

Just remember that your devices is called ttyUSB0 (1,2,3).

Typically commands I would test with in minicom is:
at
ate1v1
ati

( first should return "OK" or "0", second turns on echoiing of characters and text replys, third prints some text about the modem. )

Return to “General discussion”