-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I am trying to use [disis_spi] on my raspberry pi (Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux ) with Pd 0.45.2. When I open the help patch 'disis_spi-help.pd' and click on [open /dev/spidev0.0(, in Pd console i get : could not open SPI device.
I used to use a C++ program until now with which I used to open "/dev/spidev0.0" and all was OK.
What can I do to solve this problem ? ++
Jack
On 09/02/2014 01:39 PM, Jack wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I am trying to use [disis_spi] on my raspberry pi (Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux ) with Pd 0.45.2. When I open the help patch 'disis_spi-help.pd' and click on [open /dev/spidev0.0(, in Pd console i get : could not open SPI device.
I used to use a C++ program until now with which I used to open "/dev/spidev0.0" and all was OK.
What can I do to solve this problem ?
Hi,
I haven't tried the external with pd-vanilla, although there is no reason I can think of that it would not work with vanilla. Did you make sure to load the necessary drivers (I assume you did since you mentioned you used to access it before via a different application, but if you loaded them manually and have rebooted RPi since, they would not be necessarily loaded this time around). Just to be sure try:
lsmod | grep spi
...and see if it lists spi-bcm2708, if not, do:
sudo modprobe spi-bcm2708 sudo modprobe i2c-bcm2708
If that works, you may want to add those at the bottom of your /etc/modules config file (one module per line, like so):
spi-bcm2708 i2c-bcm2708
This will ensure they get loaded every time you start the RPi.
BTW, which gen RPi do you have?
HTH
Ico
++
Jack
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEcBAEBAgAGBQJUBgC2AAoJEOuluecjw8GUQygH/R1kfMI0SU2PsHgHx1HUBJi9 yBw1wYW9AdtK2IazWjYXjwWO6WcmiAUU+mjGvtCb0tPbl2U5PjjxidviRFCVqueu JnisQKD3C2V4qkL2vCJcTpCzJodZmN8FK+0PY+4Jap4tfhUaWp7WLlPolq/ezAkE yunbNaDQQ/upL6Z9Kml+k3dBVqfiTzobylaPImPfzO+Dm/s0Te4QSlH+55wD/IDv 1CEdVHuT7yevkqoDpTUSbwteblom2+8Kd6MY4JQ1rSGhADD4gfWS8FJYs5yJoe7T vp1vjZb2SJlyDnsiXYTH8nJKIgCp7E5bmjtnyCihePINcwE/AtDgSEDjXjqB3QY= =emUj -----END PGP SIGNATURE-----
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
On 09/02/2014 01:39 PM, Jack wrote: Hello,
I am trying to use [disis_spi] on my raspberry pi (Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux ) with Pd 0.45.2. When I open the help patch 'disis_spi-help.pd' and click on [open /dev/spidev0.0(, in Pd console i get : could not open SPI device.
I used to use a C++ program until now with which I used to open "/dev/spidev0.0" and all was OK.
What can I do to solve this problem ?
Hi,
I haven't tried the external with pd-vanilla, although there is no reason I can think of that it would not work with vanilla. Did you make sure to load the necessary drivers (I assume you did since you mentioned you used to access it before via a different application, but if you loaded them manually and have rebooted RPi since, they would not be necessarily loaded this time around). Just to be sure try:
lsmod | grep spi
...and see if it lists spi-bcm2708, if not, do:
I get : spidev 5248 0 spi_bcm2708 4841 0
sudo modprobe spi-bcm2708 sudo modprobe i2c-bcm2708
If that works, you may want to add those at the bottom of your /etc/modules config file (one module per line, like so):
spi-bcm2708 i2c-bcm2708
So I guess I needn't to add these lines ?
This will ensure they get loaded every time you start the RPi.
BTW, which gen RPi do you have?
Model B.
What I do to have disis_spi.pd_linux is : $ cd pd-l2ork_rpi $ ./makeall.sh
But I get several errors :
fatal: destination path 'wiringPi' already exists and is not an empty directory. Already up-to-date. make: Nothing to be done for `static'. cc -DPD -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
disis_gpio.c disis_gpio.c:18:22: fatal error: g_canvas.h: No such file or directory compilation terminated. make: *** [disis_gpio.l_arm] Error 1 cc -DPD -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
ld -shared -o disis_spi.l_arm disis_spi.o -lc -lm strip --strip-unneeded disis_spi.l_arm rm disis_spi.o mv disis_spi.l_arm disis_spi.pd_linux
And after : $ pd disis_spi/disis_spi-help.pd If i click on [open /dev/spidev0.0( I get : could not open SPI device
Something else i can do ? Thanx for you help. ++
Jack
HTH
Ico
++
Jack
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Ivica Ico Bukvic, D.M.A. Associate Professor Computer Music ICAT Senior Fellow DISIS, L2Ork Virginia Tech School of Performing Arts
- 0141 Blacksburg, VA 24061 (540) 231-6139 ico@vt.edu
www.performingarts.vt.edu disis.music.vt.edu l2ork.music.vt.edu
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I find a solution (see at the bottom).
Here the process :
No more error if i compile from scratch : $ git clone https://github.com/pd-l2ork/pd.git l2ork $ cd .../l2ork_addons/raspberry_pi/ $ ./makeall.sh
Cloning into 'wiringPi'... remote: Counting objects: 657, done. remote: Compressing objects: 100% (599/599), done. remote: Total 657 (delta 476), reused 95 (delta 58) Receiving objects: 100% (657/657), 247.61 KiB, done. Resolving deltas: 100% (476/476), done. Already up-to-date. [Compile] wiringPi.c [Compile] wiringSerial.c [Compile] wiringShift.c [Compile] piHiPri.c [Compile] piThread.c [Compile] wiringPiSPI.c [Compile] wiringPiI2C.c [Compile] softPwm.c [Compile] softTone.c [Compile] mcp23008.c [Compile] mcp23016.c [Compile] mcp23017.c [Compile] mcp23s08.c [Compile] mcp23s17.c [Compile] sr595.c [Compile] pcf8574.c [Compile] pcf8591.c [Compile] mcp3002.c [Compile] mcp3004.c [Compile] mcp4802.c [Compile] mcp3422.c [Compile] max31855.c [Compile] max5322.c [Compile] sn3218.c [Compile] drcSerial.c [Link (Static)] cc -DPD -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
disis_gpio.c ld -shared -o disis_gpio.l_arm disis_gpio.o -lc -lm wiringPi/wiringPi/libwiringPi.a strip --strip-unneeded disis_gpio.l_arm rm disis_gpio.o mv disis_gpio.l_arm disis_gpio.pd_linux cc -DPD -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
ld -shared -o disis_spi.l_arm disis_spi.o -lc -lm strip --strip-unneeded disis_spi.l_arm rm disis_spi.o mv disis_spi.l_arm disis_spi.pd_linux
Then, I have to start Pd as super user to be able to open /dev/spidev0.0 : sudo pd .../disis_spi-help.pd ++
Jack
Le 02/09/2014 22:14, Jack a écrit :
Hello,
On 09/02/2014 01:39 PM, Jack wrote: Hello,
I am trying to use [disis_spi] on my raspberry pi (Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux ) with Pd 0.45.2. When I open the help patch 'disis_spi-help.pd' and click on [open /dev/spidev0.0(, in Pd console i get : could not open SPI device.
I used to use a C++ program until now with which I used to open "/dev/spidev0.0" and all was OK.
What can I do to solve this problem ?
Hi,
I haven't tried the external with pd-vanilla, although there is no reason I can think of that it would not work with vanilla. Did you make sure to load the necessary drivers (I assume you did since you mentioned you used to access it before via a different application, but if you loaded them manually and have rebooted RPi since, they would not be necessarily loaded this time around). Just to be sure try:
lsmod | grep spi
...and see if it lists spi-bcm2708, if not, do:
I get : spidev 5248 0 spi_bcm2708 4841 0
sudo modprobe spi-bcm2708 sudo modprobe i2c-bcm2708
If that works, you may want to add those at the bottom of your /etc/modules config file (one module per line, like so):
spi-bcm2708 i2c-bcm2708
So I guess I needn't to add these lines ?
This will ensure they get loaded every time you start the RPi.
BTW, which gen RPi do you have?
Model B.
What I do to have disis_spi.pd_linux is : $ cd pd-l2ork_rpi $ ./makeall.sh
But I get several errors :
fatal: destination path 'wiringPi' already exists and is not an empty directory. Already up-to-date. make: Nothing to be done for `static'. cc -DPD -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing -Wall -W -Wshadow -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch -I../pd/src -I../../pd/src -I../../../pd/src -I../../../../pd/src -I../../../../../pd/src -o disis_gpio.o -c disis_gpio.c disis_gpio.c:18:22: fatal error: g_canvas.h: No such file or directory compilation terminated. make: *** [disis_gpio.l_arm] Error 1 cc -DPD -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing -Wall -W -Wshadow -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch -I../pd/src -I../../pd/src -I../../../pd/src -I../../../../pd/src -I../../../../../pd/src -o disis_spi.o -c disis_spi.c ld -shared -o disis_spi.l_arm disis_spi.o -lc -lm strip --strip-unneeded disis_spi.l_arm rm disis_spi.o mv disis_spi.l_arm disis_spi.pd_linux
And after : $ pd disis_spi/disis_spi-help.pd If i click on [open /dev/spidev0.0( I get : could not open SPI device
Something else i can do ? Thanx for you help. ++
Jack
HTH
Ico
++
Jack
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Ivica Ico Bukvic, D.M.A. Associate Professor Computer Music ICAT Senior Fellow DISIS, L2Ork Virginia Tech School of Performing Arts - 0141 Blacksburg, VA 24061 (540) 231-6139 ico@vt.edu www.performingarts.vt.edu disis.music.vt.edu l2ork.music.vt.edu
You don't have the build environment set up properly which probably means your just downloaded that folder from pd-l2ork git. This is why disis_gpio is not building as it requires access to g_canvas.h include from pd's source. I am not sure why that is since I cannot imagine disis_gpio requiring access to gui operations. That said, the spi has built ok according to your log so I am not entirely sure. The wiringPi error can be ignored. At this point you have several options to try out:
setup you may have to run pd with sudo privileges (sudo pd). This is absolutely necessary for the GPIO external but I thought it wasn't for the SPI. Nonetheless, it's worth a try.
I've tested them extensively on rev. B boards. Likewise, test it with and without sudo.
HTH On Sep 2, 2014 4:14 PM, "Jack" jack@rybn.org wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
On 09/02/2014 01:39 PM, Jack wrote: Hello,
I am trying to use [disis_spi] on my raspberry pi (Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux ) with Pd 0.45.2. When I open the help patch 'disis_spi-help.pd' and click on [open /dev/spidev0.0(, in Pd console i get : could not open SPI device.
I used to use a C++ program until now with which I used to open "/dev/spidev0.0" and all was OK.
What can I do to solve this problem ?
Hi,
I haven't tried the external with pd-vanilla, although there is no reason I can think of that it would not work with vanilla. Did you make sure to load the necessary drivers (I assume you did since you mentioned you used to access it before via a different application, but if you loaded them manually and have rebooted RPi since, they would not be necessarily loaded this time around). Just to be sure try:
lsmod | grep spi
...and see if it lists spi-bcm2708, if not, do:
I get : spidev 5248 0 spi_bcm2708 4841 0
sudo modprobe spi-bcm2708 sudo modprobe i2c-bcm2708
If that works, you may want to add those at the bottom of your /etc/modules config file (one module per line, like so):
spi-bcm2708 i2c-bcm2708
So I guess I needn't to add these lines ?
This will ensure they get loaded every time you start the RPi.
BTW, which gen RPi do you have?
Model B.
What I do to have disis_spi.pd_linux is : $ cd pd-l2ork_rpi $ ./makeall.sh
But I get several errors :
fatal: destination path 'wiringPi' already exists and is not an empty directory. Already up-to-date. make: Nothing to be done for `static'. cc -DPD -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
- -Wall -W -Wshadow -Wstrict-prototypes -Wno-unused -Wno-parentheses
- -Wno-switch -I../pd/src -I../../pd/src -I../../../pd/src
- -I../../../../pd/src -I../../../../../pd/src -o disis_gpio.o -c
disis_gpio.c disis_gpio.c:18:22: fatal error: g_canvas.h: No such file or directory compilation terminated. make: *** [disis_gpio.l_arm] Error 1 cc -DPD -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
- -Wall -W -Wshadow -Wstrict-prototypes -Wno-unused -Wno-parentheses
- -Wno-switch -I../pd/src -I../../pd/src -I../../../pd/src
- -I../../../../pd/src -I../../../../../pd/src -o disis_spi.o -c
disis_spi.c ld -shared -o disis_spi.l_arm disis_spi.o -lc -lm strip --strip-unneeded disis_spi.l_arm rm disis_spi.o mv disis_spi.l_arm disis_spi.pd_linux
And after : $ pd disis_spi/disis_spi-help.pd If i click on [open /dev/spidev0.0( I get : could not open SPI device
Something else i can do ? Thanx for you help. ++
Jack
HTH
Ico
++
Jack
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Ivica Ico Bukvic, D.M.A. Associate Professor Computer Music ICAT Senior Fellow DISIS, L2Ork Virginia Tech School of Performing Arts
- 0141 Blacksburg, VA 24061 (540) 231-6139 ico@vt.edu
www.performingarts.vt.edu disis.music.vt.edu l2ork.music.vt.edu
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEcBAEBAgAGBQJUBiUOAAoJEOuluecjw8GULHAH/19FT7b2dWEh15M8ODWgRmQ6 JlN4gfTRkpi3E6rW8ft5+ffbBK8bQy+jieiMowd/pR6qQQaWPMoq6oSGrHH9ziDI RRW3wYyaz6V8TCJenUrlH3c6p2Pn4SzRhJtBr2JbEN9fpLstC75rxy422N5Ybxyt zJ0hfLADbdNYRlCFQapNwPtbtT+Dyw4Ma+IplhTXhp13NW2xrXStSpzGTjlxWmmK 1MePBYu9YaRxC++ULkqf6OWr7inyN7X+n+p2aFLky0bkRIN01mJXfr7bNHtD8//m Ycf2Kq6sa0pN7AV4Z59CzDaZsWYgSbcK7d64YHaitvIISRGHm6vJ84dXOqAE1eM= =FlzS -----END PGP SIGNATURE-----