Serielle Schnittstelle nutzen

Noch keine Erfolgserlebnisse? Mir schwebt was ähnliches vor, weiss aber noch nicht ob mit der FBF oder mit meinem Asus-Router der direkt ein USB-Interface hat.

Lars
 
Hi

i don't speak german, but i think this is the right place for this post

I'm trying to build a serial cable from an original Siemens ME45 phone for my Fritz Box Ata

i've connected Rx,Tx and GND like this
fritz4.jpg


my connections are exactly the same as in the picture, but serielle console does not work in Hyperterminal (or in minicom)

i read that for original Siemens cable I have to plug also 3.3V from UBAT plus a sort of resistance...but it's quite hard for me to translate

i've tried to connect pin 4 of my phone cable (VBAT) with 3.3V on the fritz, but nothin happens!
 
ol@fson schrieb:
wäre es vielleicht möglich, ein LC Display an der seriellen Schnittstelle ans Laufen zu kriegen ?

Klar ist das möglich. Es gibt nämlich serielle Displays. Z.B. das Siemens-Nixdorf BA63 (gibt es bei eBay. Such nach "Kundendisplay" oder nach "BA63"). Für das BA63 muss man allerdings die Serielle Schnittstelle auf 9600 Bit/s einstellen. Dafür braucht man ein stty. Das kann entweder die Busybox übernehmen oder man baut sich ein standalone-stty. Der Aufruf zum Konfigurieren der Schnittstelle ist dann folgender:
Code:
stty -F /dev/ttyS0 speed 9600 parenb parodd cs8

Und danach kann man dann einfach die auszugebenden Informationen nach /dev/ttyS0 schreiben. Z.B. Datum anzeigen:
Code:
echo -n -e "\033[1;1H`date "+%d.%m.%Y  %H:%M:%S"`" > /dev/ttyS0
oder Hello World:
Code:
echo -n -e "\033[1;1HHello World!" > /dev/ttyS0

Das Datenblatt zu dem Display findest du bei Google als PDF und den Schaltplan häng ich hier als Attachment an. Im Datenblatt sind auch der verfügbare Zeichensatz und die verfügbaren ANSI-Codes beschrieben. Natürlich benötigt man beim Anschluss des Displays auch einen Pegelwandler a la MAX323, denn das Display verwendet 12-Volt-Pegel wie ein PC und kein TTL-Pegel (5 Volt).

Ich habe so ein Display an die Serielle Schnittstelle meines Linksys WRT54GS Rev. 1.1 Routers gehängt. Bei einer Fritzbox muss es genau so gehen. Wenn die Fritzbox nur eine serielle Schnittstelle hat, dann muss man dem Kernel noch sagen, dass er seine serielle Konsole nicht auf ttyS0 ausgibt. Wie das geht, hab ich gerade nicht zur Hand...

Zoo
 

Anhänge

  • post-11-1074278156.jpg
    post-11-1074278156.jpg
    35.8 KB · Aufrufe: 167
  • wrt54gs_rev1.1_1.jpg
    wrt54gs_rev1.1_1.jpg
    114 KB · Aufrufe: 173
Zuletzt bearbeitet:
Hallo sk.78 and welcome to this forum,

sk.87 schrieb:
I'm trying to build a serial cable from an original Siemens ME45 phone for my Fritz Box Ata

I think you found the tutorial on how to build in a serial console HERE

sk.87 schrieb:
my connections are exactly the same as in the picture, but serielle console does not work in Hyperterminal (or in minicom)

Settings for the terminal are: 38400,N,8,1

sk.87 schrieb:
i read that for original Siemens cable I have to plug also 3.3V from UBAT plus a sort of resistance...but it's quite hard for me to translate

i've tried to connect pin 4 of my phone cable (VBAT) with 3.3V on the fritz, but nothin happens!

You don't need to use an extra resitor or the V3.3 connector on the box.

You just have to connect your serial cable with the terminal settings above an plug in the power cord to your box. Then it should work.

Greets, Kreideholer
 
kreideholer schrieb:
Hallo sk.78 and welcome to this forum

Thank you


kreideholer schrieb:
I think you found the tutorial on how to build in a serial console HERE

Exactly, but i can't know if the "other side of the cable" in those picture is the same as mine


kreideholer schrieb:
Settings for the terminal are: 38400,N,8,1

giacomo@Debby:~$ dmesg |grep tty
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0b: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

This is my minicom panel...other settings are unchanged

+-----------------------------------------------------------------------+
| A - Serial Device : /dev/ttyS0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 38400 8N1 |
| F - Hardware Flow Control : Yes |
| G - Software Flow Control : No |
+-----------------------------------------------------------------------+


kreideholer schrieb:
You don't need to use an extra resitor or the V3.3 connector on the box.

You just have to connect your serial cable with the terminal settings above an plug in the power cord to your box. Then it should work.

Greets, Kreideholer

so i don't need any kind of UBAT or VBAT or physical battery to the 3.3V hole?


i'm taking some pictures right now, i'll post as soon as possible
 
