Discussion:
[zeromq-dev] No UDP broadcast message received using CZMQ zbeacon on RaspberryPi3
Rodrigo Madruga
2016-11-28 14:42:58 UTC
Permalink
Hello all,

I am developing a system that uses CZMQ's zbeacon (broadcast on UDP) for
app discovery. Beacon sender is Windows box and receiver is RaspberryPi3.

As the subject says, no message is reaching the zbeacon actor.

Using czmq3.0.2 and zmq4.1.6 built directly on pi to rule out
cross-compiling issues.

Calling just zbeacon_test() returns "OK" without assertions errors.

Broadcast messages are indeed reaching the pi, as shown by tcpdump:

***@raspberrypi:~ $ sudo tcpdump udp port 5670
tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144
bytes
13:33:56.203230 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length 22
13:34:01.072476 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length 22

The code used to test is based on zbeacon_test function:

zactor_t *listener = zactor_new (zbeacon, NULL);
assert (listener);
zsock_send (listener, "si", "CONFIGURE", 5670);
hostname = zstr_recv (listener);
assert (*hostname);
free (hostname);

zsock_send (listener, "sb", "SUBSCRIBE", "", 0);

zpoller_t *poller = zpoller_new (listener, NULL);
assert (poller);
int64_t stop_at = zclock_mono () + 10000; // wait 10 seconds
while (zclock_mono () < stop_at) {
long timeout = (long) (stop_at - zclock_mono ());
if (timeout < 0)
timeout = 0;
void *which = zpoller_wait (poller, timeout * ZMQ_POLL_MSEC);
if (which) {
char *ipaddress, *received;
zstr_recvx (which, &ipaddress, &received, NULL);
printf("From address %s:%s\n", ipaddress, received);
zstr_free (&ipaddress);
zstr_free (&received);
}
}
zpoller_destroy (&poller);

// Stop listening
zstr_sendx (listener, "UNSUBSCRIBE", NULL);

// Destroy the test nodes
zactor_destroy (&listener);

I cross-compiled a simple Qt app with a QUdpSocket (below) and the messages
were received without issues:

#include <QtNetwork/QUdpSocket>

TestUDP::TestUDP(QObject *parent) :
QObject(parent)
{
qDebug() << "Binding UDP Socket";
socket = new QUdpSocket(this);
socket->bind(QHostAddress::Any, 5670);
connect(socket, &QUdpSocket::readyRead,this, &TestUDP::readyRead);
qDebug() << "Ready Read signal connected0, waiting for broadcasts";
}

void TestUDP::readyRead(){
QByteArray buffer;
buffer.resize(socket->pendingDatagramSize());
//var to store headers from udp
QHostAddress sender;
quint16 sender_port;
socket->readDatagram(buffer.data(),buffer.size(), &sender,
&sender_port);
qDebug() << "Message from " << sender << " port " << sender_port;
qDebug() << "Msg: " << buffer;
}

Maybe the problem is at the way zbeacon is dealing with the UDP socket...

Has anyone successfully used a zbeacon on RPI3?

Thanks in advance!

Rodrigo Madruga.
Luca Boccassi
2016-11-28 14:49:57 UTC
Permalink
Hi,

There is a CZMQ 4.0.x series now, loads of changes have gone in since
3.0.2. I would recommend trying it as the first thing.

