Re: RS232 GSM Modem
2010/4/28 Dan Williams d...@redhat.com On Wed, 2010-04-28 at 09:37 +0200, toabctl wrote: 1) How does network-manager detect that the modem is connected? Or how can i tell networkmanager on which port the modem is attached? I use a rs232-usb adapter so the port is /dev/ttyUSB0 . ModemManager uses udev for device detection. It listens for udev events (which you can also listen for with udevmonitor) and when it receives a notification of a new serial port, it will inspect that port and attempt to probe it. How does ModemManager probe the port? I want to use modem manager also with a rs232 device and there are no uevents because rs232 has no hotplug. but i could emit a uevent by hand. 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 ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] add vid/pid for Dell 5541 and 5542
Hi! Two new vid/pids to the mbm udev rules file. Regards Torgny Johansson diff --git a/plugins/77-mm-ericsson-mbm.rules b/plugins/77-mm-ericsson-mbm.rules index e64baa6..8804036 100644 --- a/plugins/77-mm-ericsson-mbm.rules +++ b/plugins/77-mm-ericsson-mbm.rules @@ -36,6 +36,10 @@ ATTRS{idVendor}==413c, ATTRS{idProduct}==8147, ENV{ID_MM_ERICSSON_MBM}=1 ATTRS{idVendor}==413c, ATTRS{idProduct}==8183, ENV{ID_MM_ERICSSON_MBM}=1 ATTRS{idVendor}==413c, ATTRS{idProduct}==8184, ENV{ID_MM_ERICSSON_MBM}=1 +# Dell F3307 +ATTRS{idVendor}==413c, ATTRS{idProduct}==818b, ENV{ID_MM_ERICSSON_MBM}=1 +ATTRS{idVendor}==413c, ATTRS{idProduct}==818c, ENV{ID_MM_ERICSSON_MBM}=1 + # Toshiba ATTRS{idVendor}==0930, ATTRS{idProduct}==130b, ENV{ID_MM_ERICSSON_MBM}=1 ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Alcatel x060s - incorrect port
Hi, In udevadm DB, ttyUSB1 has ID_MM_LONGCHEER_PORT_TYPE_AUX=1 flag, and ttyUSB2 has ID_MM_LONGCHEER_PORT_TYPE_MODEM=1 flag. I've changed ATTRS{idProduct}==, ENV{.MM_USBIFNUM}==03 in 77-mm-longcheer-port-types.rules to be both aux and modem and it worked! Now NM could connect OK. While playing with it I found that NM fails to find modem if Ethernet connection is active: # tail -f /var/log/syslog ... Apr 29 13:18:07 andrey-laptop NetworkManager: Could not get modem driver: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. If I detach Ethernet before plugging modem in everything works fine. It's a minor issue for me because I do not intend to use Ethernet and 3G connections simultaneously. See udevadm output below. # udevadm info --export-db ... P: /devices/pci:00/:00:1a.7/usb1/1-1/1-1:1.1/ttyUSB1 E: UDEV_LOG=3 E: DEVPATH=/devices/pci:00/:00:1a.7/usb1/1-1/1-1:1.1/ttyUSB1 E: DRIVER=option1 E: SUBSYSTEM=usb-serial P: /devices/pci:00/:00:1a.7/usb1/1-1/1-1:1.1/ttyUSB1/tty/ttyUSB1 N: ttyUSB1 S: char/188:1 S: serial/by-path/pci-:00:1a.7-usb-0:1:1.1-port0 S: serial/by-id/usb-USBModem_USBModem_Configuration_1234567890ABCDEF-if01-port0 E: UDEV_LOG=3 E: DEVPATH=/devices/pci:00/:00:1a.7/usb1/1-1/1-1:1.1/ttyUSB1/tty/ttyUSB1 E: MAJOR=188 E: MINOR=1 E: DEVNAME=/dev/ttyUSB1 E: SUBSYSTEM=tty E: ID_PORT=0 E: ID_PATH=pci-:00:1a.7-usb-0:1:1.1 E: ID_VENDOR=USBModem E: ID_VENDOR_ENC=USBModem E: ID_VENDOR_ID=1bbb E: ID_MODEL=USBModem_Configuration E: ID_MODEL_ENC=USBModem\x20Configuration E: ID_MODEL_ID= E: ID_REVISION= E: ID_SERIAL=USBModem_USBModem_Configuration_1234567890ABCDEF E: ID_SERIAL_SHORT=1234567890ABCDEF E: ID_TYPE=generic E: ID_BUS=usb E: ID_USB_INTERFACES=:ff:080650: E: ID_USB_INTERFACE_NUM=01 E: ID_USB_DRIVER=option E: ID_IFACE=01 E: ID_VENDOR_FROM_DATABASE=T A Mobile Phones E: ID_MM_LONGCHEER_PORT_TYPE_AUX=1 E: ID_MM_LONGCHEER_TAGGED=1 E: DEVLINKS=/dev/char/188:1 /dev/serial/by-path/pci-:00:1a.7-usb-0:1:1.1-port0 /dev/serial/by-id/usb-USBModem_USBModem_Configuration_1234567890ABCDEF-if01-port0 ... Thanks! Dan Williams wrote: On Wed, 2010-04-28 at 08:15 +0400, Andrey Alakozov wrote: Dan, I use NM version 0.8 that comes with kubuntu lucid. ATTRS{idProduct}==, ENV{.MM_USBIFNUM}==03, ENV{ID_MM_LONGCHEER_PORT_TYPE_MODEM}=1 is presented in 77-mm-longcheer-port-types.rules, but NM still tries to use ttyUSB1 and fails with 'Did not receive a reply' error. Can you run udevadm info --export-db and then look for 'ttyUSB1' and see if the udev rules actually got applied? Dan Thanks. Dan Williams wrote: On Tue, 2010-04-27 at 19:41 +0400, Andrey Alakozov wrote: Hello, I have just the same problem as described here - http://www.mail-archive.com/networkmanager-list@gnome.org/msg14493.html with Alcatel x060s: three devices (ttyUSB[0-2]), only ttyUSB2 works OK If I do link -f ttyUSB2 ttyUSB0 ; link -f ttyUSB2 ttyUSB0 - everything works fine. # lsusb ... Bus 001 Device 014: ID 1bbb: T A Mobile Phones ... # cd -P /sys/class/tty/ttyUSB2 # pwd /sys/devices/pci:00/:00:1a.7/usb1/1-1/1-1.3/1-1.3:1.3/ttyUSB2/tty/ttyUSB2 How to update 77-mm-zte-port-types.rules ? You don't want ZTE rules, you want 77-mm-longcheer-port-types.rules. And I'm pretty sure your device is already listed there. What version of ModemManager are you running? http://cgit.freedesktop.org/ModemManager/ModemManager/tree/plugins/77-mm-longcheer-port-types.rules See the bottom of that file for your device: ATTRS{idProduct}==, ENV{.MM_USBIFNUM}==03, ENV{ID_MM_LONGCHEER_PORT_TYPE_MODEM}=1 Dan -- Andrey ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] editor: mark two tooltips as translatable
--- src/connection-editor/ce-page-wireless.glade |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connection-editor/ce-page-wireless.glade b/src/connection-editor/ce-page-wireless.glade index 1cd9f3f..14cf313 100644 --- a/src/connection-editor/ce-page-wireless.glade +++ b/src/connection-editor/ce-page-wireless.glade @@ -68,7 +68,7 @@ widget class=GtkEntry id=wireless_mac property name=visibleTrue/property property name=can_focusTrue/property -property name=tooltipThis option locks this connection to the network device specified by the MAC address entered here. Example: 00:11:22:33:44:55/property +property name=tooltip translatable=yesThis option locks this connection to the network device specified by the MAC address entered here. Example: 00:11:22:33:44:55/property /widget packing property name=left_attach1/property @@ -201,7 +201,7 @@ widget class=GtkEntry id=wireless_bssid property name=visibleTrue/property property name=can_focusTrue/property -property name=tooltipThis option locks this connection to the wireless access point (AP) specified by the BSSID entered here. Example: 00:11:22:33:44:55/property +property name=tooltip translatable=yesThis option locks this connection to the wireless access point (AP) specified by the BSSID entered here. Example: 00:11:22:33:44:55/property /widget packing property name=left_attach1/property -- 1.7.0.4 ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] fix self-inheritance of NMDHCPDhcpcd
From: Mikhail Efremov s...@altlinux.org --- src/dhcp-manager/nm-dhcp-dhcpcd.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c index 56b7481..7169493 100644 --- a/src/dhcp-manager/nm-dhcp-dhcpcd.c +++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c @@ -36,7 +36,7 @@ #include nm-utils.h #include nm-logging.h -G_DEFINE_TYPE (NMDHCPDhcpcd, nm_dhcp_dhcpcd, NM_TYPE_DHCP_DHCPCD) +G_DEFINE_TYPE (NMDHCPDhcpcd, nm_dhcp_dhcpcd, NM_TYPE_DHCP_CLIENT) #define NM_DHCP_DHCPCD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_DHCPCD, NMDHCPDhcpcdPrivate)) -- 1.7.0.4 ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Alcatel x060s - incorrect port
On Thu, 2010-04-29 at 14:53 +0400, Andrey Alakozov wrote: Hi, In udevadm DB, ttyUSB1 has ID_MM_LONGCHEER_PORT_TYPE_AUX=1 flag, and ttyUSB2 has ID_MM_LONGCHEER_PORT_TYPE_MODEM=1 flag. I've changed ATTRS{idProduct}==, ENV{.MM_USBIFNUM}==03 in 77-mm-longcheer-port-types.rules to be both aux and modem and it worked! Now NM could connect OK. Is there any chance I can get the Windows .INF files from you off the device's fake driver CD? In a pinch, feel free to just mail me the entire contents of the fake driver CD or post it somewhere I can grab it. This will clear up the issue 100%. I have the driver for the X020s, but not the X060s. While playing with it I found that NM fails to find modem if Ethernet connection is active: # tail -f /var/log/syslog ... Apr 29 13:18:07 andrey-laptop NetworkManager: Could not get modem driver: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. Quite interesting; that indicates a problem with ModemManager. Any chance you can grab some modem-manager debugging for me? http://live.gnome.org/NetworkManager/Debugging under the Debugging NetworkManager 0.8.x 3G connections section. And lets see what's going on there. If I detach Ethernet before plugging modem in everything works fine. It's a minor issue for me because I do not intend to use Ethernet and 3G connections simultaneously. That's certainly a bug. Can you grab some of NM's syslog output for me? See the Log locations on the Debugging link I pasted above and lets see what NM's doing. See udevadm output below. Ok, the output looks good and we've confirmed the rules are applied. Apparently they are just wrong :) Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
RE: Confusing about DBus API specification
On Thu, 2010-04-29 at 21:33 -0700, Nguyen Canh Toan wrote: Dear Dan, I do understand these fundamental concepts. Thank for your useful tutorial anyway. I think my problem is I do not understand object as well as interface hierarchy exposed by NetworkManager DBus service. According to API spec here (http://projects.gnome.org/NetworkManager/developers/spec-07.html#org.freede sktop.NetworkManager) and (http://live.gnome.org/NetworkManager/SystemSetting). I understand it as below: 1. Service DBus named org.freedesktop.NetworkManagerSystemSetting and org.freedesktop.NetworkManagerUserSetting is one which I need to connect to inorder to get connection configuration. Right, these are the service names/bus names that you need to talk to. 2. Get org.freedesktop.NetworkManagerSettings interface of service proxy Correct; *both* services implement this common interface, since they provide essentially the same information. This way you only write the code once, and you can talk to both services easily. 3. Invoke ListConnection() on returned interface. I think you mean ListConnections(), but yes. It seems that your API spec isn't very clear so newcomers, like me, get confused when doing with this. Yeah, I think what would be helpful is a general overview in the spec or such about how the pieces fit together, possibly with a diagram and some code examples. I've done a bit of that and I'm about to post something to my blog, which we can then rework into some documentation. There are various pages around that explain things, but mostly general overviews and concepts and not really with code examples. Here's one I whipped up yesterday: http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/list-connections.py There's a lot of improvement possible here, especially with examples. Please instruct me how to get used particularly this service. Or please make your spec more clearly. I shall try. Contributions and constructive criticism welcome, like you've done above by pointing out that it's not clear how to talk to the settings services. Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] add vid/pid for Dell 5541 and 5542
On Thu, 2010-04-29 at 10:23 +0200, Torgny Johansson wrote: Hi! Two new vid/pids to the mbm udev rules file. Pushed, thanks! Regards Torgny Johansson diff --git a/plugins/77-mm-ericsson-mbm.rules b/plugins/77-mm-ericsson-mbm.rules index e64baa6..8804036 100644 --- a/plugins/77-mm-ericsson-mbm.rules +++ b/plugins/77-mm-ericsson-mbm.rules @@ -36,6 +36,10 @@ ATTRS{idVendor}==413c, ATTRS{idProduct}==8147, ENV{ID_MM_ERICSSON_MBM}=1 ATTRS{idVendor}==413c, ATTRS{idProduct}==8183, ENV{ID_MM_ERICSSON_MBM}=1 ATTRS{idVendor}==413c, ATTRS{idProduct}==8184, ENV{ID_MM_ERICSSON_MBM}=1 +# Dell F3307 +ATTRS{idVendor}==413c, ATTRS{idProduct}==818b, ENV{ID_MM_ERICSSON_MBM}=1 +ATTRS{idVendor}==413c, ATTRS{idProduct}==818c, ENV{ID_MM_ERICSSON_MBM}=1 + # Toshiba ATTRS{idVendor}==0930, ATTRS{idProduct}==130b, ENV{ID_MM_ERICSSON_MBM}=1 ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] fix self-inheritance of NMDHCPDhcpcd
On Thu, 2010-04-29 at 20:42 +0400, Mikhail Efremov wrote: From: Mikhail Efremov s...@altlinux.org Oops, good catch :) Pushed. Dan --- src/dhcp-manager/nm-dhcp-dhcpcd.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c index 56b7481..7169493 100644 --- a/src/dhcp-manager/nm-dhcp-dhcpcd.c +++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c @@ -36,7 +36,7 @@ #include nm-utils.h #include nm-logging.h -G_DEFINE_TYPE (NMDHCPDhcpcd, nm_dhcp_dhcpcd, NM_TYPE_DHCP_DHCPCD) +G_DEFINE_TYPE (NMDHCPDhcpcd, nm_dhcp_dhcpcd, NM_TYPE_DHCP_CLIENT) #define NM_DHCP_DHCPCD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DHCP_DHCPCD, NMDHCPDhcpcdPrivate)) ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: RS232 GSM Modem
On Thu, 2010-04-29 at 09:53 +0200, toabctl wrote: 2010/4/28 Dan Williams d...@redhat.com On Wed, 2010-04-28 at 09:37 +0200, toabctl wrote: 1) How does network-manager detect that the modem is connected? Or how can i tell networkmanager on which port the modem is attached? I use a rs232-usb adapter so the port is /dev/ttyUSB0 . ModemManager uses udev for device detection. It listens for udev events (which you can also listen for with udevmonitor) and when it receives a notification of a new serial port, it will inspect that port and attempt to probe it. How does ModemManager probe the port? I want to use modem manager also with a rs232 device and there are no uevents because rs232 has no hotplug. but i could emit a uevent by hand. At the moment we don't probe platform devices for a few reasons, one that (a) the code isn't there, and (b) older devices like those connected to platform serial ports on normal PCs often get upset precisely because they are older and either aren't modems, or aren't standards compliant in any way. But check out this commit: commit 1864d8da0766e615c37a13f30bcacb72d381aa69 Author: Dan Williams d...@redhat.com Date: Thu Apr 29 12:17:56 2010 -0700 core: add platform device support and whitelist and see if that works for you. It uses a whitelist for platform drivers. Let me know! 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 ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list