Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by VMohan · Sep 15, 2015 at 05:51 PM · networkinglocalbluetoothlocalhost

Unity Wi-FI Direct support?

I am working on a new open source project called Navi (everything is on this github repo). In short, it is a system that transfers the sensor data via a local router to your PC for use cases in virtual reality. The system works well when connected to a local router. However, in cases where there is no available router, I still want to be able to connect two devices. As a quick hack, I am able to turn on mobile hotspot using an Android device and use that as the router. However, after doing some testing with it in crowded areas, I realized that the connection tends to break up fairly easily (my guess is the noise interferes with the signal). That made me think that I should support other types of connections such as Wi-Fi direct or bluetooth. I have looked at the AllJoyN framework, but it seems that they have discontinued Unity support (they have support in older releases for Android and Windows, but that is not ideal). To start with, I would really like to add a simple multi-platform Wi-Fi direct connection using Unity. However, I am not sure if this is supported with the given UNET API and was wondering if people have suggestions for frameworks that can be used to make this work with Unity.

EDIT: I got a response on the Unity forums that suggest I would have to write a platform specific plugin for each supported platform. Obviously this is not ideal, and in fact if this was the case, I would use the older AllJoyN release. Does anyone see pros/cons to either solution? Alternatively, I am open to other suggestions to improve performance of the connection.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by saltyJeff · Dec 01, 2016 at 01:10 AM

Shameless self promotion:

https://github.com/saltyJeff/UnityWifiDirect (applies only to Android)

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mmelatti · Jun 15, 2017 at 12:41 PM 0
Share

Hey Salty Jeff. Thanks for the comment. I'm working on an android application using wifi direct. I just cloned the repo and I'm trying to get something running in Unity. I was wondering if you had any demo code for a Unity Scene that is using Wifi Direct? Thanks!

avatar image saltyJeff · Jun 27, 2017 at 05:30 AM 0
Share

legerity here's a quick demo I dumped together (it's pretty ugly)

https://github.com/saltyJeff/WifiDirectExample

avatar image hamedham saltyJeff · Feb 15, 2018 at 08:14 AM 0
Share

not work. please help

avatar image mmelatti · Jun 29, 2017 at 04:22 PM 0
Share

Thanks so much for the added git repo! I'll take a look at this today

avatar image mmelatti · Jun 29, 2017 at 07:43 PM 0
Share

Hey Jeff, don't know if you or anyone else has had success with streams of data over p2p? I'm interested in low framerate low image quality sending receiving video as well as strea$$anonymous$$g other data types. Also, wifiDirect is a little fickle and frequently looses connection. I would like to be able to reconnect to a device and avoid the android message "accept request from peer to connect". Any Advice on this as well? Thanks!

avatar image
0

Answer by lrb · Sep 19, 2015 at 03:28 AM

Hi VMohan, great job! I'm trying to do the same thing! First at all, I believe that is necessary to make a wrapper for Windows using native code like here: https://msdn.microsoft.com/pt-br/library/windows/apps/windows.devices.wifidirect.wifidirectdevice.aspx

After that, I believe that is necessary to make a plugin fo Android using native code like here: http://developer.android.com/guide/topics/connectivity/wifip2p.html

I find anything else at this moment! Look for updates. Regards, Lennon.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image VMohan · Sep 19, 2015 at 05:21 PM 0
Share

Thanks for posting this here! As I made mentioned in the EDIT, it seems like it might make more sense to use the older releases of AllJoyN in that case (4.12 I think), since they have already been tested and integrated with Unity. Even though they will not get support in the future, we at least know it worked at one point.

I also came across this project on the web. http://www.opposablevr.com/projects/onetouchconnect/

I am e-mailed them to ask what support they actually provide and am still waiting on a response, so I guess we will have to wait and see if they actually do provide Wi-Fi direct or Bluetooth. I will keep people posted.

avatar image
0

Answer by rahgozar · Jun 01, 2016 at 01:38 PM

this plugin make connection over wifi on android phones. you can connect to pc too. https://www.assetstore.unity3d.com/en/#!/content/57537

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

37 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Target = NetworkedMe 1 Answer

When using photon sometimes it fails to find local game object. 0 Answers

Identifying local player issue 0 Answers

unet custom observers for networked object . 1 Answer

How do I to send a varible via bluetooth android 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges