Re: set connection to a modem

2012-12-02 Thread Steve O'Hara-Smith
On Sun, 2 Dec 2012 12:28:59 +0400
Peter Vereshagin pe...@vereshagin.org wrote:

 Hello.
 
 2012/12/02 09:41:12 +0330 s m sam.gh1...@gmail.com = To Chris Petrik :
 sm thanks chris
 sm 
 sm ppp is used when you want connect to internet via modem. 
 
 What if your (or someone else's) ISP use dial-back?
 
 This way ppp(8) can't be used because it's not you want to connect to
 internet but internet wants to connect you?
 
 I believe ppp is an equal peers'  peer-to peer (point-to-point) protocol.
 
 And it can be used for dial-in conections.

Of course it can be used for dial in connections, that's what
happens at the ISP end of the connection. It can also be used for fixed
point to point connections over directly wired connections or leased line
modems or using ATM as a carrier.

All of this is covered in great detail in section IV of the
handbook - 27 Serial Communications and 28 PPP and SLIP.

-- 
Steve O'Hara-Smith at...@sohara.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: set connection to a modem

2012-12-02 Thread Polytropon
On Sun, 2 Dec 2012 09:41:12 +0330, s m wrote:
 thanks chris
 
 ppp is used when you want connect to internet via modem.

Basically yes, but it can do more than that.



 i just want to
 config my modem by AT command.

This is _exactly_ what PPP does (among other things). :-)

Refer to the example I've provided in an earlier message on
how you can use /etc/ppp/ppp.conf to define the settings for
speed and flow control which will then be processed by PPP,
it will send the _proper_ AT commands using chat (see man chat
for details).

On the other hand, if you use a program like minicom, there
will be a config file provided where you can put your settings
and custom AT commands (if required) into it. I haven't been
using it for long time, but if I remember correctly, the
config file is /usr/local/etc/minirc.something... ???



 when my ppp.conf file is empty, i can talk to my modem so this config file
 do nothing what you want talk to your modem.

The file is only relevant to PPP. If you're using a different
program, it will be ignored. Only PPP reads it at startup.



 if i want to talk to my modem by a specific speed, which config file should
 be changed?

That depends on the _program_ you use to talk to the modem.

Again: If you use ppp, put set speed 115200 (or whatever speed
you need) in ppp.conf's section for your connection. If you are
using a different program, check its documentation to find out
which config file it uses. There is no system-wide configuration
file for what you need.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: set connection to a modem

2012-12-02 Thread Ilya Kazakevich
Hello,

ppp is used when you want connect to internet via modem. i just want to
 config my modem by AT command.
 when my ppp.conf file is empty, i can talk to my modem so this config file
 do nothing what you want talk to your modem.

 if i want to talk to my modem by a specific speed, which config file should
 be changed?


You use some app to talk to your modem via serial port. You may configure
speed for each program.
You use minicom to connect to the remote system manually and you set speed
via minicom config.
You use PPP to connect to the remote system and internetwork with it and
you use ppp.conf to configure speed.

If you are interested in *default* values and port configuration regardless
app you use see:
/dev/ttyuN.init
/dev/cuauN.init
/dev/ttyuN.lock
/dev/cuauN.lock

Please read http://www.freebsd.org/doc/handbook/serial.html
man sio

Ilya.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: set connection to a modem

2012-12-01 Thread Chris Petrik
On 12/1/2012 12:38 AM, saeedeh motlagh wrote:
 thanks Ilya for your reply.  i'm using putty to connect to my modem
 and also/dev/cuauo as the config file. i can co
 nnect to my modem and it responses to AT commands that you suggest so every
 thing is ok.


 my question is: this connection via /dev/cuau0 can be configured, doesn't
 it? and if yes, through which config file i can set these settings such as
 speed, flow control, etc. for this connection?  for example, my modem
 works just
 with a specific speed. how i can tell  /dev/cuau0 device to talk to my
 modem with this speed? as i have no idea how to config the connection speed
 for this /dev/cuau0 device..

 any guidance would be really appreciated.
 thanks


 On Fri, Nov 30, 2012 at 1:19 AM, Fbsd8 fb...@a1poweruser.com wrote:

 s m wrote:

 thanks guys for your replies,

 now i understand two types of connections are available by modem, dial-in
 and dial-out.
 honestly, i should do it for my boss and don't know what he should want
 exactly to do but i am sure that he has an external serial modem and wants
 to config it by AT commands via a freebsd system; therefore i think our
 connection is dial-out.

 now which files i should edit? just ppp.conf? and because our modem
 supports specific speed and flow control, is it necessary to set these
 parameters in my freebsd? and if yes, how i can do that?  please help me
 to
 do that

 thanks


 There are very detailed ppp configuration instructions here
 www.a1poweruser.com


 __**_
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-**
 unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
