Skip to content
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

Adhoc network support #845

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Adhoc network support #845

wants to merge 5 commits into from

Conversation

HipsterBrown
Copy link
Contributor

This build adds an adhoc command, which acts as an alias for ap because the adhoc mode uses the same wifi-face and changes the mode property to "adhoc".

After installing this branch, run t2 adhoc --help to get more information about using the command.

To test the command:
Works best with 2 Tessels running an adhoc network. Instructions will be the same for both Tessels.

  • install this branch locally
  • run t2 adhoc --ssid TestAdHoc --name <name of one tessel>
  • run t2 adhoc --ssid TestAdHoc --name <name of other tessel>
  • both Tessels should have their amber LEDs on

You can make sure the adhoc connection works using ssh or screen to access one of the Tessel terminals and running ping 192.168.1.101 and see successful data returns. 192.168.1.101 is the static IP address of the Tessel lan network.

@Frijol
Copy link
Member

Frijol commented Sep 2, 2016

Testing.

  • Connected both to existing local internet, then ran test above. Doesn't work with wifi on, need handling or error.
  • Disabled Wifi on both and tried again, worked great

Comments

  • Would be nice to give more info than "Configure the Tessel as an adhoc network" in the .help – I'm not sure what that really means
  • Not clear what it's good for - feels like it needs more builtin functionality to be useful/discoverable
  • Not clear how to map IPs to devices
  • Help output doesn't quite match Wifi options help output.

Wifi help output:

   -n SSID, --ssid SSID               Set the SSID of the network to connect to
   -p PASSWORD, --password PASSWORD   Set the password of the network to connect to

Adhoc help output:

   -n, --ssid                        Name of the network.
   -p, --password                    Password to access network.

Overall, functions as expected except for needing to turn Wifi off first

@Frijol
Copy link
Member

Frijol commented Sep 2, 2016

Re mapping IP addresses, I guess you could run t2 adhoc on each connected t2 in order to print the IP address.

@HipsterBrown
Copy link
Contributor Author

HipsterBrown commented Oct 9, 2016

I've updated this PR with the ability to set an IP address for both t2 ap and t2 adhoc commands.

@Frijol

Help output doesn't quite match Wifi options help output.

adhoc networking is kind of a combination of wifi and access points because devices in the adhoc network can connect to it, while also emitting the network. So I've added validation for connectToNetwork and createAccessPoint (which is used by the adhoc command as well) to make sure wifi is not or cannot be enabled at the same time as an adhoc network.

I still need to add validation checks to enableAccessPoint and setWiFiState before I think this PR is ready for the community.

Not clear what it's good for - feels like it needs more builtin functionality to be useful/discoverable

We can definitely expound upon this in the CLI documentation. From my current understanding, adhoc networking can be compared to mesh communication in that devices don't need a centralized middleware device (like an access point) to communicate but with less control over device communication than mesh. There is a more detailed explanation here -> http://superuser.com/questions/481145/what-is-the-difference-between-ad-hoc-and-mesh-network-also-with-p2p#481367

@arushi019
Copy link

Hi @Frijol @HipsterBrown ! How should we go about this?

@Frijol
Copy link
Member

Frijol commented Aug 22, 2018

@HipsterBrown re @arushi019's comment above, where are we in this PR? What would you recommend as next steps?

@HipsterBrown
Copy link
Contributor Author

@Frijol @arushi019 I think we can start by pulling the flag for setting ip of the ap network into a separate PR. I need to do some more research into the usability of the adhoc networking before adding it to the CLI and docs.

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.

3 participants