please choosego to mobile | Continue to access the PC version
View: 19385|Reply: 20

Enable the serial port in Debian Jessie

[Copy link]

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
Published in 2016-2-22 18:48:06 | Show all floors |Read mode
Hello eveyone !Does someone can help me to solve the problem of serial port /dev/ttyS0 ?
It seems that I have to open some files and set something to use the serial port .....
Thanks !

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-22 19:19:48 | Show all floors
Edited by xwalter at 2016-2-22 19:59

at the moment in the /etc/inittab I have this information
S0:23:respawn:/sbin/getty -L ttyS0 115200 vt102Measuring with Voltmeter I have
GPIO14 - GND = 3.3 V
GPIO15 - GND = 3.3 V
The GND of orangepi is connected to GND of FTL232-USB to TTL 3V3 converter
It seems that the two pins are setted as output ...I don't know
I hope the layout pins is correct because I didn't found an orangepi pinout diagram but raspberry pi2

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-23 02:27:38 | Show all floors
I did some tests
  1. setserial -g /dev/ttyS[0123]
Copy code

this is ok ....and then I set the serial ports enabled
  1. systemctl enable serial-getty@ttyS0.service
Copy code

To check is serial port are enabled I see the IRQ assigned and it's ok
Then I type
  1. dmesg | grep ttyS
Copy code

Ant last control is
  1. ls > /dev/ttyS0
Copy code
  1. ls > /dev/ttyS2
Copy code
  1. ls > /dev/ttyS3
Copy code

Without any message and it's ok
But the serial ports don't work , no one port receive something and transmit something
This is a big problem ....

2

threads

144

posts

1066

credits

Gold member

Rank: 6Rank: 6

credits
1066
Published in 2016-2-23 02:30:38 | Show all floors
Do you actually have those serial-ports enabled in your script.bin?

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-23 02:48:42 | Show all floors
Edited by xwalter at 2016-2-23 03:02

in /boot  I have several script.bin , each one for each monitor resolution
Very strange because when I prepared the sd card I have followed the tutorial and renamed the uImage and script.bin depending by my monitor
But anyway inside the script.bin_xxxxx  I can read only one character which is  "N" in somewhere and "0" in other file
I have setted 1080_60 for the monitor  .....I have orangepi plus 2 and inside /boot I found two files for that ....
- script.bin.OPIPLUS_1080p50
- script.bin.OPIPLUS_1080p60
In both files there is only one data and it is 0  (zero) , but when I have installed from sd card was 36 kb ...then I install to the emmc by typing sudo install_to_emmc.
Do you mean I have to set to 2 or 3 to have uarts?
One question.....at pins 13 and 14 there is uart3 = /dev/ttyS3 ?

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-23 03:13:10 | Show all floors
I'm checking into my sd card that I remained with last image and script.bin but how to open it ?

2

threads

144

posts

1066

credits

Gold member

Rank: 6Rank: 6

credits
1066
Published in 2016-2-23 16:39:49 | Show all floors
You need to install sunxi-tools, then you convert the bin-file to a fex with "bin2fex script.bin > script.fex" or back with "fex2bin script.fex > script.bin"

Depending on your distro the actual files used for booting may be in /mnt/boot or /media/boot, even though there are also files in /boot.

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-23 17:49:02 | Show all floors
ok thanks !
Now I try to install sunxi-tools

5

threads

354

posts

2614

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2614
Published in 2016-2-23 18:01:08 | Show all floors
/dev//ttyS0 is the debug port! Attach your serial dongle there and you will see something.
check sunxi wiki!
e.g. http://linux-sunxi.org/Xunlong_Orange_Pi_Plus should be the same for pi plus2 apart 2gb ram same crappy usb to sata.
zio pino
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

17

threads

83

posts

382

credits

Intermediate member

Rank: 3Rank: 3

credits
382
 Author| Published in 2016-2-23 18:10:24 | Show all floors
Edited by xwalter at 2016-2-23 18:23

yes you're righe zio pino . The orange pi plus is the same of plus 2 apart the EMMC and  the RAM sizes.
At the moment I have connected the pins PA13 and PA14 each which is :
- PA13  ->  UART3_TX
- PA14  ->  UART3_RX
So I'm using the /dev/ttyS3  ,  is that right?
Yes because ....
  1. dmesg | grep ttyS
Copy code
Responds .....
  1. [    0.000000] Kernel command line: earlyprintk=ttyS0,115200 loglevel=8 initcall_debug=0 console=ttyS0,115200 console=tty0 init=/init
  2. [    0.627413] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
  3. [    0.723616] console [ttyS0] enabled
  4. [    0.850323] uart2: ttyS2 at MMIO 0x1c28800 (irq = 34) is a SUNXI
  5. [    0.850572] uart3: ttyS3 at MMIO 0x1c28c00 (irq = 35) is a SUNXI
  6. [   10.213707] systemd[1]: Expecting device dev-ttyS0.device...
  7. [   10.228992] systemd[1]: Expecting device dev-ttyS3.device...
  8. [   10.244060] systemd[1]: Expecting device dev-ttyS2.device...
Copy code
The test
  1. ls > /dev/ttyS3
Copy code
....it's ok , no message
But serial doesn't work yet



You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list