AW: AW: Multicast over USB?
Over LAN it works. I bind the socket to all the interfaces. The relevant code is attached. Bot_config is the client, that wants to join the Multicast group of the server. As I said, this usually works in a not routed network, like via WLAN, its just USB that sucks. Von: Sebastian Billaudelle An: List for Openmoko community discussion Gesendet: Sonntag, den 5. April 2009, 15:44:33 Uhr Betreff: Re: AW: Multicast over USB? Hm. Would you please paste the code somewhere? Did you bind it to the right interface(s)? Am Sonntag, den 05.04.2009, 09:17 + schrieb hab keen oh ne: > Corrected Multivast to Multicast^^ > Well, Multicast seems to be running on the usb network devices > Here the output on the FR: > > usb0 Link encap:Ethernet HWaddr BE:23:B2:E6:9C:21 > inet addr:192.168.0.202 Bcast:192.168.0.255 > Mask:255.255.255.0 > inet6 addr: fe80::bc23:b2ff:fee6:9c21/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:137 errors:0 dropped:0 overruns:0 frame:0 > TX packets:118 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:16976 (16.5 KiB) TX bytes:14411 (14.0 KiB) > > and here on my host(unfortunately in German): > > usb0 Link encap:Ethernet Hardware Adresse 92:3C:A3:BC:33:8B > inet Adresse:192.168.0.200 Bcast:192.168.0.255 > Maske:255.255.255.0 > inet6 Adresse: fe80::903c:a3ff:febc:338b/64 > Gültigkeitsbereich:Verbindung > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:78 errors:0 dropped:0 overruns:0 frame:0 > TX packets:90 errors:0 dropped:0 overruns:0 carrier:0 > Kollisionen:0 Sendewarteschlangenlänge:1000 > RX bytes:8681 (8.4 KiB) TX bytes:13249 (12.9 KiB) > > > > __ > Von: Sebastian Billaudelle > An: List for Openmoko community discussion > > Gesendet: Sonntag, den 5. April 2009, 08:26:10 Uhr > Betreff: Re: Multivast over USB? > > Am Samstag, den 04.04.2009, 16:06 + schrieb hab keen oh ne: > > Hi, > > Im currently working with multicast for my internship at a > university. > > Sounds interesting:) > > > A universitie's guy said, that probably Multicast isnt supported > over > > USB, is that right? > > Would you please attach the output of "ifconfig" on your Neo and PC? > On some interfaces MCast is disabled by default. You can change this > by > adding a route. > > Cheers, > Sebastian > > > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community /// Funktionen für die Klasse zur Kommunikation mit dem Kontroll-Programm. #include "bot_server.h" #include "bot_values.h" #include #include #include #include #include #include #include #include #include // Erstellt ein Socket, bindet es an einen Port und lauscht auf einkommende Verbindungen int bot_server::open_port() { // Socket erstellen server_socket = socket(AF_INET, SOCK_STREAM, 0); if(server_socket == -1) { return -1; } // Socket an einen Port binden sockaddr_in local_addr; local_addr.sin_family = AF_INET; local_addr.sin_addr.s_addr = INADDR_ANY; local_addr.sin_port = htons(CONTROL_SERVER_PORT); if(bind(server_socket, (sockaddr *)&local_addr, sizeof(local_addr))) { return -1; } // Am Port lauschen if(listen(server_socket, 2)) { return -1; } // Damit diese Funktion nicht mehr aufgerufen wird is_listening = true; return 0; } // Nimmt eine einkommende Verbindung entgegen (maximal 1 Steuer-PC) int bot_server::get_connected() { socket_fd = accept(server_socket, NULL, 0); if(socket_fd == -1) { return -1; } is_connected = true; return 0; } // Schickt Multicast-Pakete mit der "I'm a client" Nachricht ins Netzwerk int bot_server::make_noise() { int socket_descriptor; sockaddr_in address; int bc_msg = MSG_IMACLIENT;// Da ist die Nachricht. socket_descriptor = socket (AF_INET, SOCK_DGRAM, 0); if (socket_descriptor == -1) { return -1; } // Ziel des Pakets angeben memset (&address, 0, sizeof (address)); address.sin_family = AF_INET; address.sin_addr.s_addr = inet_add
Re: AW: Multicast over USB?
Hm. Would you please paste the code somewhere? Did you bind it to the right interface(s)? Am Sonntag, den 05.04.2009, 09:17 + schrieb hab keen oh ne: > Corrected Multivast to Multicast^^ > Well, Multicast seems to be running on the usb network devices > Here the output on the FR: > > usb0 Link encap:Ethernet HWaddr BE:23:B2:E6:9C:21 > inet addr:192.168.0.202 Bcast:192.168.0.255 > Mask:255.255.255.0 > inet6 addr: fe80::bc23:b2ff:fee6:9c21/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:137 errors:0 dropped:0 overruns:0 frame:0 > TX packets:118 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:16976 (16.5 KiB) TX bytes:14411 (14.0 KiB) > > and here on my host(unfortunately in German): > > usb0 Link encap:Ethernet Hardware Adresse 92:3C:A3:BC:33:8B > inet Adresse:192.168.0.200 Bcast:192.168.0.255 > Maske:255.255.255.0 > inet6 Adresse: fe80::903c:a3ff:febc:338b/64 > Gültigkeitsbereich:Verbindung > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:78 errors:0 dropped:0 overruns:0 frame:0 > TX packets:90 errors:0 dropped:0 overruns:0 carrier:0 > Kollisionen:0 Sendewarteschlangenlänge:1000 > RX bytes:8681 (8.4 KiB) TX bytes:13249 (12.9 KiB) > > > > __ > Von: Sebastian Billaudelle > An: List for Openmoko community discussion > > Gesendet: Sonntag, den 5. April 2009, 08:26:10 Uhr > Betreff: Re: Multivast over USB? > > Am Samstag, den 04.04.2009, 16:06 + schrieb hab keen oh ne: > > Hi, > > Im currently working with multicast for my internship at a > university. > > Sounds interesting:) > > > A universitie's guy said, that probably Multicast isnt supported > over > > USB, is that right? > > Would you please attach the output of "ifconfig" on your Neo and PC? > On some interfaces MCast is disabled by default. You can change this > by > adding a route. > > Cheers, > Sebastian > > > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
AW: Multicast over USB?
Corrected Multivast to Multicast^^ Well, Multicast seems to be running on the usb network devices Here the output on the FR: usb0 Link encap:Ethernet HWaddr BE:23:B2:E6:9C:21 inet addr:192.168.0.202 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::bc23:b2ff:fee6:9c21/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:137 errors:0 dropped:0 overruns:0 frame:0 TX packets:118 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16976 (16.5 KiB) TX bytes:14411 (14.0 KiB) and here on my host(unfortunately in German): usb0 Link encap:Ethernet Hardware Adresse 92:3C:A3:BC:33:8B inet Adresse:192.168.0.200 Bcast:192.168.0.255 Maske:255.255.255.0 inet6 Adresse: fe80::903c:a3ff:febc:338b/64 Gültigkeitsbereich:Verbindung UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:78 errors:0 dropped:0 overruns:0 frame:0 TX packets:90 errors:0 dropped:0 overruns:0 carrier:0 Kollisionen:0 Sendewarteschlangenlänge:1000 RX bytes:8681 (8.4 KiB) TX bytes:13249 (12.9 KiB) Von: Sebastian Billaudelle An: List for Openmoko community discussion Gesendet: Sonntag, den 5. April 2009, 08:26:10 Uhr Betreff: Re: Multivast over USB? Am Samstag, den 04.04.2009, 16:06 + schrieb hab keen oh ne: > Hi, > Im currently working with multicast for my internship at a university. Sounds interesting:) > A universitie's guy said, that probably Multicast isnt supported over > USB, is that right? Would you please attach the output of "ifconfig" on your Neo and PC? On some interfaces MCast is disabled by default. You can change this by adding a route. Cheers, Sebastian ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community