https://github.com/zeromq/czmq/releases
Post by Rodrigo Madruga
Hello all,
I am developing a system that uses CZMQ's zbeacon (broadcast on UDP) for
app discovery. Beacon sender is Windows box and receiver is RaspberryPi3.
As the subject says, no message is reaching the zbeacon actor.
Using czmq3.0.2 and zmq4.1.6 built directly on pi to rule out
cross-compiling issues.
Calling just zbeacon_test() returns "OK" without assertions errors.
tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144
bytes
13:33:56.203230 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length 22
13:34:01.072476 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length 22
zactor_t *listener = zactor_new (zbeacon, NULL);
assert (listener);
zsock_send (listener, "si", "CONFIGURE", 5670);
hostname = zstr_recv (listener);
assert (*hostname);
free (hostname);
zsock_send (listener, "sb", "SUBSCRIBE", "", 0);
zpoller_t *poller = zpoller_new (listener, NULL);
assert (poller);
int64_t stop_at = zclock_mono () + 10000; // wait 10 seconds
while (zclock_mono () < stop_at) {
long timeout = (long) (stop_at - zclock_mono ());
if (timeout < 0)
timeout = 0;
void *which = zpoller_wait (poller, timeout * ZMQ_POLL_MSEC);
if (which) {
char *ipaddress, *received;
zstr_recvx (which, &ipaddress, &received, NULL);
printf("From address %s:%s\n", ipaddress, received);
zstr_free (&ipaddress);
zstr_free (&received);
}
}
zpoller_destroy (&poller);
// Stop listening
zstr_sendx (listener, "UNSUBSCRIBE", NULL);
// Destroy the test nodes
zactor_destroy (&listener);
I cross-compiled a simple Qt app with a QUdpSocket (below) and the messages
#include <QtNetwork/QUdpSocket>
QObject(parent)
{
qDebug() << "Binding UDP Socket";
socket = new QUdpSocket(this);
socket->bind(QHostAddress::Any, 5670);
connect(socket, &QUdpSocket::readyRead,this, &TestUDP::readyRead);
qDebug() << "Ready Read signal connected0, waiting for broadcasts";
}
void TestUDP::readyRead(){
QByteArray buffer;
buffer.resize(socket->pendingDatagramSize());
//var to store headers from udp
QHostAddress sender;
quint16 sender_port;
socket->readDatagram(buffer.data(),buffer.size(), &sender,
&sender_port);
qDebug() << "Message from " << sender << " port " << sender_port;
qDebug() << "Msg: " << buffer;
}
Maybe the problem is at the way zbeacon is dealing with the UDP socket...
Has anyone successfully used a zbeacon on RPI3?
Thanks in advance!
Rodrigo Madruga.
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Kevin Sapper
2016-11-28 14:51:36 UTC
Permalink
I successfully used it through zyre on 20 raspberry pi1.
Post by Luca Boccassi
Hi,
There is a CZMQ 4.0.x series now, loads of changes have gone in since
3.0.2. I would recommend trying it as the first thing.
https://github.com/zeromq/czmq/releases
Post by Rodrigo Madruga
Hello all,
I am developing a system that uses CZMQ's zbeacon (broadcast on UDP) for
app discovery. Beacon sender is Windows box and receiver is RaspberryPi3.
As the subject says, no message is reaching the zbeacon actor.
Using czmq3.0.2 and zmq4.1.6 built directly on pi to rule out
cross-compiling issues.
Calling just zbeacon_test() returns "OK" without assertions errors.
tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144
bytes
13:33:56.203230 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length
22
Post by Rodrigo Madruga
13:34:01.072476 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length
22
Post by Rodrigo Madruga
zactor_t *listener = zactor_new (zbeacon, NULL);
assert (listener);
zsock_send (listener, "si", "CONFIGURE", 5670);
hostname = zstr_recv (listener);
assert (*hostname);
free (hostname);
zsock_send (listener, "sb", "SUBSCRIBE", "", 0);
zpoller_t *poller = zpoller_new (listener, NULL);
assert (poller);
int64_t stop_at = zclock_mono () + 10000; // wait 10 seconds
while (zclock_mono () < stop_at) {
long timeout = (long) (stop_at - zclock_mono ());
if (timeout < 0)
timeout = 0;
void *which = zpoller_wait (poller, timeout * ZMQ_POLL_MSEC);
if (which) {
char *ipaddress, *received;
zstr_recvx (which, &ipaddress, &received, NULL);
printf("From address %s:%s\n", ipaddress, received);
zstr_free (&ipaddress);
zstr_free (&received);
}
}
zpoller_destroy (&poller);
// Stop listening
zstr_sendx (listener, "UNSUBSCRIBE", NULL);
// Destroy the test nodes
zactor_destroy (&listener);
I cross-compiled a simple Qt app with a QUdpSocket (below) and the
messages
Post by Rodrigo Madruga
#include <QtNetwork/QUdpSocket>
QObject(parent)
{
qDebug() << "Binding UDP Socket";
socket = new QUdpSocket(this);
socket->bind(QHostAddress::Any, 5670);
connect(socket, &QUdpSocket::readyRead,this,
&TestUDP::readyRead);
Post by Rodrigo Madruga
qDebug() << "Ready Read signal connected0, waiting for
broadcasts";
Post by Rodrigo Madruga
}
void TestUDP::readyRead(){
QByteArray buffer;
buffer.resize(socket->pendingDatagramSize());
//var to store headers from udp
QHostAddress sender;
quint16 sender_port;
socket->readDatagram(buffer.data(),buffer.size(), &sender,
&sender_port);
qDebug() << "Message from " << sender << " port " << sender_port;
qDebug() << "Msg: " << buffer;
}
Maybe the problem is at the way zbeacon is dealing with the UDP socket...
Has anyone successfully used a zbeacon on RPI3?
Thanks in advance!
Rodrigo Madruga.
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Wes Young
2016-11-28 15:19:29 UTC
Permalink
but is that what interface your app is listening (err telling zbeacon to listen on) for beacons on?

(in addition in making sure you’re using the latest ver), follow the ZSYS_INTERFACE var a bit (it may or may not be set and be associating the beacon listener with the correct interface
)
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:33:56.203230 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length 22
13:34:01.072476 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length 22
--
wes
wesyoung.me
Rodrigo Madruga
2016-11-28 18:03:44 UTC
Permalink
A few more tests and information about the issue:

***@raspberrypi:~ $ uname -a
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016 armv7l
GNU/Linux

Now testing with zmq and czmq from master compiled on RPI with default
options:

*CZMQ version: 40002*
*ZMQ version: 40201*

Tried setting ZSYS_INTERFACE with "*", "wlan0", "eth0" and also not set at
all ("").

Using VERBOSE with zbeacon always indicate the correct interface being used:

- Without setting or "eth0":

I: 16-11-28 15:30:09 zbeacon: interface=eth0 address=192.168.25.214
broadcast=192.168.25.255

I: 16-11-28 15:30:09 zbeacon: configured, hostname=192.168.25.214


- Setting as "*"

I: 16-11-28 15:25:18 zbeacon: configured, hostname=*


Running sudo netstat -uac while executing tests had the following results:

- No setting ("") - *notice that Recv-Q builds up with time!*:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 9408 0 192.168.25.255:5670 *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*

- ZSYS_INTERFACE = "*":

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 255.255.255.255:5670 *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*


The only difference from the netstat output for the QtUdpSocket version is
that the Recv-Q is always zero.

Any tips are welcome...

Thanks!

