DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-07-10 19:20:40

haihai
Member
Registered: 2007-04-24
Posts: 6

Serial port to send data

Hi all.

I'm triying to send data and receive data in serial port. I create a shifter-dsmg600.jpg (http://dns323.kood.org/dsmg600/_detail/ … ache=cache) and I conect to con4. After that, I do a Serial Loopback Test with pin# 2 and pin# 3 shorted and write a bash script:

Code:

#!/bin/sh 
exec 3<>/dev/ttyS0 
echo "Command 1" >&3 
read response <&3 
echo "$response" >>/tmp/responselog 
exec 3>&-

But the script no receive, and wait until break the script.
Help, please....

Last edited by haihai (2007-07-10 19:24:14)

Offline

 

#2 2007-07-23 11:33:52

haihai
Member
Registered: 2007-04-24
Posts: 6

Re: Serial port to send data

After to read a lot of this theme ( I'm a newbie to use serial port in linux), I discover that the serial port is configured to console output:

Code:

/mnt/HD_a2 # dmesg | grep tty
Kernel command line: root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
ttyS0 at MMIO 0x0 (irq = 3) is a 16550A

I'm interested to use this serial port as a detector of 0/1 (conect to switch) to control and log. The program in sh it isn't problem, only needs control over the serial port.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB