Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Easy WiFi Controller- Turn your mobile phone into a controller!

Discussion in 'Assets and Asset Store' started by greggtwep16, Mar 9, 2015.

  1. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Hi,
    I bought your plugin and succesfully tested some of your sample scenes (both client and server sides of course).

    Now I'm trying to use it in a project I'm working on but I couldn't get it work so far. More precisely, I've the client trying to connect and entering the "Broadcasting" state, but never being able to find the server application, not the server is logging anything.

    Anyway, I've a doubt now and a question: is it mandatory to have both client and server scenes in the same project, as you did in your samples? I ask that because for convenience I decided to have two distinct projects - the server and the client - of course having the same application name on both the managers. Is that enough, or do I need to merge the two projects to have it work?

    Any other suggestion will be very appreciated,

    Thanks!
    Riccardo
     
  2. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    No it's not mandatory to have the two ends in the same project. To rule out your network does it also fail if you try and run both ends on the same PC. Running your one project as a standalone build and the other project in editor on the same PC should let you know if you should be investigating the projects or the network.
     
    RiccardoAxed likes this.
  3. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Thank you for the answer.

    I was running the server in Unity editor and the client on a phone, anyway after some more tests I managed to get it to work just building the server. In fact, for some reason I can't have the client connecting if the server runs in editor, I guess the reason is some network/firewall issue or maybe the Unity's Administrator's rights.

    Again, if you have some suggestions about it, I'll really appreciate that,
     
  4. EstudioVR

    EstudioVR

    Joined:
    Jul 26, 2013
    Posts:
    127
    Is it possible to control a Oculus Quest app from a PC or a cell phone?
     
  5. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    It's almost always windows firewall. There is supposed to be a popup for any windows app when it goes to access the network for the first time that asks you to allow or not (it blocks traffic by default). This doesn't always occur though in which case you have to open up windows firewall and open it manually.
     
    RiccardoAxed likes this.
  6. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The quest, go, daydream, etc. are all on the android platform. So yes it's supported by EWC. That being said for the person outside of the HMD they can't see what's going on so I'm not sure how useful it would actually be.
     
  7. EstudioVR

    EstudioVR

    Joined:
    Jul 26, 2013
    Posts:
    127

    It´s useful, for example, when you are on a public exibithion and have a limited time to each VR Experience. You have to have the control for quit the experience on HMD, for example. Thank you. And you can put triggers on your Quest app to send events to cell phone and know where the player is. I will buy very soon
     
  8. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I see. One word of caution with public exhibitions (I assume a trade show) is that commercial class routers tend to block broadcasts that EWC uses. So in that usecase it is best to bring your own router (trade show wifi is usually unreliable anyways). EWC doesn't need internet to function just wifi.
     
  9. EstudioVR

    EstudioVR

    Joined:
    Jul 26, 2013
    Posts:
    127
    Yes, my company usually have private networks on trade shows, and my VR app uses it. thank you
     
  10. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Thank you, I still haven't it working in editor despite I changed the firewall settings, anyway the whole thing works well for my project.

    I've a question about a not well-documented aspect, that is the field BaseControllerType.logicalPlayerNumber. Can I safely assume that number is always equal to the EasyWiFiConstants.PLAYER_NUMBER enumeration, with the same meaning?

    Just to explain, I made a game running on a big screen, with players controlling avatars using a tablet accelerometer - that's the easier part and I made it with the CustomAccelerometer control - but I would see the avatar appear onscreen only when the player connects the tablet and disappear when he disconnects it.

    To achieve that I would use the EasyWiFiController.On_ConnectionsChanged(bool isConnect, int playerNumber) handler to show/hide avatars, so am I right using playerNumber as it was the aforesaid enumeration (that is playerNumber == 0 always means "Player1 is connecting/disconnecting", playerNumber == 1 means the same for Player2 and so on)?

    Hope it was clear enough :)
     
  11. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Yes that is correct. It is important to note that there is no management happening though. So let's say players 1 and 2 connect, player 2 then disconnects, and then a new player connects. This will be player 3 and not reuse the player 2 slot which will be empty unless that player comes back (or more specifically if the local ip address comes back).
     
    RiccardoAxed likes this.
  12. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    My game (a public installation on a cruise ship) is controlled by just six tablets, each with a fixed ip address, so i guess the "slot reuse" routine should work pretty well. Anyway, I wrote the game without relying on that.

    I was asking about the equivalence playerNumber == PLAYER_NUMBER because I'm having issues on another part of the game that uses EWFC too: namely, the players can draw a picture on their tablet, then send it on the big screen and use it as a custom avatar.

    So, i've an upload routine (not EWFC based) that sends the picture on the local pc running the server, then I use a EWFC forward data channel to notify "my" avatar the picture's file to load. That works rather well with one or two players but, as soon as there are six simultaneous tablets transmitting, the whole thing becomes rather chaotic, with new players "stealing" other player's avatar rather than loading their own, and so on.

    Of course that's surely a bug on my side, but since that routine is based on the playerNumber association, I wanted to be sure I was doing the right assumption.
     
  13. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Yeah your assumption is correct. If you've sorted the editor windows firewall issue, the easiest way would be to set a breakpoint and verify the value in visual studio.
     
    RiccardoAxed likes this.
  14. unity_8W9NSib1zik4ww

    unity_8W9NSib1zik4ww

    Joined:
    Nov 5, 2018
    Posts:
    1
    Hello,

    Question about sending string from controller to server. Would i use a client data controls on the controller and a Server Data controls on the server? Do you have an example in the docs for sending a string or bool event from the client to the server? Thanks in advance!
     
  15. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    If what you have is generic data then yes you can do it this way. The AI steering example shows how this is done for floats but the same can be done with string or bool. Basically you just use setvalue on the controller to whatever value you want and that will be transmitted to the server.
     
  16. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Hi,
    Then I used your plugin for my project and it worked very well, so I'm very happy with it :)
    Just in case you would take a look, there's a short hint in this video, around 0:32 seconds (the girl controlling the fish avatar with a tablet):

    So now I would use Easy WiFi Controller for another project where it should control an Oculus VR app, but one of the client's request is to have the client controller working in a web browser, and I know that unfortunately this is a platform your plugin currently doesn't support.

    I would ask you if there's any technical (maybe a security) reason for that? If not, is there any chance to somehow add the Web browser compatibility?

    Thanks!
     
  17. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The major browsers prevent you from using UDP sockets unsolicited which is the underlying technology that's used to get more performance than TCP allows. In the browser WebSockets and WebRTC are the two technologies that you've heard of. WebSockets is TCP based and really won't give you the latency you desire. WebRTC is closer to what you want although still not as performant as UDP sockets. Unfortunately it's browser support isn't universal which is why I've never taken the time to really try and use it other than quick little tests. To make a general product and support it, I'd need a wider market than just select browsers or non action games that don't care about the latency. That's the main reason I've not invested in webRTC.
     
    RiccardoAxed likes this.
  18. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Thank you for the answer, that definitely makes sense.

    I've just another question: is there any problem using one single client connected to many server components? As I said, the project involves an app controlling a group of VR devices, so in my scenario I should have an app with a EWFC client component connecting to N instances of another VR application, each one containing a EWFC server. In this way I could control all the VR devices at the same time with a single app.

    Does it make sense or that could cause problems?
     
  19. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    UDP doesn't really have connections so the term client and server is used loosely. It's mainly to imply the many to one relationship that exists (in a traditional game their would be many controllers but only one game). In what you describe you want one controller and many devices which is just the many to one in reverse (one to many). The terms used in EWC (forward controls, backchannels, etc.) are used to make it easier for the traditional use case but there really isn't anything that forces it to be used in that direction. So in general you can use the backchannel controls from your "server" to control your VR devices like you describe. You would then use what is normally labeled as the forward controls for the "clients" to communicate back.
     
    RiccardoAxed likes this.
  20. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    Hello @greggtwep16 ,
    I am running Easy WiFi Controller on my Mac currently. However, on start I get
    SocketException: Could not resolve host 'Kresimirs-MBP' 
    from

    Code (CSharp):
    1.  
    2. [Exception] SocketException: Could not resolve host 'Kresimirs-MBP'
    3. Dns.Error_11001()    <d2957de1c3fd4781a43d89572183136c>:0
    4. Dns.GetHostByName()    <d2957de1c3fd4781a43d89572183136c>:0
    5. Dns.GetHostEntry()    <d2957de1c3fd4781a43d89572183136c>:0
    6. EasyWiFiController.getNetworkIPAddress()    Assets/Standard Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:1047
    7. 1046:   string localIP = "?";
    8. -->1047:   host = Dns.GetHostEntry(Dns.GetHostName());
    9. 1048:   foreach (IPAddress ip in host.AddressList)
    10. EasyWiFiController.initialize()    Assets/Standard Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:100
    11. 99:   #if (UNITY_WSA && !UNITY_5_2 && !UNITY_5_1 && !UNITY_5_0) || UNITY_2018_2_OR_NEWER
    12. -->100:               myIPAddress = getNetworkIPAddress();
    13. 101:   #else
    14. EasyWiFiManager.Awake()    Assets/Standard Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiManager.cs:59
    15. 58:   {
    16. -->59:       EasyWiFiController.initialize(applicationName, EasyWiFiConstants.PEERTYPE_SERVER, serverSocketPort,clientSocketPort,logVerbose, clientConnectAutomatically);
    17. 60:   }
    18.  
    19.  
    Is there anything I need to enable on my Mac (sharing of sorts perhaps?), or if you can think of any other reason this may be happening.

    I am starting the game inside Unity Editor (2018.4.12f) as server. This happens on start.
     
  21. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Which backend are you using? Il2CPP? The stack trace indicates it's likely erroring out in one of Unity's implementations but to figure out which one certainly let me know which you are using.
     
  22. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    That is correct, I'm using Il2CPP. Any recommendations? I tried googling for this error but found nothing of help. Thanks @greggtwep16 !
     
  23. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    To try and reproduce it here on my OSX box (I'm assuming at this point it's OSX specific) what OSX version are you running? Does it also happen on the other scripting backends and/or .net versions? Also what is your local ip address on that box (not your public one just the local) when you are running the tests?
     
  24. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    Thanks a lot @greggtwep16 for looking into this!

    I'm running Mojave (10.14.6).

    Updated Unity Editor to 2019.2.

    My local IP is 192.168.5.16

    Any combination of backend/.net does not help it to work.
    Tried Mono&IlCPP / .Net 2 & .Net 4
     
  25. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I've been trying to reproduce on my network with my macbook on those versions this week but haven't been able to thus far. Just curious does it also happen if you flip around the client and the server (running the client in the editor)? I'm trying to ascertain if for you if any network traffic for you throws that error, or just the broadcast.
     
  26. Dimn721

    Dimn721

    Joined:
    Mar 30, 2017
    Posts:
    9
    Hi @greggtwep16 , Thank you for this great plugin.

    My customers running Google Pixels have been running into an issue when using Easy Wifi Controller. It would seem that their phones will sort of default to Google Fi over WIFI in some cases. We've found that setting their phone to Airplane mode will force the connection and solve the issue. I was wondering if you had any advice on how I may be able to default to the wifi instead?
     
  27. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I don't have a pixel but that seems very strange. When it acts up is it just the game or any wifi in general for anything on the phone?
     
  28. Dimn721

    Dimn721

    Joined:
    Mar 30, 2017
    Posts:
    9
    From what I can find online, it seems that Google Fi phones may prioritize Google Fi over wifi in some cases. From what I can tell it would affect anything on the phone not just the game.

    This is all I've found so far, where a customer had a Fi Support helper claim this was working as expected https://support.google.com/fi/thread/12293385?hl=en. I imagine this will be a difficult issue/
     
  29. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    A few things I discovered are:
    1.) My computer's name is not 'kresimir-mbp'. Not sure why Dns.GetHostName() returns this. In computer's system prefs, computer name is 'Kresimirs-MacBook-Pro.local' and if I put that in, Dns.GetHostEntry() does get resolved.
    2.) My server is now broadcasting correct IP, but my iPhone (client) is broadcasting god knows what IP (it is not local, nor my internet IP) so they never connect.
    [ServerLog] [265.440] Recieved Client Broadcast... Client_Broadcast:10.148.204.251
    [ServerLog] [265.440] Sending out server broadcast response... Broadcast_ServerResponse:192.168.5.14


    I welcome any of your thoughts @greggtwep16 as I play around with this more.
    What's strange is that this used to work a year ago. Now it doesn't any more. I am not sure what has changed since (probably many factors as I updated my game a few times, and even Unity versions, but not the multiplayer code).
     
  30. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    How did get IL2CPP/.NET (which is what EWC uses depending on the backend) to use the correct computer name? Did OSX have the incorrect name somewhere?

    As far as the phone while 192.168 is the most common NAT ip range 10.x.x.x is also used in some NAT systems. If you go to the router though what range is it supposed to be handing out (its usually in the configuration page). If the desktop is getting a 192.168 address but the phone is getting a 10.x address something isn't right there coming from the same wifi. On the router does it list the current connected clients and their addresses?
     
  31. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    133
    I'll be darned. There is so many directions my Macbook's name can come from... Even my terminal name I see now is .. well anyways. It's a long story but I guess the line

    host = Dns.GetHostEntry(Dns.GetHostName());


    is not really bulletproof.

    I put in a #UNITY_EDITOR clause for when I'm working on my Mac-of-many-names. But the above line hopefully works on mobile devices (I'll test some more, but so far it works).

    Also, my mobile got a normal IP now and it works.

    Since everything works now, and it has nothing to do with the Unity (or your plugin) next time I'll try testing more around the WiFi & the router.

    Thank you for your help, I really appreciate it @greggtwep16
     
    greggtwep16 likes this.
  32. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    Hello EWC team !
    do you have an issue about the : normal socket listening interrupted to exit Source: mscorlib ?
    (in Client app is a android build and Server as Standalone .) with Android S20 and J3 same error .


    ive got the same problem of another user . but no answer .
    with ControlsKitchenSinkClientScene for example . all is ok with your demo (simple buttons, ect ...) until i use Gyroscope and veloci features .
    The server app indicates " normal socket listening interrupted to exit Source: mscorlib ?"
    some heartbeats and nothing .

    do you have an issue about the : normal socket listening interrupted to exit Source: mscorlib ?
    its a 2 days i turn around ..do you have an advice .
    by advance thank you .
     
    Last edited: Apr 11, 2020
  33. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    That message is usually displayed if you kill the appication will the sockets are still active, which is normal. If you are seeing this during gameplay and not when you exit the app certainly let me know more information on what makes that message trigger, like if it's a specific button or something else.
     
  34. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    Thank you for your very quick reply .

    I ve tested on a blank 2019.3 unity project . just EWC installed .
    i build one of your Client demo for example "kitchen Sink controls..." in Android apk . installed on J3 and S20 android .
    I launch the same Server scene demo in runtime .
    Server catch the signal from client on android . but there is nothing and after some seconds the console display :

    Initializing Easy WiFi Controller...
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:initialize(String, String, Int32, Int32, Boolean, Boolean) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:111)
    EasyWiFiManager:Awake() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiManager.cs:59)

    listening for communication...
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:222)
    System.Threading.ThreadHelper:ThreadStart()

    Recieved Client Broadcast... Client_Broadcast:192.168.8.103
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientBroadcast(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:495)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:244)
    System.Threading.ThreadHelper:ThreadStart()

    Sending out server broadcast response... Broadcast_ServerResponse:192.168.8.100
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:sendServerBroadcastResponse(String, String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:445)
    EasyWiFi.Core.EasyWiFiController:listenClientBroadcast(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:515)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:244)
    System.Threading.ThreadHelper:ThreadStart()

    Client log: Client_Log:Sending out client Inventory...Client_Inventory:192.168.8.103:Joystick#Joystick1,Touchpad#Touchpad1,Slider#Slider2,DPad#DPad1,Button#Button1,Button#Switch1,Slider#Slider1,Accelerometer#Accelerometer,Gyro#Gyro,
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientLogMessage(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:694)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:239)
    System.Threading.ThreadHelper:ThreadStart()

    Recieved Client Inventory... Client_Inventory:192.168.8.103:Joystick#Joystick1,Touchpad#Touchpad1,Slider#Slider2,DPad#DPad1,Button#Button1,Button#Switch1,Slider#Slider1,Accelerometer#Accelerometer,Gyro#Gyro,
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientInventoryMessage(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:559)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:249)
    System.Threading.ThreadHelper:ThreadStart()

    Sending out server inventory Reply... Inventory_ServerResponse:192.168.8.103Joystick1#Joystick1,192.168.8.103Touchpad1#Touchpad1,192.168.8.103Slider2#Slider2,192.168.8.103DPad1#DPad1,192.168.8.103Button1#Button1,192.168.8.103Switch1#Switch1,192.168.8.103Slider1#Slider1,192.168.8.103Accelerometer#Accelerometer,192.168.8.103Gyro#Gyro,
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:sendServerInventoryResponse(String, String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:468)
    EasyWiFi.Core.EasyWiFiController:listenClientInventoryMessage(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:591)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:249)
    System.Threading.ThreadHelper:ThreadStart()


    Client log: Client_Log:Received Server's Inventory Response... Inventory_ServerResponse:192.168.8.103Joystick1#Joystick1,192.168.8.103Touchpad1#Touchpad1,192.168.8.103Slider2#Slider2,192.168.8.103DPad1#DPad1,192.168.8.103Button1#Button1,192.168.8.103Switch1#Switch1,192.168.8.103Slider1#Slider1,192.168.8.103Accelerometer#Accelerometer,192.168.8.103Gyro#Gyro,
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientLogMessage(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:694)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:239)
    System.Threading.ThreadHelper:ThreadStart()


    Client log: Client_Log:Sending controller data... Client_ControllerData:0:192.168.8.103Joystick1#0,0
    192.168.8.103Touchpad1#0.4416667,0.2861111,1
    192.168.8.103Slider2#0
    192.168.8.103DPad1#0,0,0,0
    192.168.8.103Button1#0
    192.168.8.103Switch1#0
    192.168.8.103Slider1#0
    192.168.8.103Accelerometer#0.02475977,-0.3284717,-0.9645088
    192.168.8.103Gyro#-0.7985274,-0.09402328,0.06920242,0.5905291

    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientLogMessage(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:694)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:239)
    System.Threading.ThreadHelper:ThreadStart()

    Recieved Controller Data... Client_ControllerData:0:192.168.8.103Joystick1#0,0
    192.168.8.103Touchpad1#0.4416667,0.2861111,1
    192.168.8.103Slider2#0
    192.168.8.103DPad1#0,0,0,0
    192.168.8.103Button1#0
    192.168.8.103Switch1#0
    192.168.8.103Slider1#0
    192.168.8.103Accelerometer#0.02475977,-0.3284717,-0.9645088
    192.168.8.103Gyro#-0.7985274,-0.09402328,0.06920242,0.5905291

    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientControllerData(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:626)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:254)
    System.Threading.ThreadHelper:ThreadStart()

    Client log: Client_Log:Recieved Server's Heartbeat message... Server_Heartbeat:18
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientLogMessage(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:694)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:239)
    System.Threading.ThreadHelper:ThreadStart()

    Client log: Client_Log:Sending controller data... Client_ControllerData:1:192.168.8.103Joystick1#0,0
    192.168.8.103Touchpad1#0.4416667,0.2861111,1
    192.168.8.103Slider2#0
    192.168.8.103DPad1#0,0,0,0
    192.168.8.103Button1#0
    192.168.8.103Switch1#0
    192.168.8.103Slider1#0
    192.168.8.103Accelerometer#0.02650391,-0.2532715,-0.9755947
    192.168.8.103Gyro#-0.5146201,-0.08888686,0.1174794,0.8446679

    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientLogMessage(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:694)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:239)
    System.Threading.ThreadHelper:ThreadStart()

    Recieved Controller Data... Client_ControllerData:1:192.168.8.103Joystick1#0,0
    192.168.8.103Touchpad1#0.4416667,0.2861111,1
    192.168.8.103Slider2#0
    192.168.8.103DPad1#0,0,0,0
    192.168.8.103Button1#0
    192.168.8.103Switch1#0
    192.168.8.103Slider1#0
    192.168.8.103Accelerometer#0.02650391,-0.2532715,-0.9755947
    192.168.8.103Gyro#-0.5146201,-0.08888686,0.1174794,0.8446679

    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:listenClientControllerData(String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:626)
    EasyWiFi.Core.EasyWiFiController:listen() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:254)
    System.Threading.ThreadHelper:ThreadStart()

    Normal socket listening interrupted to exit. Source:mscorlib

    Sending out server heartbeat... Server_Heartbeat:20
    UnityEngine.Debug:Log(Object)
    EasyWiFi.Core.EasyWiFiController:sendHeartbeat(String, String) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:402)
    EasyWiFi.Core.EasyWiFiController:createAndSendHeartbeatMessages(Int32) (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiController.cs:845)
    EasyWiFiManager:sendServerHeartbeat() (at Assets/Easy WiFi Controller/Scripts/Core/EasyWiFiManager.cs:194)



    and finish .
    nothing happened .(??) any client buttons have done actions to the server app .


    i ve turn off all firewall in my router to be sure .and windows Defender too .


    i notice ive tried with a simple example multiplayed Dynamic client . and its ok . communications seems good between client and server . BUT when i installed a gyro or accelerometer : Server notify me directly a Normal socket listening interrupted to exit. Source:mscorlib with the both android mobile

    and bad luck for me , i need gyro and accelerometer : D

    do yo need further insormation . im waiting your request .
    thank you for your help .
    GiO
     
  35. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    That's very odd. From the logs all the traffic is normal and the data looks fine. It isn't a network issue both sides see eachother just fine. The crash is happening on the server but what specifically occurs I can't tell from the log.

    What OS are you running the server on? If on windows the easiest way to track down what exactly is happening is to run in the editor with visual studio attached and set a breakpoint on line 298 of EasyWifiController.cs. When the breakpoint is hit hover over a few lines above at what exception is thrown and let me know what it is. I ran it here but I don't get that issue so I am not able to reproduce.
     
  36. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    Hello Greg
    do you speak about that ?

    Void EasyWiFi.Core.EasyWiFiController:listen ()+0x1a7 at Z:\UNITY\WIFICONNECT\WIFICONNECT\Assets\Easy WiFi Controller\Scripts\Core\EasyWiFiController.cs:[298:21-298:35]
    à Z:\UNITY\WIFICONNECT\WIFICONNECT\Assets\Easy WiFi Controller\Scripts\Core\EasyWiFiController.cs(298)
    Void System.Threading.ThreadHelper:ThreadStart_Context (Object)+0x1f at :-1
    Void System.Threading.ExecutionContext:RunInternal (ExecutionContext, ContextCallback, Object, Boolean)+0x73 at :-1
    Void System.Threading.ExecutionContext:Run (ExecutionContext, ContextCallback, Object, Boolean)+0x4 at :-1
    Void System.Threading.ExecutionContext:Run (ExecutionContext, ContextCallback, Object)+0x2f at :-1
    Void System.Threading.ThreadHelper:ThreadStart ()+0x14 at :-1

    is help you ?
     
  37. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    i used Windows 10 . if you have 5 min soon we can exchange by teamviewer?
     
  38. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    That's the stacktrace which doesn't really show what the actual exception that was thrown is. For that you'd need to set a breakpoint in visual studio and then look at the exceptions message.
     
  39. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    hallo Greggtwep
    thanks again sorry for my ignorance

    Im not sure again that you need is .

    i hope is you have need .
    have a nice day .
    GiO



    ive copy paste from the Exception "locals" window
    Name Value Type
    ◢ exception "System.FormatException: Input string was not in a correct format.\r\n at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Number.ParseDecimal (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00019] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Decimal.Parse (System.String s, System.IFormatProvider provider) [0x00009] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Convert.ToDecimal (System.String value) [0x0000f] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at EasyWiFi.Core.AccelerometerControllerType.mapNetworkDataToStructure (System.Int32 packetNumber, System.String line) [0x00074] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\ControllerTypes\\AccelerometerControllerType.cs:37 \r\n at EasyWiFi.Core.EasyWiFiController.listenClientControllerData (System.String message) [0x0007c] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:641 \r\n at EasyWiFi.Core.EasyWiFiController.listen () [0x000cf] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:254 " System.Exception

    and here from the entire "locals" window
    Name Value Type
    ▶ numArray System.Byte[285] System.Byte[]
    message "Client_ControllerData:450:192.168.8.106Joystick1#0,0\n192.168.8.106Touchpad1#0,0,0\n192.168.8.106Slider2#0\n192.168.8.106DPad1#0,0,0,0\n192.168.8.106Button1#0\n192.168.8.106Switch1#0\n192.168.8.106Slider1#0\n192.168.8.106Accelerometer#-0.5214844,0.4550781,0.6953125\n192.168.8.106Gyro#0,0,0,0\n" System.String
    ◢ exception "System.FormatException: Input string was not in a correct format.\r\n at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Number.ParseDecimal (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00019] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Decimal.Parse (System.String s, System.IFormatProvider provider) [0x00009] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Convert.ToDecimal (System.String value) [0x0000f] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at EasyWiFi.Core.AccelerometerControllerType.mapNetworkDataToStructure (System.Int32 packetNumber, System.String line) [0x00074] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\ControllerTypes\\AccelerometerControllerType.cs:37 \r\n at EasyWiFi.Core.EasyWiFiController.listenClientControllerData (System.String message) [0x0007c] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:641 \r\n at EasyWiFi.Core.EasyWiFiController.listen () [0x000cf] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:254 " System.Exception
    ◢ base "System.FormatException: Input string was not in a correct format.\r\n at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Number.ParseDecimal (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00019] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Decimal.Parse (System.String s, System.IFormatProvider provider) [0x00009] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Convert.ToDecimal (System.String value) [0x0000f] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at EasyWiFi.Core.AccelerometerControllerType.mapNetworkDataToStructure (System.Int32 packetNumber, System.String line) [0x00074] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\ControllerTypes\\AccelerometerControllerType.cs:37 \r\n at EasyWiFi.Core.EasyWiFiController.listenClientControllerData (System.String message) [0x0007c] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:641 \r\n at EasyWiFi.Core.EasyWiFiController.listen () [0x000cf] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:254 " System.SystemException
    ◢ base "System.FormatException: Input string was not in a correct format.\r\n at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Number.ParseDecimal (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00019] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Decimal.Parse (System.String s, System.IFormatProvider provider) [0x00009] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Convert.ToDecimal (System.String value) [0x0000f] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at EasyWiFi.Core.AccelerometerControllerType.mapNetworkDataToStructure (System.Int32 packetNumber, System.String line) [0x00074] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\ControllerTypes\\AccelerometerControllerType.cs:37 \r\n at EasyWiFi.Core.EasyWiFiController.listenClientControllerData (System.String message) [0x0007c] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:641 \r\n at EasyWiFi.Core.EasyWiFiController.listen () [0x000cf] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:254 " System.Exception
    ▶ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary
    HResult -2146233033 System.Int32
    HelpLink null System.String
    InnerException null System.Exception
    Message "Input string was not in a correct format." System.String
    Source "mscorlib" System.String
    StackTrace " at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Number.ParseDecimal (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00019] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Decimal.Parse (System.String s, System.IFormatProvider provider) [0x00009] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Convert.ToDecimal (System.String value) [0x0000f] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at EasyWiFi.Core.AccelerometerControllerType.mapNetworkDataToStructure (System.Int32 packetNumber, System.String line) [0x00074] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\ControllerTypes\\AccelerometerControllerType.cs:37 \r\n at EasyWiFi.Core.EasyWiFiController.listenClientControllerData (System.String message) [0x0007c] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:641 \r\n at EasyWiFi.Core.EasyWiFiController.listen () [0x000cf] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:254 " System.String
    ◢ TargetSite "Void StringToNumber(System.String, System.Globalization.NumberStyles, NumberBuffer ByRef, System.Globalization.NumberFormatInfo, Boolean)" System.Reflection.MethodBase
    ▶ base "Void StringToNumber(System.String, System.Globalization.NumberStyles, NumberBuffer ByRef, System.Globalization.NumberFormatInfo, Boolean)" System.Reflection.RuntimeMethodInfo
    Attributes Private | Static | HideBySig System.Reflection.MethodAttributes
    CallingConvention Standard System.Reflection.CallingConventions
    ContainsGenericParameters false System.Boolean
    ▶ DeclaringType {System.Number} System.Type
    IsGenericMethod false System.Boolean
    IsGenericMethodDefinition false System.Boolean
    IsSecurityCritical true System.Boolean
    IsSecuritySafeCritical true System.Boolean
    IsSecurityTransparent false System.Boolean
    ▶ MethodHandle {System.RuntimeMethodHandle} System.RuntimeMethodHandle
    Name "StringToNumber" System.String
    ▶ ReflectedType {System.Number} System.Type
    ▶ ReturnParameter "Void" System.Reflection.ParameterInfo
    ▶ ReturnType {System.Void} System.Type
    ▶ ReturnTypeCustomAttributes "Void" System.Reflection.ICustomAttributeProvider
    ▶ Non-Public members
    ◢ Static members
    ◢ Non-Public members
    _COMPlusExceptionCode -532462766 System.Int32
    s_EDILock {System.Object} System.Object
    ◢ Non-Public members
    IsTransient System.MissingMethodException: Attempted to access a missing method. System.Boolean
    RemoteStackTrace null System.String
    _HResult -2146233033 System.Int32
    _className "System.FormatException" System.String
    ▶ _data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary
    _dynamicMethods null System.Object
    _helpURL null System.String
    _innerException null System.Exception
    _message "Input string was not in a correct format." System.String
    _remoteStackIndex 0 System.Int32
    _remoteStackTraceString null System.String
    ▶ _safeSerializationManager {System.Runtime.Serialization.SafeSerializationManager} System.Runtime.Serialization.SafeSerializationManager
    _source "mscorlib" System.String
    ▶ _stackTrace System.IntPtr[21] System.Object
    _stackTraceString null System.String
    captured_traces null System.Diagnostics.StackTrace[]
    native_trace_ips null System.IntPtr[]
     
  40. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    That does help. By any chance is the device's language one that has decimal points using comma (,) instead of period (.) ? If so the issue is the fact that EWC's payload uses comma for parsing the messages. The easiest fix is in EasyWifiConstants changing the below.

    From:
    public const string SPLITMESSAGE_COMMA = ",";

    To:
    public const string SPLITMESSAGE_COMMA = "~";

    What you set it to doesn't really matter as long as it doesn't appear in the payload of any of your objects, I picked tilde at random. The log will be a little less readable but it should resolve your problem. Certainly let me know.
     
  41. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    hello Greggtwep
    thank you
    im sorry
    so ive got another mscorlib stop with exception error at 298
    seems the /n for SPLITMESSAGE_NEWLINE
    what do you think about it ?
    thanks

    Name Value Type
    message "Client_ControllerData:237:192.168.8.103Joystick1#0~0\n192.168.8.103Touchpad1#0~0~0\n192.168.8.103Slider2#0\n192.168.8.103DPad1#0~0~0~0\n192.168.8.103Button1#0\n192.168.8.103Switch1#0\n192.168.8.103Slider1#0\n192.168.8.103Accelerometer#0.2146963~0.08956348~-0.9636553\n192.168.8.103Gyro#-0.3057647~-0.00004737638~0.01412446~0.9520023\n" System.String

    Name Value Type
    ◢ exception "System.FormatException: Input string was not in a correct format.\r\n at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Number.ParseDecimal (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00019] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Decimal.Parse (System.String s, System.IFormatProvider provider) [0x00009] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Convert.ToDecimal (System.String value) [0x0000f] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at EasyWiFi.Core.AccelerometerControllerType.mapNetworkDataToStructure (System.Int32 packetNumber, System.String line) [0x00074] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\ControllerTypes\\AccelerometerControllerType.cs:37 \r\n at EasyWiFi.Core.EasyWiFiController.listenClientControllerData (System.String message) [0x0007c] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:641 \r\n at EasyWiFi.Core.EasyWiFiController.listen () [0x000cf] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:254 " System.Exception

    Name Value Type
    ◢ base "System.FormatException: Input string was not in a correct format.\r\n at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Number.ParseDecimal (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00019] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Decimal.Parse (System.String s, System.IFormatProvider provider) [0x00009] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at System.Convert.ToDecimal (System.String value) [0x0000f] in <437ba245d8404784b9fbab9b439ac908>:0 \r\n at EasyWiFi.Core.AccelerometerControllerType.mapNetworkDataToStructure (System.Int32 packetNumber, System.String line) [0x00074] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\ControllerTypes\\AccelerometerControllerType.cs:37 \r\n at EasyWiFi.Core.EasyWiFiController.listenClientControllerData (System.String message) [0x0007c] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:641 \r\n at EasyWiFi.Core.EasyWiFiController.listen () [0x000cf] in Z:\\UNITY\\WIFICONNECT\\WIFICONNECT\\Assets\\Easy WiFi Controller\\Scripts\\Core\\EasyWiFiController.cs:254 " System.SystemException

    Name Value Type
    ◢ Non-Public members
    IsTransient System.MissingMethodException: Attempted to access a missing method. System.Boolean
    RemoteStackTrace null System.String
    _HResult -2146233033 System.Int32
    _className "System.FormatException" System.String
    ▶ _data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary
    _dynamicMethods null System.Object
    _helpURL null System.String
    _innerException null System.Exception
    _message "Input string was not in a correct format." System.String
    _remoteStackIndex 0 System.Int32
    _remoteStackTraceString null System.String
    ▶ _safeSerializationManager {System.Runtime.Serialization.SafeSerializationManager} System.Runtime.Serialization.SafeSerializationManager
    _source "mscorlib" System.String
    ▶ _stackTrace System.IntPtr[21] System.Object
    _stackTraceString null System.String
    captured_traces null System.Diagnostics.StackTrace[]
    native_trace_ips null System.IntPtr[]
     
  42. Dirrogate

    Dirrogate

    Joined:
    Feb 18, 2014
    Posts:
    157
    @greggtwep16 My finger is almost on the trigger to buy the asset, but would like to know some crucial things
    My use case is:
    - I want to use the Gyro and accelerometer to pan/tilt a unity camera.
    - At the same time, using Unity WebRTC and Unity Webstreaming (these are packages by Unity) the unity game view is streamed to an android cellphone.

    My questions are:
    1. Is the "client" an apk we have to create and sideload to a cellphone/tablet?
    2. will the client be able to run in the "background" on android, if I switch to say the chrome browser on the same android phone (so that the Unity Webstreaming view can be seen)
    In effect what I want to do is, using the Unity WebRTC/Webstreaming package and demo, stream the current Unity scene to my cellphone. - This already works.
    In the background, I want to use the gyro/accelerometer to send pan/tilt values back (as a sort of gyro mouse)

    Looking forward to making this happen'
     
  43. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Definitely still seems like a parsing issue. Did you rebuild both the client and the server when you changed the constant to make sure they are in sync?
     
  44. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Running in background does work on PC reliably but in my experience it does not do so reliably on most phones (a few do but many more just suspend the app). You could certainly test out this on your phone with a simple counter Unity app and see if it is still counting when you're in Chrome, but chances are it will stop counting until you return. For my test phones almost all older ones just suspend the app and only a few newer ones run both at the same time.
     
  45. sorata84

    sorata84

    Joined:
    Feb 4, 2016
    Posts:
    5
    hi, your package so lovely, i just wanna know can this package do this things?
    1. i start the server using tv
    2. then i start client using phone
    3. can i get response from server to client that call a "gameover" scene at client
    Thanks
     
  46. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Depends on what the "TV" is. If by TV you mean apple tv, fire tv, or a platform that can run Unity apps then yes but if not no. EWC requires both ends run Unity apps to communicate with eachother. As far as loading a scene you'd likely just use a simple data control like a bool or a string and when set to the value you want then you'd load that scene.
     
  47. sorata84

    sorata84

    Joined:
    Feb 4, 2016
    Posts:
    5
    thanks for the answer, of course i mean TV like apple TV, or android TV, can you explain more detail the pseudocode that EWC can do the thing?

    *server sent code that game is over, then client receive the code and play "gameover" scene*

    Thanks
     
  48. davidjfranco

    davidjfranco

    Joined:
    Oct 9, 2014
    Posts:
    23
    Hi there :) 2 quick questions
    1) could you quickly explain an example of using a data controller, i've tried setting up the client and server on an Int, with a function to trigger it but it's hanging unity. I'd also like to know how you pull out the data on the server side, it seems relatively straight forward to send the Int using SetValue on the client, but where does it get stored when it is heard by the server script?
    2) i had a problem using port 2015, it said port in use, so i switched both to 2016 which works, but do you have any recommendations on how to scan a few ports for a connection for my end user? should i just build an option for it?

    thanks!
     
  49. katelu

    katelu

    Joined:
    Jun 24, 2020
    Posts:
    1
    Hi!

    Does this asset support non-local networking or plan to support it soon? This would be really useful for a project my friend and I are working on, but we would ideally like people to connect to the game and play even if they aren't on the same Wifi network.

    Thanks!
     
  50. Fernandxor

    Fernandxor

    Joined:
    Oct 13, 2014
    Posts:
    23
    The asset doesn't seem to work with Unity 2019.3.f9 using Android 9 device (Redmi Note 7) as client and windows10 PC as server, running the Steering Wheel sample. Wifi setup ok, everything should be fine, but not at all. No connection at all, no errors.

    The thing is past year I got it working with my older Android 6 device.

    [EDIT] checked again using another PC as client and discovered that Windows Firewall was taking down communication between both Server and Client.

    [EDIT 2] Another problem I was struggling with is that const SPLITMESSAGE_COMMA character has changed from "~" to "," on recent versions. Changed back to "~" and worked again :p
     
    Last edited: Jul 4, 2020