Jump to content

Recommended Posts

Posted

hello guys, i need help i cant setup and run 
 

admin@orangepi3b:~$ ls -l /dev/spidev*
ls: cannot access '/dev/spidev*': No such file or directory

admin@orangepi3b:~$ sudo nano /boot/armbianEnv.txt
  GNU nano 7.2                  /boot/armbianEnv.txt
verbosity=1
bootlogo=true
console=both
extraargs=cma=256M
overlay_prefix=rk35xx
overlays=rk3588-spi4-m1-cs0-spidev
param_spidev_spi_bus=4
param_spidev_spi_cs=0
param_spidev_max_freq=10000000
rootdev=UUID=c190d568-1ec8-46ad-a874-27adf20d693a
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u


root@orangepi3b:/home/admin# ls /sys/class/spi_master/
spi4
root@orangepi3b:/home/admin# dmesg | grep spi
[   11.382151] spi-nor spi4.0: XM25QU128C (16384 Kbytes) read_data x4
[   11.834840] SPI driver inv-icm42600-spi has no spi_device_id for invensense,icm42600
[   11.834856] SPI driver inv-icm42600-spi has no spi_device_id for invensense,icm42602
[   11.834860] SPI driver inv-icm42600-spi has no spi_device_id for invensense,icm42605
[   11.834864] SPI driver inv-icm42600-spi has no spi_device_id for invensense,icm42622
root@orangepi3b:/home/admin# ls /boot/dtb/rockchip/overlay/ | grep spi
nanopi-m6-spi-nor-flash.dtbo
radxa-cm5-io-raspi-7inch-touchscreen.dtbo
rk3576-spi4-m0-cs1-spidev.dtbo
rk3588-spi0-m1-cs0-spidev.dtbo
rk3588-spi0-m1-cs1-spidev.dtbo
rk3588-spi0-m2-cs0-cs1-spidev.dtbo
rk3588-spi0-m2-cs0-spidev.dtbo
rk3588-spi0-m2-cs1-spidev.dtbo
rk3588-spi1-m1-cs0-spidev.dtbo
rk3588-spi1-m1-cs1-mcp2515-8mhz.dtbo
rk3588-spi1-m1-cs1-spidev.dtbo
rk3588-spi4-m0-cs1-spidev.dtbo
rk3588-spi4-m1-cs0-cs1-spidev.dtbo
rk3588-spi4-m1-cs0-spidev.dtbo
rk3588-spi4-m1-cs1-spidev.dtbo
rk3588-spi4-m2-cs0-spidev.dtbo
rock-5a-spi-nor-flash.dtbo
root@orangepi3b:/home/admin# ls /proc/device-tree/ | grep spi
spi@fe300000
spi@fe610000
spi@fe620000
spi@fe630000
spi@fe640000

what is problem it?


i have:

 v25.2 rolling for Orange Pi 3B running Armbian Linux 6.1.99-vendor-rk35xx

 Packages:     Ubuntu stable (noble)
 Support:      for advanced users (rolling release)
 IP addresses: (LAN) IPv4: 192.168.11.25 IPv6: fe80::3d9b:c201:b834:dccd (WAN)

 Performance:

 Load:         36%              Up time:       2 min    Local users:   2        
 Memory usage: 4% of 7.50G
 CPU temp:     37°C             Usage of /:    23% of 29G
 RX today:     8 GiB
 Commands:

 Configuration : armbian-config
 Monitoring    : htop

<
Posted
1 hour ago, Илья Бовсунов said:

i already try it on orangepi os


You are running wrong image. "Orange Pi 3B is powered by Rockchip RK3566" while you are trying to use something for 3588. This can't work not even by force of luck. You also need to provide logs if anyone from community can help you.

Posted

but i donwload and install this: image.png.3611b5d6de0b9de6ab2ca73e19bb36d8.png

how to found normal image for my Orangepi, i just download at main page orangepi 3b

Цитата

You are running wrong image. "Orange Pi 3B is powered by Rockchip RK3566" while you are trying to use something for 3588. This can't work not even by force of luck. You also need to provide logs if anyone from community can help you.

(sorry for my bed eng)

Posted

Hm vendor seem lacking all rk356x overlays except rk3566-roc-pc-sata2.dtbo. Need to check current.

Edit: current and edge only have a few more but also none spi related for rk3566. Odd...

Posted

omg its working image.png.77cdf99451d0a264ef9826fce3b282f9.png

 

 

how to fix?

1. download orangepi at main page orangepi3b at Download page

2. install and login

3. go to sudo orangepi-config => System => Hardware => SPi3-m0-cs..... just enable this shit (i lost 1 day fo understand why i cant ls -l /dev/spidev*) and reload

happy new year!!!

Posted

Ah. I guess nobody ported the overlays from old bsp over yet. Well also nobody was asking for them yet either lol

 

Anyway this may work with "modern" bsp too:

 

/dts-v1/;
/plugin/;

/ {
	fragment@0 {
		target = <&spi3>;

		__overlay__ {
			status = "okay";

			spidev@0 {
				compatible = "rockchip,spidev";
				status = "okay";
				reg = <0>;
				spi-max-frequency = <50000000>;
			};
		};
	};
};

 

Posted

but now have problem

(venv) root@orangepi3b:~/opirc522/sensors/RFID-RC522# python3 read-rfid.py
Traceback (most recent call last):
  File "/root/opirc522/sensors/RFID-RC522/read-rfid.py", line 3, in <module>
    from mfrc522 import SimpleMFRC522
  File "/root/opirc522/sensors/RFID-RC522/mfrc522/__init__.py", line 1, in <module>
    from .MFRC522 import MFRC522
  File "/root/opirc522/sensors/RFID-RC522/mfrc522/MFRC522.py", line 24, in <module>
    import spidev
ModuleNotFoundError: No module named 'spidev'
(venv) root@orangepi3b:~/opirc522/sensors/RFID-RC522# ls -l /dev/spidev*
crw------- 1 root root 153, 0 Feb  6 20:06 /dev/spidev3.0
(venv) root@orangepi3b:~/opirc522/sensors/RFID-RC522#


https://github.com/SecurityPhoton/OrangePi/blob/main/sensors/RFID-RC522/README.md

Posted (edited)

ok i fix it:

#!/bin/bash
# Clone the repository
mkdir ~/opirc522
git clone https://github.com/SecurityPhoton/OrangePi.git ~/opirc522
# Navigate into the cloned repository folder
cd ~/opirc522/sensors/RFID-RC522
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
source venv/bin/activate
# Install the library
pip install spidev
python3 setup.py install
 
at file:

sensors/RFID-RC522/mfrc522/MFRC522.py


change 

Цитата

def __init__(self, bus=1, device=1, spd=1000000, pin_mode=10, pin_rst=-1, debugLevel='WARNING'):
    self.spi = spidev.SpiDev()
    self.spi.open(bus, device)
 


to
 

Цитата

def __init__(self, bus=3, device=0, spd=1000000, pin_mode=10, pin_rst=-1, debugLevel='WARNING'):
    self.spi = spidev.SpiDev()
    self.spi.open(bus, device)
 

 


bus=3, device=0

my: 
(venv) root@orangepi3b:~/opirc522/sensors/RFID-RC522# ls -l /dev/spidev*
crw------- 1 root root 153, 0 Feb  6 20:06 /dev/spidev3.0
 

Edited by Илья Бовсунов

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines