1 1
scargill

Orange Pi Plus 2E SERIAL issue

Recommended Posts

Hi


Can someone help. I have the current "legacy" ubuntu for Orange Pi Plus 2E - installed this morning.

 

Everything seems fine except - I cannot figure out how to enable the serial port ttyS0 for general use - the console keeps grabbing it - I tried altering the boot cmd from console=both to console=tty1 - and I recompiled that as per the instructions - no difference - I can see on boot up that it is setting up ttys0 for debugging - and when I try to enable and then use it in Node-Red - it works at first - then some debug info comes in - and Node-Red loses control of the serial port.

 

Can anyone help - also - SURELY there is more than one serial port on this board? The connector suggests at least 3 - but only ttyS0 is showing up in /dev  - ideas?  (without recompiling the entire operating system)?

Share this post


Link to post
Share on other sites

Even if you change the boot.cmd, this will only affect the kernel output, but u-boot will still output stuff on that serial port.

 

To use other serial ports, you simple need to turn them on by using overlays.

To do so, add the following in /boot/armbianEnv.txt :

overlays=uart1 uart2 uart3

... and then reboot ...

 

Share this post


Link to post
Share on other sites

Thank you...  Well I clicked on LEGACY for this board as that's the only one I could find on the Armbian site (Orange Pi Plus 2E) - please point me elsewhere if I picked the wrong one - however - your fixes worked.  I had already had a go with the FEL editor - not having a clue what I was doing - simply setting the current 0 setting for the 3 serial ports to 1 - but that didn't work (it did result in a WHOLE boatload of serial ports however, appearing in DEV)  But just adding in the setting you both provided - works a treat - all 3 ports work and I can forget about the debug port - though it really would be good to know how to turn that debug off on port 0 - utterly wasted for me, once I'm up and running.

Share this post


Link to post
Share on other sites

Erm I wonder if I can push my luck - the Serial is all working now... but when I come to look at I2c - (i2cdetect) only I2c 0 is there... and that appears to be pins 3 and 5 on the 40 way connector - but taking my SSD1306 display (I put them on all my boards with a little Python driver) - and plugging it in - nothing is showing on port 3c....   unusual... any thoughts?

Share this post


Link to post
Share on other sites
27 minutes ago, martinayotte said:

Is the SSD1306 appear when doing "i2cdetect -y 0" ?

For the other I2C buses, did you enabled them in the FEX ?

 

Hi there - no it is not appearing - but usually I use I2c1  - and there you have hit my limit - I have NO idea how to use that FEX - indeed I found an editor in the config and now I can't find that  - but no I have not enabled them in FEX - it would be nice to enable i2c1 - ????

Share this post


Link to post
Share on other sites

[twi0_para]

twi0_used = 1

twi0_scl = port:PB00<2><default><default><default>

twi0_sda = port:PB01<2><default><default><default>

 

Also one for twi1_para  -  and a twi_para   -  I set all 3 to 1 - recompiled - rebooted - no difference whatsoever...  still - at least now i know how to manipulate that file...

 

I don't think it has done anything though... the script.bin file has definitely been updated...

 

Share this post


Link to post
Share on other sites

HOWEVER

 

Adding these following your earlier example

 

overlays=i2c1
overlays=i2c0

 

Has moved an ugly UU entry to i2c1  - and my device now appears on i2c0 - - and.....  the display WORKS - Wheeeeeeee.

 

Thanks!

Share this post


Link to post
Share on other sites

Groan... but now the serial doesn't work any more (write error despite permissions being fine)... I think altering the FEL file might've done that as the serial overlays are still there...   permissions look ok too.

Share this post


Link to post
Share on other sites

As Zador said, overlays only work on Mainline, not on Legacy ...

Can you confirm which kernel are you using by doing "uname -a"  ?

 

59 minutes ago, scargill said:

twi0_scl = port:PB00<2><default><default><default>

twi0_sda = port:PB01<2><default><default><default>

 

That is strange : PBxx doesn't exist on H3 processor.

TWI0 is using PA11/PA12

TWI1 is using PA18/PA19

TWI2 is using PE12/PE13

 

 

Share this post


Link to post
Share on other sites

Ok, I got it - all on one line...

 

overlays=uart1 uart2 uart3 i2c0 i2c1

 

Even the unused UU has disappeared - and all is well.

Share this post


Link to post
Share on other sites

The UU means that this device is in use by a dedicated driver.

Probably that was the PMIC, so I don't understand why it disappeared ...

Again, can you confirm which kernel are you using by doing "uname -a"  ?

 

Share this post


Link to post
Share on other sites

Sorry about the delay - sleep (UK)

Linux plus2e 4.11.5-sun8i #11 SMP Fri Jun 23 20:03:23 CEST 2017 armv7l armv7l armv7l GNU/Linux
 

 

Share this post


Link to post
Share on other sites
1 hour ago, scargill said:

All I'm seeing is 2 large "legacy" buttons so I assumed that is all there is for this board.


That is alright. We are waiting for 4.13.x kernel to become matured enough. Then we will promote its usage with a big button ... support could burst into flames :) if we decide to promote unfinished products to end users. Even finished products are hard and costly to support.

Share this post


Link to post
Share on other sites

@scargill


Pete, try this image: https://dl.armbian.com/orangepiplus2e/Ubuntu_xenial_next_nightly.7z It's 4.13.1 (first common image), still considered a testing one, but it works quite well.

 

Go to armbian-config -> Armbian -> Overlays, choose function, press Save and go back. It will prompt for reboot ... It's tested for enabling audio via this menu and it worked after reboot. If you plan to use this image more seriously, freeze kernel update. Also from the menu.

 

 

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
1 1