How to get SPI module up and running

Hi,
https://wiki.up-community.org/Pinout_UP2#SPI_Ports
I runned all the steps described here but still get no SPI devices:
14:02:50 | [email protected]:/opt/gps/ledpython # ls /dev/spi*
ls: cannot access '/dev/spi*': No such file or directory
I am trying to get a python program running and my guess is the SPI configuration:
14:13:40 | ... # python led.py
Traceback (most recent call last):
File "led.py", line 9, in
spi = mraa.Spi(0)
File "/usr/lib/python2.7/dist-packages/mraa.py", line 2100, in init
this = _mraa.new_Spi(*args)
ValueError: Error initialising SPI bus
Could you please help me to get SPI running?
... uname -srv
Linux 4.10.0-42-generic #5000~upboard10-Ubuntu SMP Tue Dec 19 12:58:48 UTC 2017
Comments
-
My guess is that you do not have UP specific kernel that supports this. That is if I do the uname -srv I see:
[email protected]:~$ uname -srv
Linux 4.4.0-2-upboard #12-Ubuntu SMP Thu Dec 1 15:01:52 UTC 2016
[email protected]:~$
I am running Ubuntu 16.04 and followed the steps in: https://wiki.up-community.org/Ubuntu
The one I am running is an Original UP board... might be different for UP2 or up core?But as I mentioned it looks like you are running the generic kernel: inux 4.10.0-42-generic
-
The weird thing is that in: https://wiki.up-community.org/Ubuntu they have the same as me:
---From the web page---
$ uname -srv
Linux 4.10.0-42-generic #5000~upboard9-Ubuntu SMP Tue Dec 12 11:46:16 UTC 2017Perhaps I should try this: http://wiki.up-community.org/Ubuntu#Instruction_for_Legacy_Ubuntu_Version_.28only_for_up_board.29 ?
Perhaps there is an Issue with the UP² board?
-
Well I solved it. In the page: https://wiki.up-community.org/Pinout_UP2#SPI_Ports ist says that following command should be made
sudo ./install_hooks && sudo acpi-add spidev*
what I reallized is that the files were not executable so I made
chmod +x acpi-add acpi-upgrades install_hooks
and then run the command
sudo ./install_hooks && sudo ./acpi-add spidev*
Check! It is not the same as described in the page!
-
Hi @npurtschert ,
That's great! Thanks for the update!
Cloud you please mark this discussion as SOLVED?
Thank you!
-
@ccalde Sure. How? I don't find any button to do that
-
@npurtschert , it is only redefining the discussion tittle as [RESOLVED] How to get SPI module up and running
Cheers!
-
I had similar problem and seems like chmod made the difference. Admin should update the wiki page!
-
updated, thanks!
Tagged
Categories
- 303 All Categories
- 104 Announcements & News
- 52 Product News - New Product/Product Change Notice/ End-of-life
- 184 Welcome Developers!
- 53 Unboxing & Project Sharing
- 24 Tech Updates
- 595 UP Products
- 6 UP Xtreme i12
- 1 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 13 UP Squared V2
- 41 UP 4000
- 24 UP Xtreme i11
- 34 UP Squared 6000
- 49 UP Squared Pro
- 140 UP Xtreme
- 828 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 221 UP Core
- 3 UP Xtreme Lite
- 44 UP AI Edge
- 215 Starter Kits & Peripheral