I am just poking about so sorry if im off topic but you can possibly use
ppp to do this?
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/userppp.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: set connection to a modem

2012-11-29 Thread Ilya Kazakevich
Hello,

honestly, i should do it for my boss and don't know what he should want
 exactly to do but i am sure that he has an external serial modem and wants
 to config it by AT commands via a freebsd system; therefore i think our
 connection is dial-out.


1) Make sure your serial port and modem work. Try to talk to your modem
using some tool like minicom (/usr/ports/comms/minicom).
Try to send some AT commands to your modem:
ATZ (should return OK)
ATI7 (should return product info)
ATDTSOME_PHONE (should dial it)


2) To talk to your modem you  will use chat tool, so read man chat

3) To connect your PC to the internet via serial modem you use PPP.
So read
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ppp-and-slip.html

You should understand how PPP works to configure it so you may want to read
http://en.wikipedia.org/wiki/Point-to-point_protocol
or
http://tools.ietf.org/html/rfc1661

Ilya.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


set connection to a modem

2012-11-28 Thread s m
hello guys,

i want to connect my freebsd system to modem and configure it via my
freebsd. i thought that i should change /etc/ttys file to set speed and
other configuration. in order to check if i am right or not, i comment ttyu
line in ttys file and expect the modem got disconnected but the modem still
works and can access to it.

i googled and found that there are three files in /etc that we can edit
them to configure our devices: /etc/ttys, /etc/gettytab and
/etc/rc.d/serial.sh. moreover we can edit init file for each device in /dev
to set default speed and other configuration by stty command.

now i am confused and don't know which file i should edit to set speed and
flow control and other setting to have a connection to my modem. i mean
from which file i can configure my connection? i know it's too easy but
please clear it for me.

yours,
sam
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: set connection to a modem

2012-11-28 Thread Matthias Apitz
El día Wednesday, November 28, 2012 a las 01:44:18PM +0330, s m escribió:

 hello guys,
 
 i want to connect my freebsd system to modem and configure it via my
 freebsd. i thought that i should change /etc/ttys file to set speed and
 other configuration. in order to check if i am right or not, i comment ttyu
 line in ttys file and expect the modem got disconnected but the modem still
 works and can access to it.
 
 i googled and found that there are three files in /etc that we can edit
 them to configure our devices: /etc/ttys, /etc/gettytab and
 /etc/rc.d/serial.sh. moreover we can edit init file for each device in /dev
 to set default speed and other configuration by stty command.
 
 now i am confused and don't know which file i should edit to set speed and
 flow control and other setting to have a connection to my modem. i mean
 from which file i can configure my connection? i know it's too easy but
 please clear it for me.

The answer higly depends on what you want todo with your modem; if you
want to dial-out, you do not need the above files; your terminal
application (for example 'kermit') will do this; or the ppp/chat will
do;

if you want to offer dial-in service (for fax or for data/login), check
the ports for 'HylaFAX' or for 'mgetty' and follow the installation
guide;

HIH

matthias
-- 
Sent from my FreeBSD netbook

Matthias Apitz   |  - No system with backdoors like Apple/Android
E-mail: g...@unixarea.de |  - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |  - No proprietary attachments
phone: +49-170-4527211   |  - Respect for open standards
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Fwd: set connection to a modem

2012-11-28 Thread Ilya Kazakevich
 i want to connect my freebsd system to modem and configure it via my
 freebsd. i thought that i should change /etc/ttys file to set speed and
 other configuration. in order to check if i am right or not, i comment ttyu
 line in ttys file and expect the modem got disconnected but the modem still
 works and can access to it.

 i googled and found that there are three files in /etc that we can edit
 them to configure our devices: /etc/ttys, /etc/gettytab and
 /etc/rc.d/serial.sh. moreover we can edit init file for each device in /dev
 to set default speed and other configuration by stty command.

 now i am confused and don't know which file i should edit to set speed and
 flow control and other setting to have a connection to my modem. i mean
 from which file i can configure my connection? i know it's too easy but
 please clear it for me.

 yours,
 sam
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org


