Go to advanced search

by sanket123
Tue Aug 22, 2017 1:56 pm
Forum: Beginners
Topic: Regarding rasberry pi usb library
Replies: 14
Views: 3377

Re: Regarding rasberry pi usb library

Right so you do not need libusb. At all. You need to send commands via the serial port that is created when the GSM module is plugged in. This might be called /dev/ttyUSB0 or something similar. Since you are using C, I'd suggest you give Wiring Pi a try and use its serial port functions http://wiri...
by sanket123
Tue Aug 22, 2017 12:13 pm
Forum: Beginners
Topic: Regarding rasberry pi usb library
Replies: 14
Views: 3377

Re: Regarding rasberry pi usb library

Can you share a link to the GSM device you are communicating with? It is not possible to tell you what commands to send to the device unless we know precisely which module you are using. Also it would be helpful if you would copy the output of the command "lsusb" here so we can see what type of dev...
by sanket123
Tue Aug 22, 2017 6:38 am
Forum: Beginners
Topic: Regarding rasberry pi usb library
Replies: 14
Views: 3377

Re: Regarding rasberry pi usb library

rpdom wrote:
Mon Aug 21, 2017 8:32 pm
Yes, the command I used to build USB software was cc -g -o outputfile sourcefile.c -lusb-1.0
I am going to communicate with usb device from raspberry pi 3 using c program.

Do you know any function through which i can write and read some data from usb?

Any link which can help me
by sanket123
Mon Aug 21, 2017 9:34 am
Forum: Beginners
Topic: Regarding rasberry pi usb library
Replies: 14
Views: 3377

Re: Regarding rasberry pi usb library

piras77 wrote:
Mon Aug 21, 2017 9:21 am

Code: Select all

$ find /usr | grep libusb | grep \.so\$
/usr/lib/arm-linux-gnueabihf/libusb-1.0.so
There is your lib.

So all you need:

Code: Select all

$ gcc usb1.c -o usb1 -lusb-1.0
$ ./usb1
hello
Thank you
It worked with above commands
by sanket123
Mon Aug 21, 2017 7:51 am
Forum: Beginners
Topic: Regarding rasberry pi usb library
Replies: 14
Views: 3377

Re: Regarding rasberry pi usb library

Often the USB device will show up as a serial port and you can access that without needing to touch any USB code. However, if you want to write code to use USB you will probably need to install libusb-dev and libusb-1.0-0-dev for C and additionally libusb++-dev if you are going to use C++. I have i...
by sanket123
Mon Aug 21, 2017 7:45 am
Forum: C/C++
Topic: My Pi does not find libusb.h
Replies: 12
Views: 42678

Re: My Pi does not find libusb.h

I ran into the same issue - and I already had the dev package installed ;) What I had to do to get it fixed was change the lib from "usb" to "usb-1.0", hence I compiled using the following line: gcc -o usbtest usbtest.c -I/usr/include/libusb-1.0/ -lusb-1.0 Cheers, Tobias Hi , Is your problem solved...
by sanket123
Mon Aug 21, 2017 6:31 am
Forum: Beginners
Topic: Regarding rasberry pi usb library
Replies: 14
Views: 3377

Re: Regarding rasberry pi usb library

Are you sure you need an "USB library" ? GSM devices if they are recognized by the kernel will become devices which you can talk to usually without any special libraries. Connect your device after the Pi has booted and then run the command "dmesg" in a terminal and look at the last messages because...
by sanket123
Fri Aug 18, 2017 7:04 am
Forum: Beginners
Topic: Firmware development using raspberry pi 3 for embedded application
Replies: 1
Views: 409

Firmware development using raspberry pi 3 for embedded application

Hello,

I am new to raspberry pi 3 firmware development.
I need to use raspberry pi 3 for embedded application.
I am going to interface GSM usb port with rasberry pi 3. Application should by powering raspberry pi.
From where I should start from?
by sanket123
Thu Aug 17, 2017 9:45 am
Forum: Beginners
Topic: Regarding rasberry pi usb library
Replies: 14
Views: 3377

Regarding rasberry pi usb library

hello,

I am new to rasberry pi 3. I have install rasbian OS on my board.
I need to use usb library for communication of rasberry pi usb port with GSM usb port.
how should i start?

Go to advanced search