Rodrigo Madruga.
Post by Wes Young
but is that what interface your app is listening (err telling zbeacon to
listen on) for beacons on?
(in addition in making sure you’re using the latest ver), follow the
ZSYS_INTERFACE var a bit (it may or may not be set and be associating the
beacon listener with the correct interface
)
On Nov 28, 2016, at 9:42 AM, Rodrigo Madruga <
tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144
bytes
13:33:56.203230 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length
22
13:34:01.072476 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length
22
--
wes
wesyoung.me
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Johan Philips
2016-12-02 14:51:58 UTC
Permalink
Post by Rodrigo Madruga
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016
armv7l GNU/Linux
Now testing with zmq and czmq from master compiled on RPI with default
*CZMQ version: 40002*
*ZMQ version: 40201*
Tried setting ZSYS_INTERFACE with "*", "wlan0", "eth0" and also not set
at all ("").
I: 16-11-28 15:30:09 zbeacon: interface=eth0 address=192.168.25.214
broadcast=192.168.25.255
I: 16-11-28 15:30:09 zbeacon: configured, hostname=192.168.25.214
- Setting as "*"
I: 16-11-28 15:25:18 zbeacon: configured, hostname=*
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State
udp 9408 0 192.168.25.255:5670 <http://192.168.25.255:5670>
*:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State
udp 0 0 255.255.255.255:5670
<http://255.255.255.255:5670> *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
The only difference from the netstat output for the QtUdpSocket version
is that the Recv-Q is always zero.
We are experiencing exactly the same with our Odroids, only strange
thing is they are still being discovered by our linux laptop but do not
discover each other. Recv-Q on Odroids also builds up
Post by Rodrigo Madruga
Any tips are welcome...
Did you manage to solve your problem?
Post by Rodrigo Madruga
Thanks!
Rodrigo Madruga.
Johan
Post by Rodrigo Madruga
but is that what interface your app is listening (err telling
zbeacon to listen on) for beacons on?
(in addition in making sure you’re using the latest ver), follow the
ZSYS_INTERFACE var a bit (it may or may not be set and be
associating the beacon listener with the correct interface…)
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:33:56.203230 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length 22
13:34:01.072476 IP [REDACTED].5670 > 192.168.1.255.5670: UDP, length 22
--
wes
wesyoung.me <http://wesyoung.me>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
<http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Luca Boccassi
2016-12-02 18:57:46 UTC
Permalink
Post by Johan Philips
Post by Rodrigo Madruga
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016
armv7l GNU/Linux
Now testing with zmq and czmq from master compiled on RPI with default
*CZMQ version: 40002*
*ZMQ version: 40201*
Tried setting ZSYS_INTERFACE with "*", "wlan0", "eth0" and also not set
at all ("").
I: 16-11-28 15:30:09 zbeacon: interface=eth0 address=192.168.25.214
broadcast=192.168.25.255
I: 16-11-28 15:30:09 zbeacon: configured, hostname=192.168.25.214
- Setting as "*"
I: 16-11-28 15:25:18 zbeacon: configured, hostname=*
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State
udp 9408 0 192.168.25.255:5670 <http://192.168.25.255:5670>
*:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State
udp 0 0 255.255.255.255:5670
<http://255.255.255.255:5670> *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
The only difference from the netstat output for the QtUdpSocket version
is that the Recv-Q is always zero.
We are experiencing exactly the same with our Odroids, only strange
thing is they are still being discovered by our linux laptop but do not
discover each other. Recv-Q on Odroids also builds up
Post by Rodrigo Madruga
Any tips are welcome...
Did you manage to solve your problem?
Post by Rodrigo Madruga
Thanks!
Rodrigo Madruga.
Johan
I would recommend to open an issue on Github:

https://github.com/zeromq/zyre/issues

And paste/upload to gist all logs and minimal code/test case to
reproduce the problem, details about the build and runtime environments
to reproduce, etc.

Kind regards,
Luca Boccassi
Rodrigo Madruga
2016-12-05 11:58:58 UTC
Permalink
Hello Johan,

We got the same behaviour here:

- RPI3 running a zbeacon-publish loop being discovered correctly by a Linux
machine
- RPI3 running a zbeacon-subscribe loop do not discover anything at all

As a temp workaround, we ended up replacing the zbeacon stuff with a
working Qt class.

I tried to change to czmq zsys_udp_new() in zsys.c to use the same options
as Qt use to open the socket, but got no change in behaviour.




Rodrigo
Post by Rodrigo Madruga
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016
armv7l GNU/Linux
Now testing with zmq and czmq from master compiled on RPI with default
*CZMQ version: 40002*
*ZMQ version: 40201*
Tried setting ZSYS_INTERFACE with "*", "wlan0", "eth0" and also not set
at all ("").
I: 16-11-28 15:30:09 zbeacon: interface=eth0 address=192.168.25.214
broadcast=192.168.25.255
I: 16-11-28 15:30:09 zbeacon: configured, hostname=192.168.25.214
- Setting as "*"
I: 16-11-28 15:25:18 zbeacon: configured, hostname=*
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State
udp 9408 0 192.168.25.255:5670 <http://192.168.25.255:5670>
*:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State
udp 0 0 255.255.255.255:5670
<http://255.255.255.255:5670> *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
The only difference from the netstat output for the QtUdpSocket version
is that the Recv-Q is always zero.
We are experiencing exactly the same with our Odroids, only strange thing
is they are still being discovered by our linux laptop but do not discover
each other. Recv-Q on Odroids also builds up
Any tips are welcome...
Did you manage to solve your problem?
Post by Rodrigo Madruga
Thanks!
Rodrigo Madruga.
Johan
Post by Rodrigo Madruga
but is that what interface your app is listening (err telling
zbeacon to listen on) for beacons on?
(in addition in making sure you’re using the latest ver), follow the
ZSYS_INTERFACE var a bit (it may or may not be set and be
associating the beacon listener with the correct interface
)
On Nov 28, 2016, at 9:42 AM, Rodrigo Madruga <
tcpdump: verbose output suppressed, use -v or -vv for full
protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size
262144 bytes
13:33:56.203230 IP [REDACTED].5670 > 192.168.1.255.5670: UDP,
length 22
13:34:01.072476 IP [REDACTED].5670 > 192.168.1.255.5670: UDP,
length 22
--
wes
wesyoung.me <http://wesyoung.me>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
<http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Luca Boccassi
2016-12-11 15:20:01 UTC
Permalink
Could you all please try with the very latest head of the libzmq master
branch?

I could reproduce the problem, but it's fixed now, see my comment:

https://github.com/zeromq/zyre/issues/496#issuecomment-266287690
Post by Rodrigo Madruga
Hello Johan,
- RPI3 running a zbeacon-publish loop being discovered correctly by a
Linux machine
- RPI3 running a zbeacon-subscribe loop do not discover anything at all
As a temp workaround, we ended up replacing the zbeacon stuff with a
working Qt class.
I tried to change to czmq zsys_udp_new() in zsys.c to use the same
options as Qt use to open the socket, but got no change in behaviour.
Rodrigo
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20
17:08:44 BST 2016
armv7l GNU/Linux
Now testing with zmq and czmq from master compiled on
RPI with default
*CZMQ version: 40002*
*ZMQ version: 40201*
Tried setting ZSYS_INTERFACE with "*", "wlan0", "eth0"
and also not set
at all ("").
Using VERBOSE with zbeacon always indicate the correct
I: 16-11-28 15:30:09 zbeacon: interface=eth0
address=192.168.25.214
broadcast=192.168.25.255
I: 16-11-28 15:30:09 zbeacon: configured,
hostname=192.168.25.214
- Setting as "*"
I: 16-11-28 15:25:18 zbeacon: configured,
hostname=*
Running sudo netstat -uac while executing tests had
- No setting ("") - *notice that Recv-Q builds up with
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
udp 9408 0 192.168.25.255:5670
<http://192.168.25.255:5670>
*:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
udp 0 0 255.255.255.255:5670
<http://255.255.255.255:5670> *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
The only difference from the netstat output for the
QtUdpSocket version
is that the Recv-Q is always zero.
We are experiencing exactly the same with our Odroids, only
strange thing is they are still being discovered by our linux
laptop but do not discover each other. Recv-Q on Odroids also
builds up
Any tips are welcome...
Did you manage to solve your problem?
Thanks!
Rodrigo Madruga.
Johan
2016-11-28 13:19 GMT-02:00 Wes Young
but is that what interface your app is listening
(err telling
zbeacon to listen on) for beacons on?
(in addition in making sure you’re using the
latest ver), follow the
ZSYS_INTERFACE var a bit (it may or may not be set
and be
associating the beacon listener with the correct
interface
)
On Nov 28, 2016, at 9:42 AM, Rodrigo Madruga
Broadcast messages are indeed reaching the pi,
5670
tcpdump: verbose output suppressed, use -v
or -vv for full protocol decode
listening on wlan0, link-type EN10MB
(Ethernet), capture size 262144 bytes
13:33:56.203230 IP [REDACTED].5670 >
192.168.1.255.5670: UDP, length 22
13:34:01.072476 IP [REDACTED].5670 >
192.168.1.255.5670: UDP, length 22
--
wes
wesyoung.me <http://wesyoung.me>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
<http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Gangadhara Rao Baggu
2016-12-12 05:24:40 UTC
Permalink
thanks for the quick response, I will with latest libzmq package (4.2.0)
without changing any other package and get back to you.

I am using the following version

pyzmq: 14.6.0
czmq: 3.0.2
libsodium: 1.0.6
Cython: 0.19-3
python: 2.7.5

please let me know any version is not compatible with the latest zmq.

with regards
Gangadhar
Post by Luca Boccassi
Could you all please try with the very latest head of the libzmq master
branch?
https://github.com/zeromq/zyre/issues/496#issuecomment-266287690
Post by Rodrigo Madruga
Hello Johan,
- RPI3 running a zbeacon-publish loop being discovered correctly by a
Linux machine
- RPI3 running a zbeacon-subscribe loop do not discover anything at all
As a temp workaround, we ended up replacing the zbeacon stuff with a
working Qt class.
I tried to change to czmq zsys_udp_new() in zsys.c to use the same
options as Qt use to open the socket, but got no change in behaviour.
Rodrigo
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20
17:08:44 BST 2016
armv7l GNU/Linux
Now testing with zmq and czmq from master compiled on
RPI with default
*CZMQ version: 40002*
*ZMQ version: 40201*
Tried setting ZSYS_INTERFACE with "*", "wlan0", "eth0"
and also not set
at all ("").
Using VERBOSE with zbeacon always indicate the correct
I: 16-11-28 15:30:09 zbeacon: interface=eth0
address=192.168.25.214
broadcast=192.168.25.255
I: 16-11-28 15:30:09 zbeacon: configured,
hostname=192.168.25.214
- Setting as "*"
I: 16-11-28 15:25:18 zbeacon: configured,
hostname=*
Running sudo netstat -uac while executing tests had
- No setting ("") - *notice that Recv-Q builds up with
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
udp 9408 0 192.168.25.255:5670
<http://192.168.25.255:5670>
*:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
udp 0 0 255.255.255.255:5670
<http://255.255.255.255:5670> *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
The only difference from the netstat output for the
QtUdpSocket version
is that the Recv-Q is always zero.
We are experiencing exactly the same with our Odroids, only
strange thing is they are still being discovered by our linux
laptop but do not discover each other. Recv-Q on Odroids also
builds up
Any tips are welcome...
Did you manage to solve your problem?
Thanks!
Rodrigo Madruga.
Johan
2016-11-28 13:19 GMT-02:00 Wes Young
but is that what interface your app is listening
(err telling
zbeacon to listen on) for beacons on?
(in addition in making sure you’re using the
latest ver), follow the
ZSYS_INTERFACE var a bit (it may or may not be set
and be
associating the beacon listener with the correct
interface
)
On Nov 28, 2016, at 9:42 AM, Rodrigo Madruga
Broadcast messages are indeed reaching the pi,
5670
tcpdump: verbose output suppressed, use -v
or -vv for full protocol decode
listening on wlan0, link-type EN10MB
(Ethernet), capture size 262144 bytes
13:33:56.203230 IP [REDACTED].5670 >
192.168.1.255.5670: UDP, length 22
13:34:01.072476 IP [REDACTED].5670 >
192.168.1.255.5670: UDP, length 22
--
wes
wesyoung.me <http://wesyoung.me>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
<http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
https://lists.zeromq.org/mailman/listinfo/zeromq-dev
Rodrigo Madruga
2016-12-13 18:47:24 UTC
Permalink
Updated to latest libzmq master and got the zbeacon class working now.

Tested with direct compilation on RPi3 and cross-compiled via
czmq/builds/rpi/build.sh.

Issue resolved.

Thank you Luca and zmq community!

Rodrigo Madruga.

*Rodrigo Cheminn Madruga*

Engenheiro de Desenvolvimento
Nexxtorage Cargo Technology
Fone/Fax +55 48 3341-4028
Post by Luca Boccassi
Could you all please try with the very latest head of the libzmq master
branch?
https://github.com/zeromq/zyre/issues/496#issuecomment-266287690
Post by Rodrigo Madruga
Hello Johan,
- RPI3 running a zbeacon-publish loop being discovered correctly by a
Linux machine
- RPI3 running a zbeacon-subscribe loop do not discover anything at all
As a temp workaround, we ended up replacing the zbeacon stuff with a
working Qt class.
I tried to change to czmq zsys_udp_new() in zsys.c to use the same
options as Qt use to open the socket, but got no change in behaviour.
Rodrigo
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20
17:08:44 BST 2016
armv7l GNU/Linux
Now testing with zmq and czmq from master compiled on
RPI with default
*CZMQ version: 40002*
*ZMQ version: 40201*
Tried setting ZSYS_INTERFACE with "*", "wlan0", "eth0"
and also not set
at all ("").
Using VERBOSE with zbeacon always indicate the correct
I: 16-11-28 15:30:09 zbeacon: interface=eth0
address=192.168.25.214
broadcast=192.168.25.255
I: 16-11-28 15:30:09 zbeacon: configured,
hostname=192.168.25.214
- Setting as "*"
I: 16-11-28 15:25:18 zbeacon: configured,
hostname=*
Running sudo netstat -uac while executing tests had
- No setting ("") - *notice that Recv-Q builds up with
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
udp 9408 0 192.168.25.255:5670
<http://192.168.25.255:5670>
*:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
udp 0 0 255.255.255.255:5670
<http://255.255.255.255:5670> *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
The only difference from the netstat output for the
QtUdpSocket version
is that the Recv-Q is always zero.
We are experiencing exactly the same with our Odroids, only
strange thing is they are still being discovered by our linux
laptop but do not discover each other. Recv-Q on Odroids also
builds up
Any tips are welcome...
Did you manage to solve your problem?
Thanks!
Rodrigo Madruga.
Johan
2016-11-28 13:19 GMT-02:00 Wes Young
but is that what interface your app is listening
(err telling
zbeacon to listen on) for beacons on?
(in addition in making sure you’re using the
latest ver), follow the
ZSYS_INTERFACE var a bit (it may or may not be set
and be
associating the beacon listener with the correct
interface
)
On Nov 28, 2016, at 9:42 AM, Rodrigo Madruga
Broadcast messages are indeed reaching the pi,
5670
tcpdump: verbose output suppressed, use -v
or -vv for full protocol decode
listening on wlan0, link-type EN10MB
(Ethernet), capture size 262144 bytes
13:33:56.203230 IP [REDACTED].5670 >
192.168.1.255.5670: UDP, length 22
13:34:01.072476 IP [REDACTED].5670 >
192.168.1.255.5670: UDP, length 22
--
wes
wesyoung.me <http://wesyoung.me>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
<http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
https://lists.zeromq.org/mailman/listinfo/zeromq-dev
Johan Philips
2016-12-14 09:09:20 UTC
Permalink
Here the issues on our Odroids and RPis are solved as well! Many thanks to Luca for spotting the zmq bug and patching it!

Johan

On 13 Dec 2016, at 19:47, Rodrigo Madruga <***@nexxtorage.com<mailto:***@nexxtorage.com>> wrote:

Updated to latest libzmq master and got the zbeacon class working now.

Tested with direct compilation on RPi3 and cross-compiled via czmq/builds/rpi/build.sh.

Issue resolved.

Thank you Luca and zmq community!

Rodrigo Madruga.

[https://docs.google.com/uc?export=download&id=0Bw1T0J_CDTOXcGoydVkyQnF2ajQ] Rodrigo Cheminn Madruga

Engenheiro de Desenvolvimento
Nexxtorage Cargo Technology
Fone/Fax +55 48 3341-4028
***@nexxtorage.com<mailto:***@nexxtorage.com>


2016-12-11 13:20 GMT-02:00 Luca Boccassi <***@gmail.com<mailto:***@gmail.com>>:
Could you all please try with the very latest head of the libzmq master
branch?

I could reproduce the problem, but it's fixed now, see my comment:

https://github.com/zeromq/zyre/issues/496#issuecomment-266287690
Post by Rodrigo Madruga
Hello Johan,
- RPI3 running a zbeacon-publish loop being discovered correctly by a
Linux machine
- RPI3 running a zbeacon-subscribe loop do not discover anything at all
As a temp workaround, we ended up replacing the zbeacon stuff with a
working Qt class.
I tried to change to czmq zsys_udp_new() in zsys.c to use the same
options as Qt use to open the socket, but got no change in behaviour.
Rodrigo
Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20
17:08:44 BST 2016
armv7l GNU/Linux
Now testing with zmq and czmq from master compiled on
RPI with default
*CZMQ version: 40002*
*ZMQ version: 40201*
Tried setting ZSYS_INTERFACE with "*", "wlan0", "eth0"
and also not set
at all ("").
Using VERBOSE with zbeacon always indicate the correct
I: 16-11-28 15:30:09 zbeacon: interface=eth0
address=192.168.25.214
broadcast=192.168.25.255
I: 16-11-28 15:30:09 zbeacon: configured,
hostname=192.168.25.214
- Setting as "*"
I: 16-11-28 15:25:18 zbeacon: configured,
hostname=*
Running sudo netstat -uac while executing tests had
- No setting ("") - *notice that Recv-Q builds up with
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
udp 9408 0 192.168.25.255:5670<http://192.168.25.255:5670/>
<http://192.168.25.255:5670<http://192.168.25.255:5670/>>
*:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
udp 0 0 255.255.255.255:5670<http://255.255.255.255:5670/>
<http://255.255.255.255:5670<http://255.255.255.255:5670/>> *:*
udp 0 0 *:bootpc *:*
udp 0 0 raspberrypi-001:ntp *:*
udp 0 0 raspberrypi:ntp *:*
udp 0 0 localhost:ntp *:*
udp 0 0 *:ntp *:*
udp 0 0 *:mdns *:*
udp 0 0 *:38304 *:*
udp6 0 0 [::]:ntp [::]:*
udp6 0 0 [::]:mdns [::]:*
udp6 0 0 [::]:43395 [::]:*
The only difference from the netstat output for the
QtUdpSocket version
is that the Recv-Q is always zero.
We are experiencing exactly the same with our Odroids, only
strange thing is they are still being discovered by our linux
laptop but do not discover each other. Recv-Q on Odroids also
builds up
Any tips are welcome...
Did you manage to solve your problem?
Thanks!
Rodrigo Madruga.
Johan
2016-11-28 13:19 GMT-02:00 Wes Young
but is that what interface your app is listening
(err telling
zbeacon to listen on) for beacons on?
(in addition in making sure you’re using the
latest ver), follow the
ZSYS_INTERFACE var a bit (it may or may not be set
and be
associating the beacon listener with the correct
interface
)
On Nov 28, 2016, at 9:42 AM, Rodrigo Madruga
Broadcast messages are indeed reaching the pi,
5670
tcpdump: verbose output suppressed, use -v
or -vv for full protocol decode
listening on wlan0, link-type EN10MB
(Ethernet), capture size 262144 bytes
13:33:56.203230 IP [REDACTED].5670 >
192.168.1.255.5670: UDP, length 22
13:34:01.072476 IP [REDACTED].5670 >
192.168.1.255.5670: UDP, length 22
--
wes
wesyoung.me<http://wesyoung.me/> <http://wesyoung.me<http://wesyoung.me/>>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
<http://lists.zeromq.org/mailman/listinfo/zeromq-dev>
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
zeromq-***@lists.zeromq.org<mailto:zeromq-***@lists.zeromq.org>
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
zeromq-***@lists.zeromq.org<mailto:zeromq-***@lists.zeromq.org>
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Loading...