Forum: Mikrocontroller und Digitale Elektronik Raspberry Pi 3 - Raspbian Stretch - Serielle Console


von Welle 🧐 S. (w3llschmidt)


Lesenswert?

Ich bekomme es nicht hin :(

Ich möchte einfach nur mich mit der seriellen Console verbinden!

Ich habe hier zwei nagelneue Raspberry PI 3 / Zero W.
1
/boot/cmdline.txt
2
3
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=e8bd1f46-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
1
/boot/config.txt 
2
3
# Enable audio (loads snd_bcm2835)
4
dtparam=audio=on
5
start_x=1
6
gpu_mem=128
7
enable_uart=1

Das ist die Orginalconfig, ich habe am Raspian nichts weiter getan, als 
mit Raspi-Config ... die Serielle Console zu aktivieren.

Der Schalter wird in der /boot/config.txt auch gesetzt. enable_uart=1

Hat jemand eine Idee?

: Bearbeitet durch User
von Peter (Gast)


Lesenswert?

ggf. Pegelproblem - TTL vs. seriell oder nicht gekreuzt?

Sag mal bitte, wie du den Raspi mit dem Rechner verbunden hast, von dem 
aus du dich per ser. Konsole einloggen möchtest.

von Welle 🧐 S. (w3llschmidt)


Lesenswert?

Hi Peter,

hiermit:

https://shop.in-circuit.de/images/USB-A-UART-Bridgecp2102_45.jpg

Kreuzen braucht man wohl nicht:

IO: RX ( to connect with RX on the µC),
TX (to connect with TX on the µC),
GND, VCC

Ich geb zu, ich habe VCC (3,3V) (CP2102, VDD) nicht verbunden.

Ich gehe davon aus das der CP2102 via REGIN versorgt wird?

http://wiki.in-circuit.de/images/0/00/610000064A.pdf

Beitrag "Anschluss CP2102"

: Bearbeitet durch User
von Welle 🧐 S. (w3llschmidt)


Lesenswert?

Gerade getestet, am Cubietruck läuft es 1a ...

: Bearbeitet durch User
von Peter (Gast)


Lesenswert?

Hm sieht erstmal gut aus für mein Verständnis.

Ich persönlich würde dann weiter so vorgehen - in dieser Reihenfolge:

1.
abklären, ob das USB Interface überhaupt funktioniert - Rx und Tx mit 
115kBit. Falls du 2 von den Dingern hast, einfach verbinden.

2.
abklären, ob die UART vom Pi3 funktioniert - mit einem python script 
testweise Daten über die Serielle senden und empfangen

3.
wenn Interface und Raspi UART wirklich funktionieren, dann prüfen, ob 
beim Booten Textausgaben vom Raspi auf der UART kommen

4.
weiter nachdenken ;)

von RP6conrad (Gast)


Lesenswert?

Bei den Pi3 und Raspian Stretch wird den uart standard an die Bluetooth 
Schnittstelle geleitet. Das musst due erst ausschalten :
https://www.raspberrypi.org/documentation/configuration/uart.md

von w3llschmidt (Gast)


Lesenswert?

Hab ich ...

The Linux console can be re-enabled by adding enable_uart=1 to 
config.txt. This also fixes the core_freq to 250Mhz (unless force_turbo 
is set, when it will fixed to 400Mhz), which means that the UART baud 
rate stays consistent.

von w3llschmidt (Gast)


Lesenswert?

Das muss ich nochmal testen ...

The particular deficiencies of the mini UART compared to the PL011 are :

No break detection
No framing errors detection
No parity bit
No receive timeout interrupt
No DCD, DSR, DTR or RI signals

von Welle 🧐 S. (w3llschmidt)


Lesenswert?

