Jump to content

Roland Sabata

Members
  • Posts

    4
  • Joined

  • Last visited

  1. Hello, I tied to activate SPI an a BananaPI M1 an Armbian VERSION=23.11.1 but didnt succeeded! I activated "spidev" at armbian-config and tried diferent configurations in "armbianEnv.tx. with: overlays=spi0 spi-spidev param_spidev_spi_bus=0 i get roland@bananapi:~$ dmesg | grep spi roland@bananapi:~$ lsmod | grep spi spidev 20480 0 roland@bananapi:~$ ls /dev/spidev* /dev/spidev0.0 roland@bananapi:~$ I installed "Rf24" library for an nrf24l01 module and tried "scanner" "gettingstarted" and my own c++ file. Al long as I define a wrong "CE" pin, I get response from the nrf24I01 modul. Mostly I get some senseless info, but I also get the module name. "nrf24l012". So there must be a connection. But I cannot use the correct CE pin. Everytime I define the correct CE gpio PIN, (nRF(22,0)) I get this error. terminate called after throwing an instance of 'GPIOException' what(): can't access /sys/class/gpio/gpio%d/direction GPIO pin. check access rights Abgebrochen " I have tried the nRF linrary an a RaspberryPi 3. There I have no problems. It worked out of the box. But because of 1Gb and SATA I need to use my BananaPi. I also have tried different modules. All worked on RaspberryPi and failed on BananaPi. Do you have any Idea, how I can get SPI to work?
  2. Hi, thaks for your help! Now it works. Dont know why, but today I found my sensor on i2c3. Now I can get my sensor values with : i2cdump -y 3 0x76 i2cset -y 3 0x76 0xf4 0x27 i2cdump -y 3 0x76 root@bananapi:/mnt/daten/image# i2cdump -y 3 0x76 No size specified (using byte-data access) 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 80: 8c 70 89 37 6c 0a fe 06 8a 6e 44 68 32 00 95 8d ?p?7l????nDh2.?? 90: b3 d6 d0 0b 7d 22 af ff f9 ff ac 26 0a d8 bd 10 ????}"?.?.?&???? a0: 00 4b 85 00 00 00 00 00 00 00 00 00 33 00 00 c0 .K?.........3..? b0: 00 54 00 00 00 00 60 02 00 01 ff ff 1f 4e 08 00 .T....`?.?..?N?. c0: 00 40 27 ff 00 00 00 00 00 00 00 00 00 00 00 00 .@'............. d0: 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 `............... e0: 00 7c 01 00 11 25 03 1e f0 41 ff ff ff ff ff ff .|?.?%???A...... f0: ff 00 00 0c 27 00 00 50 3e 00 7e 9e 00 80 00 80 ...?'..P>.~?.?.?
  3. Hello Ryzer, I tried serveral I2C Sensors. Finally I would like to operate the BME280 Sensor I checked "sudo dmesg | grep i2c" and found: [ 2.000754] i2c_dev: i2c /dev entries driver [ 2.186279] axp20x-i2c 1-0034: AXP20x variant AXP209 found [ 2.187691] axp20x-i2c 1-0034: mask_invert=true is deprecated; please switch to unmask_base [ 2.201986] input: axp20x-pek as /devices/platform/soc/1c2ac00.i2c/i2c-1/1-0034/axp20x-pek/input/input0 [ 2.213579] axp20x-i2c 1-0034: Backup (RTC) battery charging is disabled [ 2.213768] axp20x-i2c 1-0034: AXP20X driver loaded sudo dmesg | grep i2c. In /dev I found: roland@bananapi:/dev$ ls -la | grep i2c crw-rw---- 1 root i2c 89, 0 9. Nov 16:17 i2c-0 crw-rw---- 1 root i2c 89, 1 9. Nov 16:17 i2c-1 crw-rw---- 1 root i2c 89, 2 9. Nov 16:17 i2c-2 crw-rw---- 1 root i2c 89, 3 9. Nov 16:17 i2c-3 . thats ok, because I activated all I2c Ports for testing. with "cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins | grep i2c" . i get: root@bananapi:~# cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins | grep i2c pin 32 (PB0): 1c2ac00.i2c (GPIO UNCLAIMED) function i2c0 group PB0 pin 33 (PB1): 1c2ac00.i2c (GPIO UNCLAIMED) function i2c0 group PB1 pin 50 (PB18): 1c2b000.i2c (GPIO UNCLAIMED) function i2c1 group PB18 pin 51 (PB19): 1c2b000.i2c (GPIO UNCLAIMED) function i2c1 group PB19 pin 52 (PB20): 1c2b400.i2c (GPIO UNCLAIMED) function i2c2 group PB20 pin 53 (PB21): 1c2b400.i2c (GPIO UNCLAIMED) function i2c2 group PB21 But I dont understand the output of the last command. Wher e con I find pin53? The banana/rasp.Pi has only 40 pins??
  4. Hello, I just started to use my old BananaPi M1 (Armbian 23.8 Bookworm) to check sensor values by onewire and i2c. At last there was no problem with onewire But I cannot get I2c to work. /boot/armbianEnv.txt overlay_prefix=sun7i-a20 overlays=i2c2 w1-gpio param_w1_pin=PI3 For onewire I had to define "param_w1_pin=PI3" even if my onewire sensor is connected to GPIO7. for I2C I checked "lsmod | grep i2c" but couldnt find anything. So ieven if it is not correctly activated, I could run "i2cdetect -y 2" and could find my sensor at 0x76 but couldnt communicate with it. I think I need to load "i2c-bcm2708 i2c-dev". How can I get these to run? Or do I have to define the i2c_pins like I did with param_w1_pin ?
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines