Power & Source of Big Ideas

[NanoPi Neo Core] ubuntu build can't do broadcast to outside

Moderators: chensy, FATechsupport

Recently, I got a piece of hardware, NonoPi Neo Core. I use ubuntu to install gcc and upload a broadcasting sample code and try to do broadcast to same network class. Here is my network topology.

D-Link Router(A) 192.168.1.1 (255.255.255.0)
||=== NonoPi NeoCore(B) 192.168.1.161 (255.255.255.0) client.c installed
||=== Virtualbox (ubuntu16.04 (C)) 192.168.1.20 (255.255.255.0) client.c installed
||=== PC install ubuntu16.04(D) 192.168.1.21 (255.255.255.0) server.c, client.c installed
||=== PC install windows10(E) 192.168.1.12 (255.255.255.0) wireshark installed

B,C,D,E are in same network. I upload a broadcasting program client.c file to those computers and also compile that.

here is the client testing program location.
https://forums.freebsd.org/threads/socket-programming-in-c-language-unable-to-broadcast-a-message-from-freebsd-client-to-linux-server-broadcast-ip-should-be-255-255-255-255.67722/

I did not use this server.c program, instead, my Server program on PC(D), join broadcast group, is listening to 239.143.143.143:4950. Also wireshark filter on PC(E) listening to the same address. { ip.addr=192.168.1.161 && udp }

Strange thing happened. I use this client.c program inside C, D host, it works as expected, my server program can receive broadcast message, wireshark also got broadcast message. Inside (B) NeoCore, the screen also shows "sent 10 bytes to 239.143.143.143", but wireshark in (E) does not see anything. Server program on PC(D) does not see anything also. Weird thing is that, exchange position from server.c and client.c, you can see my server.c on NeoCore(B) received broadcast message from (C), (D) client.c, wireshark on (E) also receive.

I start to check routing table on B, everything is fine, nothing wield.
======================================

Code: Select all

root@NanoPi-NEO-Core:/home/neo# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0


I open tcpdump on NeoCore(B), I can see client.c program tried to send out broadcast message, but was dropped. WHY ??


Code: Select all

That means NonoPi Neo Core ubuntu 16.04 cannot do bi-direction broadcast, but in a nornal PC version ubuntu 16.04, it does bi-direction broadcast. What happen to NEO CORE ??


Can anyone help me here? please post your idea or solution here or contact me directly.

Code: Select all

iamneo2416@gmail.com


many thanks ~
-neo
Don't know if this problem is solved, but worth trying - Armbian will bring you much further. Also further than Ubuntu 16.04 on your PC in term of hw support.

https://www.armbian.com/download/?tx_maker=friendlyelec

Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 10 guests