From: "Dmitry E. Oboukhov" <node@avanto.mpei.ac.ru>
To: community@altlinux.ru
Subject: Re: [Comm] COM-port & bash
Date: Sat, 28 Dec 2002 17:05:15 +0300
Message-ID: <3E0DAF9B.3060309@avanto.mpei.ac.ru> (raw)
In-Reply-To: <000501c2ae78$425b8d80$056409c0@LocalHost>
Бессонов Ян wrote:
>----- Original Message -----
>From: "Dmitry E. Oboukhov" <node@avanto.mpei.ac.ru>
>To: <community@altlinux.ru>
>Sent: Saturday, December 28, 2002 4:30 PM
>Subject: Re: [Comm] COM-port & bash
>
>
>
>
>>>Дак ты одним процессом читаеш , а другим пишеш -- разные опереции над
>>>устройством...
>>>Ян
>>>
>>>
>>>
>>>
>>ясно я уже попробывал
>>параметры поставил с помощью stty
>>и поигрался с оправлением данных в порт
>>
>>теперь так:
>>как принимать данные из порта ?
>>
>>cat возвращает управление сразу после того, как буффер
>>приема станет пустым... то есть строку до конца не дочитывает,
>>
>>можно чем-нибудь организовать построчное чтение ?
>>
>>
>вопрос не понятен... я обычно делал
>cat /dev/ser1
>
>
нет такого девайса
(да и в первый раз о нем слышу ;)
а
cat /dev/ttyS0
возвращает управление _сразу_
не прочитав ни одного байта
а
cat /dev/urandom > /dev/ttyS0
нормально отправляет байты на скорости, которую
поставил в stty (осциллографом хорошо все видно ;)
перемкнул второй и третий провода на порту
делаю
dd if=/dev/urandom of=file count=1
cat file > /dev/ttyS0
cat /dev/ttyS0
на экране не получаю ничего, скрипт заканчивает работу,
хотя в мане читал, что принятые данные по умолчанию
должны хранится 25 секунд,
ладно с этим разберемся...
делаем:
$dd if=/dev/ttyS0 of=/tmp/test count=1
получаем:
0+0 входных записей
0+0 выходных записей
0 bytes transferred in 0,009945 seconds (0 bytes/sec)
почему ?
$ groups
dimka lp dialout cdrom audio video
$ls -l /dev/ttyS0
crw-rw---- 1 root dialout 4, 64 2002-12-28 16:51 /dev/ttyS0
почему чтение не открыввает порт ( по крайней мере не выкатывает
ошибку ?)
ЗЫ: тестирую пока на Дебиане (дома погляжу на АЛЬТе,
но не думаю что тут будут отличия...)
щас еще по сериал-ховту пройдусь...
next prev parent reply other threads:[~2002-12-28 14:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-28 11:55 Dmitry E. Oboukhov
2002-12-28 12:18 ` Бессонов Ян
2002-12-28 12:45 ` Dmitry E. Oboukhov
2002-12-28 12:48 ` Бессонов Ян
2002-12-28 12:54 ` Dmitry E. Oboukhov
2002-12-28 13:21 ` Бессонов Ян
2002-12-28 13:30 ` Dmitry E. Oboukhov
2002-12-28 13:51 ` Бессонов Ян
2002-12-28 13:55 ` Dmitry E. Oboukhov
2002-12-28 14:05 ` Dmitry E. Oboukhov [this message]
2002-12-28 14:19 ` Dmitry E. Oboukhov
2002-12-28 15:05 ` Dmitry E. Oboukhov
2002-12-28 15:09 ` Бессонов Ян
2002-12-28 15:21 ` Dmitry E. Oboukhov
2002-12-28 15:32 ` Yura Kalinichenko
2002-12-28 15:59 ` Dmitry E. Oboukhov
2002-12-29 8:21 ` Yura Kalinichenko
2002-12-30 7:49 ` Dmitry E. Oboukhov
2002-12-28 15:05 ` Бессонов Ян
2002-12-28 15:18 ` Dmitry E. Oboukhov
2002-12-28 15:21 ` Бессонов Ян
2002-12-28 15:34 ` [Comm] Ура! оно заработало! man stty !!! Dmitry E. Oboukhov
2002-12-28 15:42 ` Sergey Bolshakov
2002-12-28 16:08 ` Dmitry E. Oboukhov
2002-12-28 16:16 ` Sergey Bolshakov
2002-12-28 16:31 ` Dmitry E. Oboukhov
2002-12-28 16:44 ` Sergey Bolshakov
2002-12-29 14:16 ` Vitaly Lugovsky
2002-12-29 14:55 ` [Comm] Re[2]: " ASA
2002-12-29 15:09 ` Vitaly Lugovsky
2002-12-30 7:54 ` Dmitry E. Oboukhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E0DAF9B.3060309@avanto.mpei.ac.ru \
--to=node@avanto.mpei.ac.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git