Hello,

Modem configuration itself has nothing to do with getty and ttys
(terminals).
You only need them if you want to configure modem for plain dial-in: i.e.
somebody dials you, FreeBSD starts getty on this line, and lets your peer
enter your system.

If you want your peer to use PPP (to use IP over it, for example) you would
not need to configure ttys also.

And you do not need it  if you want to dial-up somewhere too.

What exactly you want to do?

Ilya.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: set connection to a modem

2012-11-28 Thread Polytropon
On Wed, 28 Nov 2012 13:44:18 +0330, s m wrote:
 hello guys,
 
 i want to connect my freebsd system to modem and configure it via my
 freebsd.

For doing _what_ exactly? I ask because depending on your
goal there might be different approaches neccessary:

a) dial out to connect to the Internet
b) dial out to dial in to something else (e. g. shell access)
c) dial out to send a fax
d) dial out to make annoying phone calls :-)
e) dial in so people can dial your system and log in
f) dial in so people can send you fax
g) dial in so you can control something using DTMF
...

There are many possibilities, each requiring a different
thing to do on FreeBSD (because they are obviously different(.

And of course: Are you talking about a real modem (external
serial modem), some modem card (often dysfunctional WinModem),
or a USB modem? Brand and model?



 i thought that i should change /etc/ttys file to set speed and
 other configuration.

Wouldn't you better do this with ppp.conf? Just assuming you
want to dial _out_.



 in order to check if i am right or not, i comment ttyu
 line in ttys file and expect the modem got disconnected but the modem still
 works and can access to it.

The /etc/ttys file doesn't restrict you in controlling the
modem from your host system.



 i googled and found that there are three files in /etc that we can edit
 them to configure our devices: /etc/ttys, /etc/gettytab and
 /etc/rc.d/serial.sh. moreover we can edit init file for each device in /dev
 to set default speed and other configuration by stty command.

Also depends on _what_ you are going to do.



 now i am confused and don't know which file i should edit to set speed and
 flow control and other setting to have a connection to my modem. i mean
 from which file i can configure my connection? i know it's too easy but
 please clear it for me.

Really, I assume you're talking about dialing out with a serial
modem in order to connect to the Internet (or some other system),
and then be networked with it.

In that case you would add an entry to /etc/ppp/ppp.conf. Allow
me to provide an example that I've been using on FreeBSD 4 and 5:

# PPP Configuration File
# See /usr/share/examples/ppp/ for some examples
# $FreeBSD: src/etc/ppp/ppp.conf,v 1.8 2001/06/21 15:42:26 brian Exp $

default:
set log Phase Chat LCP IPCP CCP tun command
ident user-ppp VERSION (built COMPILATIONDATE)
set device /dev/cuaa0
set speed 115200
set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \\ AT OK-AT-OK 
ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT
set ifaddr 10.0.0.1/0 10.0.0.2/0
set timeout 180
enable dns

papchap:
 # edit the next three lines and replace the items in caps with
 # the values which have been assigned by your ISP.
set phone PHONE_NUM
set authname USERNAME
set authkey PASSWORD
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
add default HISADDR

mymodem:
set phone 01234567890
set authname myname
set authkey mypass
add default HISADDR

The example name I've chosen here is mymodem. Change it
to something meaningful. :-)

The essential authorisation data here is the phone number
of 01234567890, the username 'myname' and the password 'mypass'

Note that today it may be required to change the device name!
I haven't tried to do anything with a modem on current FreeBSD,
so I can't be more specific, sorry.

The device name /dev/cuaa0 will probably need a change. And
then set speed 115200 sets the speed you need.

If you've done everything properly, you would do something like

# ppp mymodem
ppp dial

Then the modem should dial. With close you close the connection.
There are options for /etc/rc.conf (the ppp_* variables) that
allow you to automate things, like dial on demand.





In contradiction, in /etc/ttys something like

ttyd0   /usr/libexec/getty std.9600 dialup   on  secure

would enable you a serial console access (e. g. to connect a
serial terminal to) at a speed of 9k6 (e. g. a DEC vt100). When
connected via serial cable, you would receive a login prompt.

Again, note that ttyd0 might not be valid here.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: set connection to a modem

2012-11-28 Thread s m
thanks guys for your replies,

now i understand two types of connections are available by modem, dial-in
and dial-out.
honestly, i should do it for my boss and don't know what he should want
exactly to do but i am sure that he has an external serial modem and wants
to config it by AT commands via a freebsd system; therefore i think our
connection is dial-out.

now which files i should edit? just ppp.conf? and because our modem
supports specific speed and flow control, is it necessary to set these
parameters in my freebsd? and if yes, how i can do that?  please help me to
do that

thanks

On Wed, Nov 28, 2012 at 7:35 PM, Polytropon free...@edvax.de wrote:

 On Wed, 28 Nov 2012 13:44:18 +0330, s m wrote:
  hello guys,
 
  i want to connect my freebsd system to modem and configure it via my
  freebsd.

 For doing _what_ exactly? I ask because depending on your
 goal there might be different approaches neccessary:

 a) dial out to connect to the Internet
 b) dial out to dial in to something else (e. g. shell access)
 c) dial out to send a fax
 d) dial out to make annoying phone calls :-)
 e) dial in so people can dial your system and log in
 f) dial in so people can send you fax
 g) dial in so you can control something using DTMF
 ...

 There are many possibilities, each requiring a different
 thing to do on FreeBSD (because they are obviously different(.

 And of course: Are you talking about a real modem (external
 serial modem), some modem card (often dysfunctional WinModem),
 or a USB modem? Brand and model?



  i thought that i should change /etc/ttys file to set speed and
  other configuration.

 Wouldn't you better do this with ppp.conf? Just assuming you
 want to dial _out_.



  in order to check if i am right or not, i comment ttyu
  line in ttys file and expect the modem got disconnected but the modem
 still
  works and can access to it.

 The /etc/ttys file doesn't restrict you in controlling the
 modem from your host system.



  i googled and found that there are three files in /etc that we can edit
  them to configure our devices: /etc/ttys, /etc/gettytab and
  /etc/rc.d/serial.sh. moreover we can edit init file for each device in
 /dev
  to set default speed and other configuration by stty command.

 Also depends on _what_ you are going to do.



  now i am confused and don't know which file i should edit to set speed
 and
  flow control and other setting to have a connection to my modem. i mean
  from which file i can configure my connection? i know it's too easy but
  please clear it for me.

 Really, I assume you're talking about dialing out with a serial
 modem in order to connect to the Internet (or some other system),
 and then be networked with it.

 In that case you would add an entry to /etc/ppp/ppp.conf. Allow
 me to provide an example that I've been using on FreeBSD 4 and 5:

 # PPP Configuration File
 # See /usr/share/examples/ppp/ for some examples
 # $FreeBSD: src/etc/ppp/ppp.conf,v 1.8 2001/06/21 15:42:26 brian Exp $

 default:
 set log Phase Chat LCP IPCP CCP tun command
 ident user-ppp VERSION (built COMPILATIONDATE)
 set device /dev/cuaa0
 set speed 115200
 set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \\ AT OK-AT-OK
 ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT
 set ifaddr 10.0.0.1/0 10.0.0.2/0
 set timeout 180
 enable dns

 papchap:
  # edit the next three lines and replace the items in caps with
  # the values which have been assigned by your ISP.
 set phone PHONE_NUM
 set authname USERNAME
 set authkey PASSWORD
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 add default HISADDR

 mymodem:
 set phone 01234567890
 set authname myname
 set authkey mypass
 add default HISADDR

 The example name I've chosen here is mymodem. Change it
 to something meaningful. :-)

 The essential authorisation data here is the phone number
 of 01234567890, the username 'myname' and the password 'mypass'

 Note that today it may be required to change the device name!
 I haven't tried to do anything with a modem on current FreeBSD,
 so I can't be more specific, sorry.

 The device name /dev/cuaa0 will probably need a change. And
 then set speed 115200 sets the speed you need.

 If you've done everything properly, you would do something like

 # ppp mymodem
 ppp dial

 Then the modem should dial. With close you close the connection.
 There are options for /etc/rc.conf (the ppp_* variables) that
 allow you to automate things, like dial on demand.





 In contradiction, in /etc/ttys something like

 ttyd0   /usr/libexec/getty std.9600 dialup   on  secure

 would enable you a serial console access (e. g. to connect a
 serial terminal to) at a speed of 9k6 (e. g. a DEC vt100). When
 connected via serial cable, you would receive a login prompt.

 Again, note that ttyd0 might not be valid here.





 --
 Polytropon
 Magdeburg,