Avare opening the Wifi UDP port exclusively on a Stratux Box

89 views
Skip to first unread message

swede...@gmail.com

unread,
Aug 30, 2023, 11:01:38 AM8/30/23
to Apps4Av Forum
This message is mainly geared towards the developers of Avare.

I have noticed that when connecting to a Stratux box via Wifi Avare opens the UDP Socket in a way that does NOT let other applications attach to the UDP Stream on that same device.
I am developing an App and am also interested in the data transmitted by the Stratux box.

Peter

Alton Moore

unread,
Aug 30, 2023, 2:02:27 PM8/30/23
to Apps4Av Forum
I dunno, I run multiple instances of Avare and other programs all of the time, all attached to the same Stratux.  Can you give details of the socket code in question, or point to the code?

swede...@gmail.com

unread,
Aug 31, 2023, 9:02:57 AM8/31/23
to Apps4Av Forum
I think you're misunderstanding, yes you can have multiple tablets attaching to the same Stratux, no problem as the Stratux box broadcasts this data (UDP).  My issue is that when Avare is running and getting data from the Stratux, and another app ON THAT SAME TABLET tries to open the Port it fails, it says address already in use.
I believe, I could be wrong but the way I open the Socket is:
...
if (mSocket == null) {
mSocket = new DatagramSocket(null);
mSocket.setReuseAddress(true);
mSocket.setBroadcast(true);
mSocket.setSoTimeout(10000);
mSocket.bind(new InetSocketAddress(mPort));
}

So with this code I can have multiple readers on the tablet if I do this:
mSocket = new DatagramSocket(mPort);
Then the code cannot reuse the UDP Socket.

Makes Sense??


Jeffrey Ross

unread,
Aug 31, 2023, 9:27:35 AM8/31/23
to apps4a...@googlegroups.com
If you are confident with your proposed changes on how to open the socket on the tablet you can submit the change on github.com  (https://github.com/apps4av/avare) for inclusion into a future release.

Jeff
--
You received this message because you are subscribed to the Google Groups "Apps4Av Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apps4av-foru...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apps4av-forum/a83b1790-7047-4ddd-b268-a8ce110ba9c0n%40googlegroups.com.

swede...@gmail.com

unread,
Aug 31, 2023, 9:43:27 AM8/31/23
to Apps4Av Forum
OK I will do that.
Peter

Reply all
Reply to author
Forward
0 new messages