Diva Wifi for OpenSim 0.9.2.* and later

Diva Canto provides the popular “Diva Distribution (D2)” precompiled version of OpenSim which includes a number of addon modules. One of these is called “Wifi” and provides a web front-end interface to OpenSim running in “Standalone” or “Grid mode with “Robust” services.

Wifi front end to Openvue Grid Wifi front end to AiLand Grid

Wifi is documented on the OpenSim Wiki at http://opensimulator.org/wiki/Wifi through which links can be found to Diva Canto’s download and source areas on Github. Wifi serves web pages which provide services such as:

  • Account creation, optionally controlled by the administrator
  • Configurable default avatars for new accounts
  • Account updates by both users and administrator
  • Account deletion by administrator
  • Password recovery via e-mail
  • Simple user inventory management

Wifi as an OpenSim Add-in

Wifi is provided as an “add-in” library. Diva Canto has provided a blog post which describes the new Wifi mechanism and how to build and configure it, mostly geared at Unix/Linux users.

Wifi for OpenSim Robust Grids for Windows Users

In case it is helpful to those running Robust grids under Windows, I describe here the mechanism I use to build, configure and run Wifi on our own grids.

  1. Download the OpenSim source distribution as a zip file from one of the following:

    and unzip the source code to a suitable location. Note there is a folder called “addon-modules” at the top level (same level as the “bin” directory) which only contains a README.

  2. Obtain the source of the Diva addons via

    and unzip it to a temporary area. Copy ONLY the contents of the “addon-modules” from that area into the main unzipped OpenSim directory top level addon-modules directory. Take care as there is another directory “bin/addon-modules” which is NOT the one you want to copy to.

  3. You may wish to alter some of the addon-module .cs files to remove warnings on compilation.
       ...\addon-modules\01DivaUtils\WebAppUtils.cs
               catch // (Exception e)
       occurs twice
    
       ...\addon-modules\21Wifi\WifiMain.cs
               catch // (InvalidOperationException e)
       occurs once
    
  4. The following Diva addon modules are required for Wifi to work… the others are optional for uses beyond the Wifi interface and may be omitted…
    • 00Data
    • 00DivaInterfaces
    • 01DivaUtils
    • 1DivaOpenSimServices
    • 20WifiScriptEngine
    • 21Wifi
       
  5. You can now build OpenSim as usual, and the addons will also be automatically compiled. E.g., in a Command Prompt shell “cd” (change directory) to the top level of the OpenSim unzipped directory and then run “runprebuild48.bat” followed by “compile.bat”. The resulting bin directory contains all you need and will have in it the addon Diva modules including Wifi.

  6. Wifi allows for extensive localisation with several provided languages and instructions on how to add further languages. A script is included in Wifi which creates a .dll file containing the resources used when the Wifi module starts up to populate the WifiPages area. This setup step uses a script that requires “ResGen.exe” and “al.exe” to be available to run from a console and usually that means a path to the latest version of ResGen.exe and al.exe needs to be on the “Path” environmental variable… e.g. on Windows 10 using .NET 4.8 these usually located in…
    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools
    So long as ResGen.exe and al.exe are accessible, which you can test by trying to run them in a Command prompt (cmd.exe), then run the script at addon-modules/21Wifi/Localization/make_languages.bat

  7. Before you run Robust.exe and OpenSim.exe, configure Wifi for your requirements by creating a bin/Wifi.ini file (but see the section “Disable Wifi in OpenSim.exe” below for a suggested improvement). A basis for your own bin/Wifi.ini file can be found in addon-modules/21Wifi/Wifi.ini. Since Wifi.ini sets Wifi as disabled by default, you will have to explicitly enable it and change necessary information to access your OpenSim data base, set your administrator avatar name and e-mail, etc.

  8. To allow tailoring of Wifi for your own grid, a directory “WifiPages” at the same level as the “bin” directory may be used where you can place specific *.html and any image/* files which will override the default equivalents in bin/WifiPages. The following pages can be overridden:
    • footer.html
    • header.html
    • links.html
    • splash.html
    • termsofservice.html
    • welcome.html
    • image/*

Disable Wifi in OpenSim.exe

With the default locations suggested in Robust.[HG.]ini.example and OpenSim.ini.example for the add-in configuration and registry locations, the addins are picked up by both Robust.exe and OpenSim.exe and use the same configuration for both. This means that if Wifi is enabled in Wifi.ini it runs in both Robust.exe and OpenSim.exe. This is not what is wanted for a grid and means that Wifi is served on the OpenSim default port (usually :9000) as well as the grid services port (usually :8002).

Hence, the following is the configuration used on Openvue and AiLand grids to allow for separate enabling of Wifi for Robust.exe and disabling Wifi for OpenSim.exe. Wifi.ini is MOVED from bin/Wifi.ini to config-addon-robust/Wifi.ini. These configuration settings may be useful as a basis for what others might wish to use…

-------- Robust.[HG].ini ----------------------
[Startup]
    RegistryLocation = "."
    ConfigDirectory = "./config-addon-robust"

-------- OpenSim.ini---------------------------
[Startup]
    RegistryLocation = "."
    ConfigDirectory = "./config-addon-opensim"

-------- config-addon-robust/Wifi.ini ---------
; Copied from Diva's Wifi.ini with [WifiService] Enabled = true
; and changes for your data base, admin avatar and grid environment
...

-------- config-addon-opensim/Wifi.ini --------
[WifiService]
	Enabled = false

Notes on the Diva.Data.MySQL.dll StorageProvider used by WiFi

The WiFi Module uses the tailored Diva.Data.MySQL.dll as the “StorageProvider”. The default StorageProvider = OpenSim.Data.MySQL.dll should be used for the normal Robust.exe services as configured in Robust.[HG.]ini. Wifi itself picks up the (still necessary) StorageProvider = Diva.Data.MySQL.dll separately from the settings in Wifi.ini.

Setting up the Default Avatars for Wifi

Using the provided example Wifi.ini file you have an indication that you can select one of three default appearances for newly created avatars set up via Wifi. But in a new environment you must set those avatars up first.

  1. Create the avatars with names “Female Avatar”, Male Avatar”, “Neutral Avatar”. and authorise them via the Wifi Admin is that is required.
  2. Login as each avatar in turn. They will usually appear as a cloud initially and then after a short while (depending on the version of OpenSim you are using) rezz to appear as “Ruth” wearing four basic body parts, new pants and new shirt. Note these parts come directly from the OpenSim Library and MUST NOT be worn in your final appearance for the default avatars. You can COPY these library parts into the avatar’s inventory if you wish, or create new body parts and clothing, but before you finish you should remove any items that show as “worn” that are located in the OpenSim Library as those will not rezz on avatars created based on these models.
  3. Create new body parts and clothing and edit them and/or add any other mesh, clothing, attachments or HUDs you wish to appear on the avatars.
  4. Note you can extend (or change the avatars names or labels) for the range of default appearances that are shown in Wifi and/or change the preselected default by altering Wifi.ini.
    ;; Syntax: AvatarAccount_<AvatarType> = "<FirstName> <LastName>"
    ;;         (replace spaces in <AvatarType> with underscore)
    AvatarAccount_Female="Female Avatar" 
    AvatarAccount_Male="Male Avatar" 
    AvatarAccount_Neutral="Neutral Avatar" 
    
    ;; Preselection for default avatar in new account registration 
    AvatarPreselection="Neutral"
  5. When you Create a new avatar via the Wifi web interface based on these predefined avatars the items worn will appear in the newly create avatar’s inventory under Clothes -> Default Avatar <AvatarType>.
This entry was posted in OpenSim and tagged , . Bookmark the permalink.