Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.24 KB

File metadata and controls

46 lines (35 loc) · 2.24 KB

GlassMessagingPython

The socket server to communicator with HoloLens2 in the Unity App

Installation

  • Make sure python3 is installed (tested on Win11)
  • Install the library dependencies (Hint: You can install all in one command using pip install pynput pandas python-Levenshtein opencv-python python-telegram-bot --pre)
  • Create a file telegram_token.json with Telegram bot token (Note: json format must be correct) if you want to test with Telegram also (if only HoloLens2 is needed, this is optional)
    • {
      "token": "XXXXX",
      "ip": "IP_ADDRESS_OF_PHONE_APP"
      }
  • Run chat_communication.py (python chat_communication.py)
  • Select the participant id (e.g., p1) and session id (e.g., 1) according to study settings (e.g., participant_config.py)

HoloLens app

  • Install the corresponding mixed reality app in GlassMessagingUnity
  • Disable SSL for recording videos (Device Portal -> System -> Preference -> SSL connection)

Phone apps

  • Install Telegram and create the contact list via Telegram bot (create the Group with the contact name and Telegram bot, give the bot admin rights, and remove the real person)
  • Update the Telegram Group ID in chat_data.py (line 317, PLATFORM_PHONE_CONVERSATION_IDS)
  • Start the Telegram
  • Start the Android app in NIPGlass
  • Keyboard config see

Run the application (sever)

  • Connect the computer (server that runs this code) and HoloLens to the same PRIVATE network (e.g., your phone's hotspot)
  • Identify the IP address of the computer/server
  • Configure the HoloLens to support the IP address of the computer/server (see GlassMessagingUnity)

Ring mouse

  • Model: Sanwa Supply 400-MA077 (Sanwa Ring Mouse 2)
  • See key mapping