Skip to content

Send UDP broadcast packets #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

fdammeke
Copy link

@fdammeke fdammeke commented Apr 3, 2022

This allows one to use the in-car entertainment system or any other WIFI network
ip neigh show doesn't display hosts when connected to external WIFI

This allows one to use the in-car entertainment system or any other WIFI network
*ip neigh show* doesn't display hosts when connected to external WIFI
@olivluca
Copy link
Owner

olivluca commented Apr 3, 2022

Just a couple of quiestions (since I'm not using AAStarter/AAGateway anymore I cannot test by myself):

  1. if the broadcast works there should be no need to issue the "ip neigh" command and loop through the returned addresses, just send the broadcast and be done with it, right? (at least for the "listening" case).
  2. shouldn't you use two broadcasts (one for ipv4 and the other for ipv6)? (or just one, depending on the setting of ignoreipv6) (or maybe 255.255.255.255. does both and then ignoreipv6 is not needed).

@fdammeke
Copy link
Author

fdammeke commented Apr 4, 2022

I think the code could be tweaked a bit more indeed.

From my point of view the broadcast solution only works for ipv4, there is no broadcast mechanism in ipv6 (ref: http://www.tcpipguide.com/index.htm), so I think both mechanisms should co-exist.

I'll update the PR based on your remarks.

I'm testing the code with a Nexus 4 connected to Android Studio Desktop Head Unit 2.0

@olivluca
Copy link
Owner

olivluca commented Apr 4, 2022

I don't remember the exact details, but I added the "use ipv4/use ipv6" mode because both phones had both protocols and the timing difference made the whole setup not work (my in car radio is extremely finicky).
Maybe it's not needed in listening mode and you can just use ipv4.

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

Successfully merging this pull request may close these issues.

2 participants