enocean pi on banana pi pro

2 1570
Edited by keros at Nov 28, 2016 08:00


I try to get my enocean pi ( ... l-fuer-Raspberry-Pi) working on a banana pi pro.
It works nice on the rasperry board, only thing to do is do deactivate the serial console in inittab and boot.txt.
After that I can see (garbage) if I do "cat /dev/ttyAMA0" and press the wireless button.
Usefull information comes out with FHEM or some self written python scripts.

Now I try the same thing on bananian.
I deactivated the serial console in "/etc/inittab" (ttyS0), then I mounted the "/dev/mmcblk0p1" boot device and removed the "console=...ttyS0,52..."  part of the file.
After that I creaded a new "boot.scr" with "mkimage -C none -A arm -T script -d boot.cmd boot.scr"
After a reboot the kernel parameters looks like this:
  1. cat /proc/cmdline
  2. console=tty0 console=tty1 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 disp.screen0_output_mode=EDID:1680x1050p60 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Copy the Code

So now I think the "/dev/ttyS0" serial device should be free to use, but "cat /dev/ttyS0" or even "cat /dev/ttyS*" returns me nothing if I press the button.

Has someone an idea what I'm doing wrong?
Do I need to set something special in the script.bin (fex) file to get the serial port working?

Edited by igorpec at Nov 30, 2016 06:51

ttyS0 is defined in u-boot to be used as default console, so u-boot communicate over it by default. I forget if this makes any problems but if you can, rather make use of ttyS1 for your purpose. You might need to enable it in .fex ...

Edited by keros at Nov 30, 2016 06:46

I can't realy change the pin layout of the device (its already manufactured in this way).

But if I understand it right the script.bin (script.fex) defines which pins are ttyS0, ttyS1, ...
If I change the blocks "[uart_para]" (line 55), "[uart_force_debug]" (line 60) and "[uart_para0]" (line 145) to other pins and use the current pins for "[uart_para1]" (line 152) I should get my device on ttyS1?
The system can use ttyS0 which are other GPIO pins after my change.

What I currently not understand are the Port numerations in the *.fex file:
  1. [uart_para0]
  2. uart_used = 1
  3. uart_port = 0
  4. uart_type = 2
  5. uart_tx = port:PB22<2><1><default><default>
  6. uart_rx = port:PB23<2><1><default><default>

  7. [uart_para1]
  8. uart_used = 0
  9. uart_port = 1
  10. uart_type = 8
  11. uart_tx = port:PA10<4><1><default><default>
  12. uart_rx = port:PA11<4><1><default><default>
  13. uart_rts = port:PA12<4><1><default><default>
  14. uart_cts = port:PA13<4><1><default><default>
  15. uart_dtr = port:PA14<4><1><default><default>
  16. uart_dsr = port:PA15<4><1><default><default>
  17. uart_dcd = port:PA16<4><1><default><default>
  18. uart_ring = port:PA17<4><1><default><default>
Copy the Code

I think "uart_para0" is the ttyS0 device. So this should be the pins "8" and "10" (GPIO 14 and 15) on the banana pi pro.
But why is there PB22 and PB23?

The manpage of the fexfile does not help me here:

Same for the "[uart_para1]" block. Which pins are PA10, PA11, ...?


You have to log in before you can reply Login | Sign Up

Points Rules