heini66 schrieb:
it's depending, what kind of serial converter cable you use.
i use a pl2303 and have to solder a 4,7k resistor from 3,3v to rx. as pull-up.
some versions need also a connection to ubat from the 3,3v.
http://www.kessler-design.com/speedport-w700v/hardware.html only german, bt the pic's are may helpfull
hard and software flow controll off...


ok I've turned hardware flow control off

this is a picture of my cable, on the serial male plug there's written "Siemens for pour fur RS-232"

my.php
 
this is picture of my current connections

immag053tc3.jpg


sorry but this is the max quality i can provide now... but I can take from a digital camera if needed
 
ok but

as you can see here

s25_loet.png


Lumberg
1 GND
2 SB
3 CHARGE
4 BATT
5 DATA OUT
6 DATA IN
7 Z_CLK
8 Z_DATA
9 MICG
10 MIC
11 AUD
12 AUDG

(from http://www.nobbi.com/phones.htm )

pin 10 on the cable is not BATT but MIC ... is it right?

anyway I'll try



UPDATE:

I've tried pin 10 (on your suggestion) and pin 4 too, but nothing happens
only 1 thing different: I'm using a 10k resistor instead of the 4,7k one
One particular thing: if i touch RX cable (plugged both sides box-cable ) with the 3.3V cable (plugged only in the box) when the fritz is ON I can cause a sort of reset (all led blinks) i think because of a short circuit or something similar ... I hope this helps you find how my cable works


one question: because I'm not sure if my Hyperterminal/Minicom is working i want to use a cat like "cat /dev/ttyS0" just to test my serial port...should this command output something if my serial cable is working?
as soon as i can I'll post an high resolution image of my work
 
Zuletzt bearbeitet:
iwow schrieb:
ich habe mittlerweile meine kleine Applikation für die Fritz!Box übersetzt bekommen (Danke an enrik für die schöne buildroot Umgebung).

Hallo iwow,

was genau macht denn Deine EIB Applikation?
Und wie genau ist der Stand?
Würde die EIB Ansteuerung mit der FB auch über den IP Router N148/21 gehen?
Suche nämlich genau auch so was um mit der FB mein EIB Haus zu visualisieren! :rolleyes:
 
schnittstelle frei machen

hallo ich habe an der TTYS0 einen DS2480B (1-wire hängen). das geht auch technisch perfekt aber nur " ein " mal.

Problem : ich sende einen code auf STTY0 --> zum DS2480B --> der antwortet auch und alles sit gut aber jetzt fängt die box an die antwort wieder zu beantworten und ein loop entsteht.

wie kann ich die box so tot legen das auf ttyS0 kein terminal antwortet ????

grüße und 1000.000 dank

Fritzbox 7050 mit Freetz und digitemp
 
Zunächst solltest Du die Shell, auf auf dem Anschluß läuft, stoppen (nicht killen). Zum anderen solltest Du das Echo ausschalten (man stty).
 
ja echo ist klar. ich habe die gleiche anwendung auf einem NAS laufen. ich weis nur nicht wie ich die shell stoppe. auf dem nas geht das durch edit der INITTAB und dann neuen init fahren. aber auf der fritzbox geht inittab gar net zu editieren.

danke.

EDIT: (so weit komme ich)

PHP:
   __  _    __  __ ___ __
  |__ |_) |__ |__  |    /
  |    |\   |__ |__  |  /_

   The fun has just begun...


