Search Unity

[Released 2.4.4] MNF : Mobile & Network & Framework

Discussion in 'Assets and Asset Store' started by MNF_Devloper, Feb 11, 2016.

  1. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, johaswe.

    MNF worked to operate in UWP environment.
    But I have been testing for a long time and will check again.
    The xbox test failed because of the lack of equipment.

    If MNF works well in UWP environment, I will provide MNF voucher if you want. Is it possible to check if it works well on xbox?

    Have a good day :D
     
  2. johaswe

    johaswe

    Joined:
    Sep 13, 2018
    Posts:
    28
    Hello!
    Thanks! Yes absolutely i Will do some xbox tests for you if you like. Just pm the voucher if you want.
    Looking forward to test multiplayer quiz with MNF.
    Regards
     
    MNF_Devloper likes this.
  3. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, johaswe.

    Sorry for the late reply.
    If you let me know your email, I will send you a voucher.
    Thank you.

    Have a good day :D
     
  4. johaswe

    johaswe

    Joined:
    Sep 13, 2018
    Posts:
    28
    Hello,

    No problem, i sent my mail in pm.
    I Will test and let you know.

    Kind regards
     
    MNF_Devloper likes this.
  5. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Ah, Thanks :D
    I sent MNF voucher.

    Have a good day :D
     
  6. Aracon

    Aracon

    Joined:
    Aug 16, 2018
    Posts:
    16
    Help me, please, with this problem: I am trying to show list of connected clients in server app.
    I added class for keeping list of clients:
    Code (CSharp):
    1. public class ConnectionsManagerHelper : Singleton<ConnectionsManagerHelper>
    2. {
    3.     public GameObject addrList;
    4.  
    5.     private Dictionary<string, bool> addrStatus = new Dictionary<string, bool>();
    6.  
    7.     public void OnConnected(string address)
    8.     {
    9.         if (!addrStatus.ContainsKey(address) || !addrStatus[address])
    10.         {
    11.             addrStatus[address] = true;
    12.         }
    13.     }
    14.  
    15.     public void OnDisconnected(string address)
    16.     {
    17.         addrStatus[address] = false;
    18.     }
    19.  
    20.  
    21. }
    and then I try to add clients when they connect (my app is based on VideoPlay example)

    Code (CSharp):
    1. using MNF;
    2.  
    3. public class VideoPlayServerSession : JsonSession
    4. {
    5.     public override int OnAccept()
    6.     {
    7.         LogManager.Instance.Write("OnAccept : {0}:{1}", this.ToString(), this.GetType());
    8.         TcpHelper.Instance.AddClientSession(this.GetHashCode(), this);
    9.         return 0;
    10.     }
    11.  
    12.     // Connection
    13.     public override int OnConnectSuccess()
    14.     {
    15.         ConnectionsManagerHelper.Instance.OnConnected(this.EndPoint.Address.ToString());
    16.         return base.OnConnectSuccess();
    17.     }
    18.  
    19.     public override int OnDisconnect()
    20.     {
    21.         LogManager.Instance.Write("onDisconnect : {0}:{1}", this.ToString(), this.GetType());
    22.         TcpHelper.Instance.RemoveClientSession(this);
    23.      
    24.         // Disconnect
    25.         ConnectionsManagerHelper.Instance.OnDisconnected(this.EndPoint.Address.ToString());
    26.         return 0;
    27.     }
    28. }
    But something goes wrong, and I do not see when clients are connected.
    Is something wrong in my code?
     
    MNF_Devloper likes this.
  7. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Aracon.

    To receive client connection events from the server, you must use your code in the OnAccept () function.

    OnAccept () when the client connects to the server, and OnConnected () when the client connects to the server.

    Code (CSharp):
    1. using MNF;
    2.  
    3. public class VideoPlayServerSession : JsonSession
    4. {
    5.     public override int OnAccept()
    6.     {
    7.         LogManager.Instance.Write("OnAccept : {0}:{1}", this.ToString(), this.GetType());
    8.         ConnectionsManagerHelper.Instance.OnConnected(this.EndPoint.Address.ToString());
    9.         TcpHelper.Instance.AddClientSession(this.GetHashCode(), this);
    10.         return 0;
    11.     }
    12.  
    13.     public override int OnDisconnect()
    14.     {
    15.         LogManager.Instance.Write("onDisconnect : {0}:{1}", this.ToString(), this.GetType());
    16.         TcpHelper.Instance.RemoveClientSession(this);
    17.    
    18.         // Disconnect
    19.         ConnectionsManagerHelper.Instance.OnDisconnected(this.EndPoint.Address.ToString());
    20.         return 0;
    21.     }
    22. }
    Have a good day :D
     
  8. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    @MNF_Devloper is there any way to send chat messages from Server to Server in ChatServer example?
     
    MNF_Devloper likes this.
  9. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, sagarkar.

    It is possible to send chat messages from the server to the server.
    MNF can use both server and client simultaneously.

    There is no example to refer to, but you can make it by referring to the existing example.

    If you need an example, you can make it by telling how it works.
     
    planetmatrix likes this.
  10. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    I tried a lot of ways with no success,

    Would you please guide me with the use case:

    Server 1 with 2 client
    Server 2 with 4 clients.
    I want server 1 to communicate/send messages to server 2 and vice versa.

    Thanks
     
    Last edited: Nov 23, 2018
    MNF_Devloper likes this.
  11. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, sagarkar.

    There are a few questions to ask before implementing to your requirements.
    1. What network environment will be used for server-to-server communication?
    2. Is there only two server-to-server communications, server 1 and server 2?

    I think the development direction will be decided according to your answer.

    Currently I am developing and expecting that your app will run in the following environment.
    1. Server-to-server communication is limited to one or two servers
    2. Server and client-powered environments can use the same Wi-Fi environment

    I will wait for your reply. Have a good day :D
     
    Last edited: Nov 30, 2018
    planetmatrix likes this.
  12. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    Many thanks for your help, much appreciated.

    1. Same WiFi Network
    2. There can be multiple server-client sessions.

    I am also facing an error when trying to restart the lookaround.instance.start. Stopping it by lookaround.instance.stop.
    error "ObjectDisposedException"
    Is there any specific way to restart lookaround instance?

    Have a wonderful day ahead.
     
    Last edited: Dec 1, 2018
    MNF_Devloper likes this.
  13. Deleted User

    Deleted User

    Guest

    The Connector.net is supported by Windows Store and IOS ?
     
    MNF_Devloper likes this.
  14. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Shovelcat.

    On iOS, I confirmed that mysql is available via connector.net.
    However, I did not check whether UWP works normally.
     
  15. DevionNL

    DevionNL

    Joined:
    Jun 29, 2018
    Posts:
    7
    Just to verify before I buy;

    1) With this I can setup a connection using WIFI Direct to a device on both Android and IOS devices?
    2) Is there a disconnect button? (Disconnect, close, etc. That allows the phone to switch to different WIFI or 3/4G) (The device we connect to sends data but doesn't have internet access)
    3) I assume I can send raw bytes / receive bytes (TCP packets) easily from the connected device?

    Thanks!
     
    MNF_Devloper likes this.
  16. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, sagarkar.

    Sorry for the late reply.

    The functionality you requested is implemented and tested.

    Server and client communications are implemented in TCP,
    Server-to-server communication is implemented in LookAround (Mulitcast).

    It took a long time because of personal circumstances.
    I will update it as soon as possible.

    [Server]
    client.JPG

    [Client]
    serer.JPG

    Have a nice weekend.
     
    planetmatrix likes this.
  17. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, sagarkar.

    I finally finished my work, and I asked sotre to update.

    Unity may be slow to update,
    Please let me know your email and I will send my assets separately.

    Sorry for late. And thank you for making a good example.

    [Windows Binary]

    aa.JPG
     
    Last edited: Dec 18, 2018
  18. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Pierre.

    To send a simple chat message through LookAround, you can do the following:

    Define Chat Message.
    Code (CSharp):
    1.  
    2.     public class MultiChatMessageDefine
    3.     {
    4.         public enum MESSAGES
    5.         {
    6.             CHAT,
    7.         }
    8.  
    9.         [Serializable]
    10.         public class PACK_CHAT
    11.         {
    12.             public string nickname;
    13.             public string chat;
    14.         }
    15.     }
    16.  
    Send Message
    Code (CSharp):
    1.  
    2.     var chatMessage = new MultiChatMessageDefine.PACK_CHAT();
    3.     chatMessage.chat = "test chat message";
    4.     LookAround.Instance.SendMessage((int)MultiChatMessageDefine.MESSAGES.CHAT, chaMessage);
    5.  
    Receive Message
    Code (CSharp):
    1.  
    2. void Update()
    3. {
    4.     var reponseMessage = LookAround.Instance.PopReponseMessage();
    5.     while (reponseMessage != null)
    6.     {
    7.         if (reponseMessage.IsMine == true)
    8.             continue;
    9.  
    10.         switch ((MultiChatMessageDefine.MESSAGES)reponseMessage.ID)
    11.         {
    12.             case MultiChatMessageDefine.MESSAGES.CHAT:
    13.                 {
    14.                     var chat = reponseMessage.Message as MultiChatMessageDefine.PACK_CHAT;
    15.                     Debug.Log(chat.chat);
    16.                 }
    17.                 break;
    18.         }
    19.         reponseMessage = LookAround.Instance.PopReponseMessage();
    20.     }
    21. }
    22.  
     
  19. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, DevionNL.

    Sorry I'm late.

    1) I know that WiFi Direct is not available on iOS. I do not expect it to connect to iOS.
    Android is not possible or possible depending on the manufacturer.

    2) I do not know exactly what the disconnect button means.
    Please give a little more detailed explanation.

    3) MNF can basically exchange binary format data and json format data, and it is included in the example.

    Have a good day :D
     
  20. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Everyone.

    MNF has updated 2.3.1
    • Update Unity 2018.2.18f1
    • Add Multi Chat Example (Thanks to sagarkar for asking for a good example)
    • Fixed some bugs
    Have a good day :D
     
    Last edited: Dec 20, 2018
    planetmatrix likes this.
  21. planetmatrix

    planetmatrix

    Joined:
    Dec 8, 2015
    Posts:
    38
    Great Work!

    I am also facing an error when trying to restart the lookaround.instance.start. Stopping it by lookaround.instance.stop.
    error "ObjectDisposedException"
    Is there any specific way to restart lookaround instance?

    Have a wonderful day.
     
    MNF_Devloper likes this.
  22. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, sagarkar.

    I am glad that the new example works well.

    I tried putting Start / Stop function in LookAround example 6 and it works well.

    I updated it to the Unity Asset Store,
    I will send the package to you by email.

    Have a good day :D
     
  23. DevionNL

    DevionNL

    Joined:
    Jun 29, 2018
    Posts:
    7
    I just bought MNF but I'm confused on how to connect to a given WIFI device - The asset store page says - Search for other devices on Wi-Fi - Send Message other devices on Wi-Fi"" but where are the connect options, am I missing something?
     
    MNF_Devloper likes this.
  24. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, DevionNL.

    Look at MNF's LookAround example and it will help you.
    The LookAround example allows you to search for other devices in the same Wi-Fi and send messages.

    Have a good day :D
     
  25. DevionNL

    DevionNL

    Joined:
    Jun 29, 2018
    Posts:
    7
    "other devices in the same Wi-Fi" .. but not Connect to WIFI?
    (I have this feeling that MNF is not going to work for me .... )
     
    MNF_Devloper likes this.
  26. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hm.. Well .. I would like to see the log of the device and the network environment you tested, is it possible?
     
  27. Aracon

    Aracon

    Joined:
    Aug 16, 2018
    Posts:
    16
    Help, please: How can I detect when client disconnects from server (for example, when phone with server app loses wifi connection) on client-side? I am trying to make auto-reconnection. My app is based VideoPlay example.
     
    MNF_Devloper likes this.
  28. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Aracon.

    It's been a long time.

    The function you are talking about is to handle the connection termination event of the MNF client session.

    If you want, I will add the reconnection feature to the VideoPlay example and update it.
    And if possible, I will add the reconnection function as the base module of MNF.
     
    Aracon likes this.
  29. Aracon

    Aracon

    Joined:
    Aug 16, 2018
    Posts:
    16
    It would be great! And helpful for other users.
     
    MNF_Devloper likes this.
  30. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, sagarkar.

    Did you get updates from the Asset Store?

    I wonder if it works well.

    If you have any problems, please feel free to talk to me anytime.
     
  31. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Aracon.

    When the client is disconnected from the server, it is finished connecting to the server again.

    Initially, I tried to put it into the MNF internal function,
    It is anticipated that there will be problems with the internal structure design and users.
    I made it into an external function.

    If you have any questions after confirming that I will post the code here, please ask me here.

    I will give the complete code in the mnf package. (Conversations)

    Code (CSharp):
    1.  
    2.     protocol.cs
    3.  
    4.     public class VideoPlayMessageDefine
    5.     {
    6.         public enum ENUM_CS_
    7.         {
    8.             CS_PING,
    9.         }
    10.  
    11.         public enum ENUM_SC_
    12.         {
    13.             SC_PONG,
    14.             SC_VIDEO_CONTROL,
    15.         }
    16.  
    17.         public enum VIDEO_CONTROL
    18.         {
    19.             PLAY,
    20.             PAUSE,
    21.             STOP,
    22.         }
    23.  
    24.         [Serializable]
    25.         public class PACK_SC_VIDEO_CONTROL
    26.         {
    27.             public VIDEO_CONTROL control;
    28.             public long reservedTime;
    29.             public double playTime;
    30.         }
    31.  
    32.         [Serializable]
    33.         public class PACK_CS_PING
    34.         {
    35.         }
    36.  
    37.         [Serializable]
    38.         public class PACK_SC_PONG
    39.         {
    40.         }
    41.     }
    Code (CSharp):
    1.  
    2. VideoPlayClientMessageDispatcher.cs
    3.  
    4. using System;
    5. using UnityEngine;
    6. using UnityEngine.UI;
    7. using MNF_Common;
    8. using MNF;
    9.  
    10. public class VideoPlayClientMessageDispatcher : DefaultDispatchHelper<VideoPlayClientSession, VideoPlayMessageDefine, VideoPlayMessageDefine.ENUM_SC_>
    11. {
    12.     VideoPlay videoPlayer = null;
    13.  
    14.     int onSC_VIDEO_CONTROL(VideoPlayClientSession session, object message)
    15.     {
    16.         var foundVideoPlayObject = GameObject.Find("VideoPlayer").GetComponentsInChildren<VideoPlay>();
    17.         if (foundVideoPlayObject.Length == 0)
    18.             return 0;
    19.         videoPlayer = foundVideoPlayObject[0];
    20.  
    21.         var videoControl = (VideoPlayMessageDefine.PACK_SC_VIDEO_CONTROL)message;
    22.         var convertedTime = Utility.UnixTimeToDateTime(videoControl.reservedTime);
    23.         LogManager.Instance.Write("control:{0} reservedTime:({1} -> {2}) NowTime:{3} PlayTime:{4}", videoControl.control, videoControl.reservedTime, convertedTime, DateTime.Now, videoControl.playTime);
    24.  
    25.         switch (videoControl.control)
    26.         {
    27.             case VideoPlayMessageDefine.VIDEO_CONTROL.PLAY:
    28.                 videoPlayer.SetPlayTime(videoControl.playTime);
    29.                 videoPlayer.OnPlay(convertedTime);
    30.                 break;
    31.  
    32.             case VideoPlayMessageDefine.VIDEO_CONTROL.PAUSE:
    33.                 videoPlayer.SetPlayTime(videoControl.playTime);
    34.                 videoPlayer.OnPause(convertedTime);
    35.                 break;
    36.  
    37.             case VideoPlayMessageDefine.VIDEO_CONTROL.STOP:
    38.                 videoPlayer.OnStop(convertedTime);
    39.                 break;
    40.         }
    41.         return 0;
    42.     }
    43.  
    44.     int onSC_PONG(VideoPlayClientSession session, object message)
    45.     {
    46.         var foundEventSystemButtonTrrigerObject = GameObject.Find("EventSystem").GetComponentsInChildren<VideoPlayClientButtonTrigger>();
    47.         if (foundEventSystemButtonTrrigerObject.Length == 0)
    48.             return 0;
    49.  
    50.         var eventSystemButtonTrriger = foundEventSystemButtonTrrigerObject[0];
    51.         eventSystemButtonTrriger.UpdateHeartbeatCheckTime();
    52.  
    53.         return 0;
    54.     }
    55. }
    Code (CSharp):
    1.  
    2. VideoPlayClientButtonTrigger.cs
    3.  
    4. using System;
    5. using System.Collections;
    6. using UnityEngine;
    7. using UnityEngine.UI;
    8. using MNF;
    9. using MNF_Common;
    10.  
    11. public class VideoPlayClientButtonTrigger : MonoBehaviour
    12. {
    13.     bool isRunning = false;
    14.     DateTime lastReceivedTime;
    15.  
    16.     public InputField serverIP;
    17.     public InputField serverPort;
    18.  
    19.     VideoPlayClientSession session = null;
    20.  
    21.     public void Awake()
    22.     {
    23.         LogManager.Instance.SetLogWriter(new UnityLogWriter());
    24.         if (LogManager.Instance.Init() == false)
    25.             Debug.Log("LogWriter init failed");
    26.     }
    27.  
    28.     void Release()
    29.     {
    30.         isRunning = false;
    31.         Debug.Log("Application ending after " + Time.time + " seconds");
    32.         LookAround.Instance.Stop();
    33.         TcpHelper.Instance.Stop();
    34.         LogManager.Instance.Release();    
    35.     }
    36.  
    37.     void OnDestroy()
    38.     {
    39.         Release();
    40.     }
    41.  
    42.     void OnApplicationQuit()
    43.     {
    44.         Release();
    45.     }
    46.  
    47.     void Update()
    48.     {
    49.         TcpHelper.Instance.DipatchNetworkInterMessage();
    50.     }
    51.  
    52.     public void OnStartClient()
    53.     {
    54.         LookAround.Instance.Start(serverPort.text, false);
    55.  
    56.         int maxTryCount = 5;
    57.         int tryCount = 0;
    58.         while (LookAround.Instance.IsFoundServer == false)
    59.         {
    60.             if (tryCount >= maxTryCount)
    61.             {
    62.                 LogManager.Instance.WriteError("Failed to find server!!");
    63.                 return;
    64.             }
    65.  
    66.             Utility.Sleep(1000);
    67.             ++tryCount;
    68.         }
    69.  
    70.         serverIP.text = LookAround.Instance.ServerIP;
    71.         serverPort.text = LookAround.Instance.ServerPort;
    72.  
    73.         if (TcpHelper.Instance.Start(false) == false)
    74.         {
    75.             LogManager.Instance.WriteError("TcpHelper.Instance.run() failed");
    76.             return;
    77.         }
    78.  
    79.         if (ConnectToServer() == false)
    80.         {
    81.             LogManager.Instance.WriteError("TcpHelper.Instance.AsyncConnect({0}:{1}) failed",
    82.                 serverIP.text, serverPort.text);
    83.             return;
    84.         }
    85.  
    86.         LogManager.Instance.Write("Start Client Success");
    87.  
    88.         isRunning = true;
    89.         StartCoroutine("CheckHeartbeat");
    90.     }
    91.    
    92.     IEnumerator CheckHeartbeat()
    93.     {
    94.         lastReceivedTime = DateTime.Now;
    95.  
    96.         while (isRunning == true)
    97.         {
    98.             if (lastReceivedTime >= DateTime.Now.AddSeconds(-5.0))
    99.             {
    100.                 if ((session != null) && (session.IsConnected == true))
    101.                 {
    102.                     var ping = new VideoPlayMessageDefine.PACK_CS_PING();
    103.                     session.AsyncSend((int)VideoPlayMessageDefine.ENUM_CS_.CS_PING, ping);
    104.                     LogManager.Instance.WriteDebug("send ping to server");
    105.                 }
    106.  
    107.                 yield return new WaitForSeconds(1.0f);
    108.             }
    109.             else
    110.             {
    111.                 // disconnect from server
    112.                 if (session != null)
    113.                 {
    114.                     LogManager.Instance.WriteDebug("disconnect from server");
    115.                     session.Disconnect();
    116.                     session = null;
    117.                     LogManager.Instance.WriteDebug("waitting 5 sec ...");
    118.                     yield return new WaitForSeconds(5.0f);
    119.  
    120.                     LogManager.Instance.WriteDebug("reconnect to server");
    121.                     if (ConnectToServer() == true)
    122.                     {
    123.                         LogManager.Instance.WriteDebug("reconnect request successed");
    124.                         lastReceivedTime = DateTime.Now;
    125.                     }
    126.                     else
    127.                     {
    128.                         LogManager.Instance.WriteError("reconnect request failed");
    129.                     }
    130.                 }
    131.             }
    132.         }
    133.     }
    134.  
    135.     public void UpdateHeartbeatCheckTime()
    136.     {
    137.         lastReceivedTime = DateTime.Now;
    138.         LogManager.Instance.WriteError("update heartbeat check time");
    139.     }
    140.  
    141.     public bool ConnectToServer()
    142.     {
    143.         session = TcpHelper.Instance.AsyncConnect<VideoPlayClientSession, VideoPlayClientMessageDispatcher>(
    144.             serverIP.text, serverPort.text);
    145.  
    146.         return (session != null);
    147.     }
    148. }
    149.  
    Code (CSharp):
    1.  
    2. VideoPlayServerMessageDispatcher.cs
    3.  
    4. using MNF_Common;
    5. using MNF;
    6.  
    7. public class VideoPlayServerMessageDispatcher : DefaultDispatchHelper<VideoPlayServerSession, VideoPlayMessageDefine, VideoPlayMessageDefine.ENUM_CS_>
    8. {
    9.     int onCS_PING(VideoPlayServerSession session, object message)
    10.     {
    11.         var pong = new VideoPlayMessageDefine.PACK_SC_PONG();
    12.         session.AsyncSend((int)VideoPlayMessageDefine.ENUM_SC_.SC_PONG, pong);
    13.  
    14.         return 0;
    15.     }
    16. }
     
  32. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Everyone.

    MNF has updated 2.3.3
    • Update VideoPlay Example (Client auto reconnect to server)
    Have a good day :D
     
  33. yuhacrows

    yuhacrows

    Joined:
    Dec 18, 2014
    Posts:
    11
    Hi

    Sorry for my bad english.
    Thanks for the update.I have the same probrem.:)
    And I have another problem,I can't trans file completely in two android phone use wifi in most situation.
    It will stop at 1% or 99%.
    I have success trans a 96mb MP4 file and some small PNG file.(not ererytime can success)
    I want to use MNF to trans mp4 file(1mb~500mb).

    Hope to fix this,thank you.

    Yuha
     
    MNF_Devloper likes this.
  34. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, yuhacrows.

    Thank you for using MNF.

    Is there a problem with not transferring files within the same wi-fi?

    I wonder what your test environment is like.
    If you tell me about the test environment, I think I can get a better idea of what the problem is with file transfer.

    And I would be grateful if you gave me a log at the time of testing.
     
  35. Aracon

    Aracon

    Joined:
    Aug 16, 2018
    Posts:
    16
    Thanks a lot for this update and example! I will return to my job at Jan 28 and will try this in my project.
     
    MNF_Devloper likes this.
  36. yuhacrows

    yuhacrows

    Joined:
    Dec 18, 2014
    Posts:
    11
    Hi

    I just use in original MNF project.Did not change anything.Only change the trans file.I change a mp4 file name to FilleTransImage.bytes And build apk.
    I can trans file from pc(in unity edite) to my android phone.Can't trans file from android phone to PC or another phone,it will just stop in.here is the log.

    LOG_TYPE_NORMAL : IP:192.168.31.224 Port:5100
    UnityEngine.Debug:Log(Object)
    UnityLogWriter:OnWrite(ENUM_LOG_TYPE, String) (at Assets/MNF/Script/Advanced/0_Common/UnityLogWriter.cs:17)
    MNF.LogManager:Write(String, Object[]) (at Assets/MNF/Library/Utility/LogManager.cs:112)
    MNF.LookAround:ReceiveCallback(IAsyncResult) (at Assets/MNF/Library/Utility/LookAround.cs:366)
    System.Net.Sockets.Worker:ReceiveFrom()


    LOG_TYPE_EXCEPTION : TCPSession(SocketAsyncEventArgs) recv callback proc failed
    **[Exception]**System.Exception: TCPSession(-2087613440 copy received data(8760) failed
    at MNF.AsyncIO.ProcessReceive (System.Net.Sockets.SocketAsyncEventArgs e) [0x00175] in D:\Unity_WorkSapce\6dof\shen\MNFNew\Assets\MNF\Library\Core\AsyncIO.cs:206
    UnityEngine.Debug:Log(Object)
    UnityLogWriter:OnWrite(ENUM_LOG_TYPE, String) (at Assets/MNF/Script/Advanced/0_Common/UnityLogWriter.cs:17)
    MNF.LogManager:WriteException(Exception, String, Object[]) (at Assets/MNF/Library/Utility/LogManager.cs:167)
    MNF.AsyncIO:processReceive(SocketAsyncEventArgs) (at Assets/MNF/Library/Core/AsyncIO.cs:217)
    MNF.AsyncIO:IO_Completed(Object, SocketAsyncEventArgs) (at Assets/MNF/Library/Core/AsyncIO.cs:58)
    System.Net.Sockets.SocketAsyncEventArgs:ReceiveCallback()


    LOG_TYPE_SYSTEM : TCPSession(-2087613440) disconnect
    UnityEngine.Debug:Log(Object)
    UnityLogWriter:OnWrite(ENUM_LOG_TYPE, String) (at Assets/MNF/Script/Advanced/0_Common/UnityLogWriter.cs:17)
    MNF.LogManager:WriteSystem(String, Object[]) (at Assets/MNF/Library/Utility/LogManager.cs:134)
    MNF.AsyncIO:procSessionDisconnect(TCPSession) (at Assets/MNF/Library/Core/AsyncIO.cs:371)
    MNF.AsyncIO:processReceive(SocketAsyncEventArgs) (at Assets/MNF/Library/Core/AsyncIO.cs:220)
    MNF.AsyncIO:IO_Completed(Object, SocketAsyncEventArgs) (at Assets/MNF/Library/Core/AsyncIO.cs:58)
    System.Net.Sockets.SocketAsyncEventArgs:ReceiveCallback()

    LOG_TYPE_NORMAL : onDisconnect : -2087613440:FileTransClientSession
    UnityEngine.Debug:Log(Object)
    UnityLogWriter:OnWrite(ENUM_LOG_TYPE, String) (at Assets/MNF/Script/Advanced/0_Common/UnityLogWriter.cs:17)
    MNF.LogManager:Write(String, Object[]) (at Assets/MNF/Library/Utility/LogManager.cs:112)
    FileTransClientSession:OnDisconnect() (at Assets/MNF/Script/Advanced/7_FileTrans/FileTransClientSession.cs:23)
    MNF.SystemMessage:execute() (at Assets/MNF/Library/MessageDispatch/SystemMessageDispatcher.cs:45)
    MNF.Dispatcher:dispatchMessage(Boolean) (at Assets/MNF/Library/MessageDispatch/Dispatcher.cs:56)
    MNF.TcpHelper:DipatchNetworkInterMessage() (at Assets/MNF/Library/Helper/TcpHelper.cs:250)
    FileTransClientButtonTrigger:Update() (at Assets/MNF/Script/Advanced/7_FileTrans/FileTransClientButtonTrigger.cs:43)


    Hope to fix.Thank you
    And I can't receive file on android 9 system when pc trans file to a android 9 phone.

    Yuha
     
    MNF_Devloper likes this.
  37. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Yuha.

    I checked the log when the problem occurred.

    The log shows that the connection between the server and the client is broken.

    Android phone seems to be a server, I wonder if it is right.

    And do the examples work fine except for the 7th example?

    Let's go through the Android test.

    Thank you for talking about the problem.

    Have a good day :D
     
  38. yuhacrows

    yuhacrows

    Joined:
    Dec 18, 2014
    Posts:
    11
    Hi

    Yes,the android phone is server.I want to trans file between android and ios.
    And some file can be trans,some can't.It's not a file size problen.
    hope to fix soon,It's very urgent to me.thank you
     
    MNF_Devloper likes this.
  39. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, yuhacrows.

    I just tested transferring files to two Android devices.

    I confirmed that there was a problem.

    The MNF core module has changed and seems to have a problem.

    I will fix the problem as soon as possible.

    Thank you very much for reporting this issue.
     
    Last edited: Jan 27, 2019
  40. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, yuhacrows.

    Fixed the expected problem of MNF.

    I will build the modified MNF into Windows and Android APK and place it in the shared folder.

    I would like to ask if you can download and work well.

    Download MNF 2.3.4 Example (APK / Windows)
     
  41. yuhacrows

    yuhacrows

    Joined:
    Dec 18, 2014
    Posts:
    11
    thank you.I will test soon.
     
    MNF_Devloper likes this.
  42. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, Everyone.

    MNF has updated 2.3.4
    • Update FileTrans Example
    • Update Core
    Have a good day :D
     
  43. yuhacrows

    yuhacrows

    Joined:
    Dec 18, 2014
    Posts:
    11
    Hi

    It's still not work for me.I download your apk(android 7.0 and 8.0).
    both of them can't trans that filetransimage to another android phone.

    Yuha
     
  44. yuhacrows

    yuhacrows

    Joined:
    Dec 18, 2014
    Posts:
    11
    And I update your package.Still the same.
     
    MNF_Devloper likes this.
  45. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, yuhacrows.

    I'm sorry it's not working yet.

    I would like to ask a little more detail to solve the problem.

    1. Test Equipment Model Name
    2. I wonder if such a problem occurs without modifying any of the MNF examples.

    It also requests changes to the file trans server and client log settings.

    Code (CSharp):
    1.  
    2.  
    3. FileTransClientButtonTrigger.cs, FileTransServerButtonTrigger.cs
    4.  
    5. public void Awake()
    6. {
    7.         LogManager.Instance.SetLogWriter(new UnityLogWriter(), (int)ENUM_LOG_TYPE.LOG_TYPE_ALL);
    8.         if (LogManager.Instance.Init() == false)
    9.             Debug.Log("LogWriter init failed");
    10. }
     
    Last edited: Feb 1, 2019
  46. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, yuhacrows.

    I reanalyzed the log you reported.
    And I thought about the problem scenario.

    1. The server sends the file to the client.
    2. The client's fps was too low to process the packets sent by the server quickly.
    3. The copy of the packet failed because the circular buffer was not emptied quickly.
    4. The connection between the server and the client has been lost due to a packet copy failure.

    If the above problem is true, a new file transfer module will be created.
    The file transfer module will only re-establish a connection between the server and the client,
    and will only transfer the files purely.

    I am sorry for the inconvenience of using MNF.
     
  47. yuhacrows

    yuhacrows

    Joined:
    Dec 18, 2014
    Posts:
    11
    Oh,That's great.
    Thanks for the coming update.
     
    MNF_Devloper likes this.
  48. edufurlaneto

    edufurlaneto

    Joined:
    Sep 18, 2017
    Posts:
    17
    Hi, I use Playmaker, but I am getting an error when installing MNF in my project. Seems MNF makes Playmaker stop work.
    Both Playmaker and MNF work fine alone.
    The error I am getting is:

    Assets/PlayMaker/Actions/UI/EventSystem/EventTriggerActionBase.cs(22,32): error CS0426: The nested type `Entry' does not exist in the type `EventTrigger'

    For some reason MNF makes EventTrigger stop working.
    Hope to fix.Thank you
     
    MNF_Devloper likes this.
  49. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    Hi, edufurlaneto.

    Sorry for the inconvenience of using MNF.

    I wonder what the build environment is.
    Share your build environment as a snapshot as shown in the image below.

    1.JPG
     
  50. MNF_Devloper

    MNF_Devloper

    Joined:
    Dec 22, 2015
    Posts:
    145
    I just bought Playmaker and tested it.

    After testing, there seems to be a problem because MNF and Playmaker have the same name in the script.
    2.JPG

    If you change the MNF script and class name as shown in the image below, we expect the problem to be resolved.

    ::: EventTrigger.cs -> LookAroundEventTrigger.cs
    3.JPG

    ::: class EventTrigger > class LookAroundEventTrigger
    4.JPG