Opened 3 years ago

Closed 3 years ago

#8509 closed enhancement (fixed)

Write GLTF files directly to Quest 2 headset

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: moderate Milestone:
Component: VR Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

I'd like to have ChimeraX able to write GLTF files directly to a Quest 2 headset for viewing in a standalone GLTF viewer. I have a prototype viewer written in Unity.

On Windows the Quest 2 appears in Windows File Explorer under This PC and its file system can be navigated and files transferred by drag and drop. But it has no drive letter. The ChimeraX, FireFox and Microsoft Edge file save dialogs don't list the Quest 2 even though the web browsers are using native save dialog that has every other entry under This PC that is seen in Windows File Explorer.

Looking in Device Manager on Windows shows Quest 2 under "Portable Devices" and online on find an Windows Portable Device API that was originally for music players and allows file transfers.

https://learn.microsoft.com/en-us/windows/win32/windows-portable-devices

My guess is that is the API being used by File Explorer. It might be possible to use that API from ChimeraX and Python. But I want the file saving to also work on Mac.

It may be that the best solution is to transfer GLTF files from ChimeraX to Quest 2 via a cloud service such as Google Drive. ChimeraX can write to the user's Google Drive directory, and the Quest 2 can periodically (every 5 seconds) can Google Drive for new files.

Change History (4)

comment:1 by Tom Goddard, 3 years ago

I read online about transferring files wirelessly from laptop to quest using ftp with the Xplore File Manager android app providing the FTP server on the Quest. I tried this and ran into lots of problems. In the VizVault using wifi RBVIVR the quest assigned IP address is 169.230.21.238 but the Xplore app says the ftp server is running on 192.168.54.47, port 2222. I could not get ftp connect to either of these from the vizvault windows PC vive.cgl.ucsf.edu also connected to RBVIVR wifi. I did not disconnect the ethernet connection to vive in that test.

I tried the same thing at my home where the Quest IP address and ftp server IP address matched. Using Finder to connect to server with ftp://ip-address allowed connecting to the Quest and reading the Quest file system. But Finder cannot write files via ftp (a documented limitation). The ncftp app available from homebrew on the Mac always gave connection refused. FileZilla on the Mac could connect and read the files (I forgot to try writing), but is GUI only and for ChimeraX to use it I need it to be command-line. Ftp on my Ubuntu 20.02 could connect but reading a file from the Quest hung trying to "open data connection".

In summary, ftp did not work. Possibly a different ftp server on the Quest (there are others available) and ncftp on the Mac might work.

comment:2 by Tom Goddard, 3 years ago

Online I found that adb (Android debug bridge) can transfer files from a computer to the Quest wirelessly. I had seen adb used for side-loading apps using a usb cable. The usb cable still may be necessary initially to authenticate. But then adb commands

adb tcpip 5555
adb connect <quest-ip-address>

and then removing the usb cable allows adb to still transfer files with

adb push droptest3.glb /sdcard/Android/data/com.UCSF.Lookie/files

To check that the adb daemon sees the device use

adb devices

Adb is not installed on Windows or Mac by default so there is some extra trouble to install it. I installed from homebrew on Mac and used the version Unity installed on Windows

/cygdrive/c/Program Files/Unity/Hub/Editor/2022.2.5f1/Editor/Data/PlaybackEngines/AndroidPlayer/SDK/platform-tools/adb.exe

comment:3 by Tom Goddard, 3 years ago

Done.

Added socket code to Send to Quest tool and LookSee app so GLTF files can be sent without using adb.

comment:4 by Tom Goddard, 3 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.