Re: RS232 GSM Modem
- From: Dan Williams <dcbw redhat com>
- To: Tom <toabctl googlemail com>
- Cc: networkmanager-list gnome org
- Subject: Re: RS232 GSM Modem
- Date: Wed, 26 May 2010 02:08:41 -0700
On Wed, 2010-05-26 at 09:47 +0200, Tom wrote:
> On Thu, 2010-05-13 at 23:36 -0700, Dan Williams wrote:
> > When MM is probing the port, try
> >
> > stty -F /dev/ttyS1 -a
> >
> > and lets see what the port settings are. Does the modem require those
> > specific speed and flow control settings?
>
> Hi Dan,
>
> sorry for the late answer.
>
> Output is:
>
> root banane:~# stty -F /dev/ttyS1 -a
> speed 115200 baud; rows 0; columns 0; line = 0;
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>;
> eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt
> = ^R;
> werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 5;
> -parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
> ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon
> -ixoff
> -iuclc -ixany -imaxbel -iutf8
> -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0
> bs0 vt0 ff0
> -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
> -echoprt
> -echoctl -echoke
>
>
>
> I think the modem does not need any special flow control settings. The
> baudrate can be set with "AT+IPR=38400" (or another value like 115200).
> But eg. with minicom i can only communicate with the modem when i use
> the right baudrate. There is no autodetection or something like this.
>
> What does ModemManager? Which Baudrate will be used when ModemManager
> tries to detect the modem?
By default MM uses 57600, but this can be changed by a modem plugin,
except your device doesn't have a plugin and this sort of thing should
probably be solved in a more generic manner. Unfortunately I don't
really know if we can get any hardware IDs off your modem?
We could, for generic devices run by platform drivers attempt to do what
wvdial sort of does, which is try sending 'AT' at different speeds until
it gets an OK. Then use that speed. That might solve the problem
generically.
If you manually set the modem to 57600 and then run modem-manager, does
that work?
Dan
> Cheers,
>
> Tom
>
>
> >
> > Dan
> >
> > > ### BEGIN MINICOM ###
> > > at
> > > OK
> > > at&v
> > > ACTIVE PROFILE:
> > > E1 Q0 V1 X4 &C0 &D2 &S0 \Q0 \V1
> > > S0:000 S3:013 S4:010 S5:008 S6:000 S7:060 S8:000 S10:002 S18:000
> > > +CBST: 7,0,1
> > > +CRLP: 61,61,78,6
> > > +CR: 0
> > > +FCLASS: 0
> > > +ICF: 3
> > > +IFC: 0,0
> > > +ILRR:
> > > 0
> > > +IPR:
> > > 115200
> > > +CMEE:
> > > 0
> > > ^SCKS:
> > > 0,1
> > > ^SSET:
> > > 0
> > >
> > > OK
> > >
> > > ### END MINICOM ###
> > >
> > > Hope this helps,
> > >
> > > Cheers
> > >
> > > Tom
> > >
> > >
> > >
> > >
> > >
> > > > Cheers,
> > > >
> > > > Tom
> > > >
> > > >
> > > > Dan
> > > >
> > > >
> > > > > The information about the device ( /dev/ttyS1 ):
> > > > >
> > > > > # udevadm info --query=all -n /dev/ttyS1
> > > > > P: /devices/platform/atmel_usart.1/tty/ttyS1
> > > > > N: ttyS1
> > > > > S: char/4:65
> > > > > E: UDEV_LOG=3
> > > > > E:
> > > DEVPATH=/devices/platform/atmel_usart.1/tty/ttyS1
> > > > > E: MAJOR=4
> > > > > E: MINOR=65
> > > > > E: DEVNAME=/dev/ttyS1
> > > > > E: SUBSYSTEM=tty
> > > > > E: DEVLINKS=/dev/char/4:65
> > > > >
> > > > > # udevadm info --query=all -n /dev/ttyS1
> > > --attribute-walk
> > > > > ...
> > > > > looking at device
> > > > '/devices/platform/atmel_usart.1/tty/ttyS1':
> > > > > KERNEL=="ttyS1"
> > > > > SUBSYSTEM=="tty"
> > > > > DRIVER==""
> > > > >
> > > > > looking at parent device
> > > > '/devices/platform/atmel_usart.1':
> > > > > KERNELS=="atmel_usart.1"
> > > > > SUBSYSTEMS=="platform"
> > > > > DRIVERS=="atmel_usart"
> > > > > ATTRS{modalias}=="platform:atmel_usart"
> > > > >
> > > > > looking at parent device '/devices/platform':
> > > > > KERNELS=="platform"
> > > > > SUBSYSTEMS==""
> > > > > DRIVERS==""
> > > > >
> > > > >
> > > > > How can i use this port with ModemManager? The
> > > modem is
> > > > connected and
> > > > > AT-Commands works.
> > > > >
> > > > > There are a number of requirements of the
> > > port
> > > > though; it
> > > > > verifies that the kernel has assigned a
> > > driver name
> > > > to the
> > > > > port or one
> > > > > of the port's parents, and it attempts to
> > > grab the
> > > > port's
> > > > > physical
> > > > > device. Given that it's USB, it *should*
> > > work. But
> > > > if it
> > > > > doesn't, and
> > > > > you have a chance to grab the ModemManager
> > > source
> > > > [1], there's
> > > > > a tool
> > > > > called 'lsudev' in the test/ directory
> > > that can give
> > > > us an
> > > > > idea of the
> > > > > udev-provided information of the device.
> > > > >
> > > > > i guess 'lsudev' does the same as my 2 commands
> > > with
> > > > 'udevadm', right?
> > > > > or does 'lsudev' something more special?
> > > > >
> > > > >
> > > > > > 2) How does the connection-config looks
> > > like?
> > > > >
> > > > >
> > > > > ModemManager is just a tool to control the
> > > modem, it
> > > > doesn't
> > > > > store any
> > > > > configuration about it. The configuration
> > > is
> > > > provided by a
> > > > > program that
> > > > > tells ModemManager what to do. There are
> > > a few ways
> > > > to do
> > > > > that;
> > > > > NetworkManager provides a general modem
> > > control
> > > > solution, but
> > > > > you can
> > > > > also write your own app that uses D-Bus to
> > > tell
> > > > ModemManager
> > > > > what to do
> > > > > with the modem. See test/mm-test.py for a
> > > short
> > > > example of
> > > > > how to use
> > > > > python and D-Bus to make MM connect the
> > > modem and
> > > > get
> > > > > information out of
> > > > > it.
> > > > >
> > > > > ah. that's great. i need to control the modem over
> > > a
> > > > web-interface so
> > > > > no nm-applet available.
> > > > >
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Tom
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]