Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discoverer and Announcer do not see each other #1

Open
rmsalinas opened this issue Feb 8, 2019 · 1 comment
Open

Discoverer and Announcer do not see each other #1

rmsalinas opened this issue Feb 8, 2019 · 1 comment

Comments

@rmsalinas
Copy link

rmsalinas commented Feb 8, 2019

Hi, first of all, congrats for your nice library. I'm testing it and it works fine in most cases, but I have a special case that seems no to be working with.

See I have a laptop that is connected to inet using wifi, and to a raspberry pi by ethernet. The laptop is sharing the inet connection to the raspberry using the cable.

The raspberry has the ip 10.42.0.240 and I can connect via ssh without problems. However, theyannouncer/discoverer is not working.
Below is the ifconfig of the raspberry and laptop. Any ideas???

Thanks in advance

RASPBERRY

pi@raspberrypi:~/beschulz-asio_service_discovery-a0de229/build $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.42.0.240 netmask 255.255.255.0 broadcast 10.42.0.255
inet6 fe80::dda4:773a:eb6c:2296 prefixlen 64 scopeid 0x20
ether b8:27:eb:c2:b7:93 txqueuelen 1000 (Ethernet)
RX packets 1261 bytes 131956 (128.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1221 bytes 336069 (328.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 16 bytes 994 (994.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16 bytes 994 (994.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

LAPTOP:

salinas@salinas-Lenovo-YOGA-920-13IKB:~/Descargas/beschulz-asio_service_discovery-a0de229/build$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:93:92:0e:83 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enx00e04c6802c2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.42.0.1 netmask 255.255.255.0 broadcast 10.42.0.255
inet6 fe80::30fb:fe5f:7900:1042 prefixlen 64 scopeid 0x20
ether 00:e0:4c:68:02:c2 txqueuelen 1000 (Ethernet)
RX packets 196012 bytes 207602028 (207.6 MB)
RX errors 0 dropped 204 overruns 0 frame 0
TX packets 121396 bytes 56881595 (56.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Bucle local)
RX packets 17810 bytes 27200263 (27.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17810 bytes 27200263 (27.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp107s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.43.83 netmask 255.255.255.0 broadcast 192.168.43.255
inet6 fe80::5cb3:8fd7:5d02:d994 prefixlen 64 scopeid 0x20
ether f8:28:19:ed:db:71 txqueuelen 1000 (Ethernet)
RX packets 158311 bytes 161242732 (161.2 MB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 94157 bytes 50133022 (50.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

@beschulz
Copy link
Owner

beschulz commented Feb 8, 2019

Hi,

it has been a while since I wrote this, but I seem to remember something that might be related:
The issue here is - I believe - that the discoverer is listening only on the default network interface (i.e. the one pointed towards the interwebz). The solution would be to bind to all interfaces. But back then there was no boost way of enumerating all the network interfaces - so I did opt to not implement it.

Basically doing it like this is not enough if you host has multiple interfaces.

You could try to create the discoverer and pass the IP of your ethernet interface connected to the pi as the listen_address. Please let me know if that works. (Assuming the discoverer runs on the laptop and the announcer runs on the pi).

best,
Ben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants