Hi, after some investigation, the problem is that my interfaces eth0/lan1/lan2 share the same adress MAC (as they all depend on the same physical ethernet controller). So Connman only create one service, and when i set lan1 down, then up, as services is allready existing, no more configuration is done during the up step, and there is no dhcp launch.
So i've made a little modification in plugin/ethernet.c (inspired from the vlan management). The evolution consist in checking if the interface use the dsa driver, and in this case, add to service name the switch port number (as connman add the vlanid to the service name). I'm currently testing it, and for now it's working. Regards Laurent On Mon, Sep 7, 2015 at 3:04 PM, laurent vaudoit <[email protected]> wrote: > Hi, > > On Mon, Sep 7, 2015 at 2:46 PM, Patrik Flykt <[email protected] > > wrote: > >> >> Hi, >> >> On Mon, 2015-09-07 at 10:34 +0200, laurent vaudoit wrote: >> >> > I've made some more debug, and now, i'm able to have lan1/lan2 up after >> > suspend/resume procedure. >> >> Sharing the solution with us would help quite a lot. What did you do to >> have lan1 and lan2 up after resume? >> > > In fact, before entering in suspend mode, our software was doing an > ifconfig lan1/2 down, and i was not aware of this. > So, behaviour was "normal". > If in our software, we suppress this step, interface are up after resume. > >> >> > I just have one more problem. >> > After resume, lan1 is shown as UP (checked by ip link show), but have >> no IP >> > adress. >> > After boot, lan1 get an IP through DHCP. >> > after suspend/resume, i do not get an IP (if i launch udhcpc command, >> ip is >> > get and everything works). >> >> If you leave udhcpc installed and running as well, nothing will work >> reliably. For the above I assume you started udhcpc manually just to >> check that the connection works. >> > > yes, udhcpc command is just used for checking that connection available. > >> >> Please give more information on what you were seeing and which actions >> you took. Starting for example with the output of 'ip link show'. And >> also explain what other networking or switch software you have enabled >> and/or running. >> > > after boot, ip link show give this: > > ifconfig lan1 > lan1 Link encap:Ethernet HWaddr 00:10:02:5F:00:46 > inet addr:172.24.239.127 Bcast:172.24.255.255 Mask:255.255.0.0 > inet6 addr: fe80::210:2ff:fe5f:46/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:327 errors:0 dropped:108 overruns:0 frame:0 > TX packets:25 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:31029 (30.3 KiB) TX bytes:3421 (3.3 KiB) > > root@gad-pcm-mx6solo-dev:~# ip link show > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode > DEFAULT > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > 2: can0: <NOARP> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10 > link/can > j1939 off > 3: can1: <NOARP> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10 > link/can > j1939 off > 4: can2: <NOARP> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10 > link/can > j1939 off > 5: can3: <NOARP> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10 > link/can > j1939 off > 6: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc > pfifo_fast state UP mode DEFAULT qlen 1000 > link/ether 00:10:02:5f:00:46 brd ff:ff:ff:ff:ff:ff > 7: lan1@eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc > noqueue state UP mode DEFAULT > link/ether 00:10:02:5f:00:46 brd ff:ff:ff:ff:ff:ff > 8: lan2@eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc > noqueue state UP mode DEFAULT > link/ether 00:10:02:5f:00:46 brd ff:ff:ff:ff:ff:ff > > after ifconfig lan1 down /up (i have the same problem with this > manipulation as with suspend/resume) > > > ifconfig lan1 down > connmand[800]: lan1 {RX} 3656 packets 324125 bytes > connmand[800]: lan1 {TX} 25 packets 3421 bytes > connmand[800]: lan1 {update} flags 36866 <DOWN> > connmand[800]: lan1 {newlink} index 7 address 00:10:02:5F:00:46 mtu 1500 > connmand[800]: lan1 {newlink} indehrtimer: interrupt took 13334 ns > x 7 operstate 2 <DOWN> > connmand[800]: Failed to connect to serveIPv6: ADDRCONF(NETDEV_UP): lan1: > link is not ready > r 172.22.200.200 > connmand[800]: lan1 {del} route fe80:: gw :: scope 0 <UNIVERSE> > connmand[800]: lan1 {del} route ff00:: gw :: scope 0 <UNIVERSE> > connmand[800]: lan1 {del} address 172.24.239.127/16 label lan1 > root@gad-pcm-mx6solo-dev:~# ifconfig lan1 downdsa dsa.26 lan1: link down > > root@gad-pcm-mx6solo-dev:~# > root@gad-pcm-mx6solo-dev:~# ifconfig lan1 up > connmand[800]: lan1 {RX} 4235 packets 368693 bytes > connmand[800]IPv6: ADDRCONF(NETDEV_UP): lan1: link is not ready > : lan1 {TX} 25 packets 3421 bytes > connmand[800]: lan1 {update} flags 36867 <UP> > connmand[800]: lan1 {newlink} index 7 address 00:10:02:5F:00:46 mtu 1500 > connmand[800]: lan1 {newlink} index 7 operstate 3 <LOWER-LAYER-DOWN> > root@gad-pcm-mx6solo-dev:~# dsa dsa.26 lan1: link up, 100 Mb/s, full > duplex > IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready > connmand[800]: lan1 {add} route ff00:: gw :: scope 0 <UNIVERSE> > connmand[800]: lan1 {add} route fe80:: gw :: scope 0 <UNIVERSE> > connmand[800]: lan1 {RX} 4238 packets 368903 bytes > connmand[800]: lan1 {TX} 25 packets 3421 bytes > connmand[800]: lan1 {update} flags 102467 <UP,RUNNING,LOWER_UP> > connmand[800]: lan1 {newlink} index 7 address 00:10:02:5F:00:46 mtu 1500 > connmand[800]: lan1 {newlink} index 7 operstate 6 <UP> > > root@gad-pcm-mx6solo-dev:~# > root@gad-pcm-mx6solo-dev:~# ifconfig lan1 > lan1 Link encap:Ethernet HWaddr 00:10:02:5F:00:46 > inet6 addr: fe80::210:2ff:fe5f:46/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:4434 errors:0 dropped:1236 overruns:0 frame:0 > TX packets:30 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:386168 (377.1 KiB) TX bytes:3819 (3.7 KiB) > > root@gad-pcm-mx6solo-dev:~# ip link show > 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode > DEFAULT > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > 2: can0: <NOARP> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10 > link/can > j1939 off > 3: can1: <NOARP> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10 > link/can > j1939 off > 4: can2: <NOARP> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10 > link/can > j1939 off > 5: can3: <NOARP> mtu 16 qdisc noop state DOWN mode DEFAULT qlen 10 > link/can > j1939 off > 6: eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc > pfifo_fast state UP mode DEFAULT qlen 1000 > link/ether 00:10:02:5f:00:46 brd ff:ff:ff:ff:ff:ff > 7: lan1@eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc > noqueue state UP mode DEFAULT > link/ether 00:10:02:5f:00:46 brd ff:ff:ff:ff:ff:ff > 8: lan2@eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc > noqueue state UP mode DEFAULT > link/ether 00:10:02:5f:00:46 brd ff:ff:ff:ff:ff:ff > > > On the board, we use iproute2 (with linux-can J1939 patch), also > avahi-daemon, and connamn (normally launch by systemd, but for test, i > launch it manually) > > thanks for your help > > >> >> Cheers, >> >> Patrik >> >> __ >> > Regards > Laurent > >> _____________________________________________ >> connman mailing list >> [email protected] >> https://lists.connman.net/mailman/listinfo/connman >> > > _______________________________________________ connman mailing list [email protected] https://lists.connman.net/mailman/listinfo/connman