Kein Erfolg :(

Hat hier jemand ein Raspi3 Etch mit Console an GPIO14/15 laufen?

von RP6conrad (Gast)


Lesenswert?

Pi3, Rasbian Stretch "Desktop", Serielle Ausgabe ueber pin 14/15 mit 
Python. Meine config.txt :
1
# For more options and information see
2
# http://rpf.io/configtxt
3
# Some settings may impact device functionality. See link above for details
4
5
# uncomment if you get no picture on HDMI for a default "safe" mode
6
#hdmi_safe=1
7
8
# uncomment this if your display has a black border of unused pixels visible
9
# and your display can output without overscan
10
#disable_overscan=1
11
12
# uncomment the following to adjust overscan. Use positive numbers if console
13
# goes off screen, and negative if there is too much border
14
#overscan_left=16
15
#overscan_right=16
16
#overscan_top=16
17
#overscan_bottom=16
18
19
# uncomment to force a console size. By default it will be display's size minus
20
# overscan.
21
#framebuffer_width=1280
22
#framebuffer_height=720
23
24
# uncomment if hdmi display is not detected and composite is being output
25
hdmi_force_hotplug=1
26
27
# uncomment to force a specific HDMI mode (this will force VGA)
28
hdmi_group=2
29
hdmi_mode=35
30
31
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
32
# DMT (computer monitor) modes
33
#hdmi_drive=2
34
35
# uncomment to increase signal to HDMI, if you have interference, blanking, or
36
# no display
37
#config_hdmi_boost=4
38
39
# uncomment for composite PAL
40
#sdtv_mode=2
41
42
#uncomment to overclock the arm. 700 MHz is the default.
43
#arm_freq=800
44
45
# Uncomment some or all of these to enable the optional hardware interfaces
46
#dtparam=i2c_arm=on
47
#dtparam=i2s=on
48
#dtparam=spi=on
49
50
# Uncomment this to enable the lirc-rpi module
51
#dtoverlay=lirc-rpi
52
53
# Additional overlays and parameters are documented /boot/overlays/README
54
55
# Enable audio (loads snd_bcm2835)
56
dtparam=audio=on
57
dtoverlay=w1-gpio
58
enable_uart=1
Meine cmdline.txt :
1
dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=d346a9c1-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

von Mick (Gast)


Lesenswert?

Common GND verwendet?

von Welle 🧐 S. (w3llschmidt)


Lesenswert?

Den an Pin 6 benuzt ich.

https://i.stack.imgur.com/7A0Co.jpg

von Welle 🧐 S. (w3llschmidt)


Lesenswert?

Ich verstehe es nich.

Niemand hier die Serielle Console am Raspi3 in Betrieb?

von Mick (Gast)


Lesenswert?

W3ll S. schrieb:
> Niemand hier die Serielle Console am Raspi3 in Betrieb?

Doch...

Vermutlich fehlt dir folgendes in der config.txt: 
dtoverlay=pi3-disable-bt

von Joachim B. (jar)


Lesenswert?

W3ll S. schrieb:
> Niemand hier die Serielle Console am Raspi3 in Betrieb?

wenn du die ser.GPIO meinst -> am 3er nie, kurz mal am PI B mit max3232 
zu PC

an anderen reicht mir Putty oder USB2rs232

von olibert (Gast)


Lesenswert?

W3ll S. schrieb:
> Ich verstehe es nich.
>
> Niemand hier die Serielle Console am Raspi3 in Betrieb?

Was soll gehen ?  Console-Output oder Login-Prompt auf der Console ? 
Letzteres geht natuerlich nicht ohne Port-Monitor auf Unix-Systemen (bei 
Linux normalerweise ein Getty-Process).

von Welle 🧐 S. (w3llschmidt)


Angehängte Dateien:

Lesenswert?

Ich brauche ein Loginprompt.

Ein Getty läuft.

von Mick (Gast)


Lesenswert?

Vertausch mal die TX und RX Leitungen.

von Mick (Gast)


Lesenswert?


von Wolframator (Gast)


Lesenswert?

W3ll S. schrieb:
> Ich verstehe es nich.
>
> Niemand hier die Serielle Console am Raspi3 in Betrieb?

Auch wenn es für Dich zu spät ist, evtl. für andere noch nicht...

ACHTUNG:

Unter Jessie lief die serielle Schnittstelle (mit pi3-miniuart-bt und 
den anderen Einstellungen) auf /dev/ttyAMA0. Auf Stretch mit den 
GLEICHEN(!) Einstellungen ist die identische serielle Schnittstelle 
jetzt bei mir auf /dev/ttyS0 drauf.

Wenn jemand Probleme hat dann einfach mal AMA0 und S0 tauschen :)

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.