BusyBox v1.12.4 (2009-02-14 01:54:05 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

ermittle die aktuelle TTY
tty is "/dev/pts/0"
Console Ausgaben nicht umgelenkt
/var/mod/root # stty -F /dev/ttyS0 9600
/var/mod/root # digitemp -i -w -s/dev/ttyS0
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
.
Devices on the Main LAN
10A0B47B01080016 : DS1820/DS18S20/DS1920 Temperature Sensor

/var/mod/root #

dann steht die kiste und loopt wie blöde
ich trenn dann RX und TX auf und sehen auf dem oszi wie die box unendlich sendet. WAS AUCH IMMER. nach ca 30 sekunden verabschiedet sich dann die ETH1 schnittstelle und die box läuft über vor daten und steht.

komisch oder ???

hat jemand schon mal so eine box dazu bekommen den port zu benutzen ohne das da fehler auftreten ??? kernel ausgaben könnte ich verkraften die kommen hoffentlich nicht so häufig ich würde RX und TX mit den LED status trennen von der BOX.

grüße

NACHTRAG !!! 17.2.2009 18:03 :

der fehler mit dem loop + absturtz unsw tritt nur in verbindung mit STTY einstellung auf.
wenn ich ca 10-15 CP befehle hintereinander auf /dev/ttyS0 mache geht alles gut.
mache ich dann ein " stty 9600 < /dev/ttyS0 " und dann wieder einen CP nach TTYS0 springt die box ins grab.

Lösung ???

Foto : (box steht verbindung unterbrochen - Neustart nötig)
freetz.jpg


grüße
 
Zuletzt bearbeitet:
Wenn ich ca 10-15 CP befehle hintereinander auf /dev/ttyS0 mache geht alles gut. mache ich dann ein " stty 9600 < /dev/ttyS0 " und dann wieder einen CP nach TTYS0 springt die box ins Grab.
Hallo xxlxx,
die Schnittstelle steht nach dem Hochlauf wahrscheinlich auf 38400 Baud, wenn Du dann was sendest, versteht Dich die Gegenstelle nicht. Stellst Du auf 9600 Baud versteht sie und sobald die Gegenstelle ein CR bzw. LF sendet, denkt die Box, da ist ein Terminal dran.
Da Du Freetz hast, dürfte die einfachste Lösung sein, einen neuen Kernel ohne "serielle Console" zu bauen. Ich weiss nicht ganz genau wie das geht, so in etwa "make kernel-menuconfig", Option "Device Drivers" - "Character devices" - "Serial drivers" - "Console on 8250/16550 and compatible port" abwählen und neu generieren. Evtl. muss man im normalen menuconfig noch "Kernel ersetzen" anwählen, ich hab das vor Jahren mal gemacht. und weiss das leider nicht mehr genau.
Die Abschaltung im Hochlauf per LED kannst Du Dir - wegen der unterschiedlichen Baudrate - auch sparen.
Gruss, Reiner
 
top geile IDEE du bringst mich auf was ... ich habe das kernel mit den devices schon geändert hatte aber keine änderung germerkt. mir hat aber auch die sache mit dem " kernel ersetzen " gefehlt. achso die box geht auch in die knie wenn rx und tx unbelegt sind .... auf tx kommen dann unendlich daten

ich werds dann mal testen ... ich hoffe ich hab glück

& danke für deinen TIP

grüße Sebastian

EDIT 20:38 -->

das mit dem kernel war eine gute idee kernel ist jetzt auch 100kb kleiner.

es geht leider nicht TX sendet wie blöde was auch immer.

alle prozesse mal beendet die nicht benötigt werden. --> sendet immer noch

PHP:
Mem: 15908K used, 14336K free, 0K shrd, 2372K buff, 7976K cached
CPU:   0% usr   0% sys   0% nice  98% idle   0% io   0% irq   0% softirq
Load average: 0.00 0.03 0.02
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
  624   513 root     R     1164   4%   1% top
  512     1 root     S     1184   4%   0% -/bin/sh
  513   502 root     S     1188   4%   0% -sh
    1     0 root     S     1168   4%   0% init
  502     1 root     S     1160   4%   0% telnetd -l /sbin/ar7login
   71     1 root     SW       0   0%   0% [mtdblockd]
  309     5 root     SW<      0   0%   0% [capi_oslib]
    3     1 root     SW<      0   0%   0% [events/0]
    4     1 root     SW<      0   0%   0% [khelper]
   26     5 root     SW<      0   0%   0% [aio/0]
   25     1 root     SW       0   0%   0% [kswapd0]
   62     1 root     SW       0   0%   0% [pm_info]
   97     1 root     SW       0   0%   0% [tffsd_mtd_0]
  308     5 root     SW<      0   0%   0% [capi_oslib]
    2     1 root     SWN      0   0%   0% [ksoftirqd/0]
  310     1 root     SW       0   0%   0% [ubik2_tx[8]]
  311     1 root     SW       0   0%   0% [capitransp]
    5     1 root     SW<      0   0%   0% [kthread]
    6     5 root     SW<      0   0%   0% [kblockd/0]
   23     5 root     SW<      0   0%   0% [pdflush]
   24     5 root     SW<      0   0%   0% [pdflush]

auch ein stty sane < /dev/ttyS0 hilft nicht

wie kann man ein TTY buffer löschen??? vieleicht steht da viel drin was 2-unendlich stunden dauert zum senden. Sieht man die größe des TX buffer ?
IDEE : nach jeder digitemp abfrage ein tty reset machen ... ???

mir gehen die ideen aus

grüße Sebastian
 
Zuletzt bearbeitet:
Wenn Du schon freetz verwendest, hast Du die Datei /etc/inittab abgeändert, damit keine Shell auf dem Port gestartet wird? Dafür muß diese Zeile weg.
Code:
"askfirst" shell on the console (whatever that may be)
ttyS0::askfirst:-/bin/sh
 
habe ich versucht aber : die datei ist read only in der box. (flash speicher).
wo ändert man die datei im image befor man das image flasht ???

danke für infos.

EDIT :

im freetz verzeichniss gefunden mit find . -name inittab
edit mit VI - Zeile rausgeschmissen

ich mache garade neues make ... mal sehen obs geht ...

EDIT :

leider geht das nicht so einfach 2x mal die inittab im freetz source geändert und dann ein make hinterher. dann ein Update auf die box und die ASKFIRST zeile ist wieder auf der box.

wo und was mus geändert werden um es im image festzuhalten
 
Zuletzt bearbeitet:

Statistik des Forums

Themen
244,884
Beiträge
2,220,157
Mitglieder
371,618
Neuestes Mitglied
kitachris
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.