Diva Wifi for OpenSim 0.9.1.0


Update 17-Nov-2019: The Diva Distribution (D2) and Wifi related addon-on modules were updated on 17-Nov-2019 to .NET 4.6 and 0.9.1.* compatibility. See https://github.com/Diva/diva-distribution. Please use that version of WiFi now. The following blog post content is left for guidance on how to build a grid based on 0.9.1.* Dev Master source where you wish to include the WiFi addon module…

OpenSim 0.9.1.0 changes the .NET Framework in use for compilation from 4.0 to 4.6. As at 12-Dec-2018 the sources for Diva’s addon modules are still based on .NET Framework 4.0 suitable for OpenSim versions up to the current stable 0.9.0.1. Small changes are needed to the *prebuild.xml files in those sources for Diva addon modules (and hence Wifi) to work with the latest versions of OpenSim.

First check the GitHub Diva source downloads directory as updates are likely once 0.9.1.0 is available as a stable OpenSim release.

Otherwise some helpful information and resources may be found in the section Update of Diva Addons for OpenSim 0.9.1.0 onwards near the end of this blog post…

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

Up to OpenSim 0.8.0, Wifi was available as an add on module via compiled .DLL libraries which could be enabled for Standalone and Grid setups. From OpenSim 0.8.1 onwards, a more flexible “add-in” library mechanism that was already in OpenSim has been improved and Wifi now is provided as an add-in under that mechanism. This does mean that the build and configuration process is different.

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 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. Update: 17-Nov-2019: Diva Distribution Addon Modules have now been updated for .NET Framework 4.6. So this step is unnecessary.
     
    • Prior to 17-Nov-2019, the version of Diva Wifi and related addons used frameworkVersion=”v4_0″. It was necessary to alter the prebuild.xml (plus prebuild.SQLite.xml and prebuild.MySQL.xml in 00Data) files in each directory to frameworkVersion=”v4_6″.
    • 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
      

    Otherwise some helpful information and resources may be found in the section Update of Diva Addons for OpenSim 0.9.1.0 onwards near the end of this blog post.

  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 “runprebuild.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” to be available to run from a console and usually that means a path to the latest version of ResGen.exe needs to be on the “Path” environmental variable… e.g. on Windows 10 using .NET 4.6.1 ResGen.exe is usually located in…
    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools
    So long as ResGen.exe is accessible, then run the script at addon-modules/21Wifi/Localization/make_languages.bat or .sh.

  7. Before you run Robust.exe and OpenSim.exe, configure Wifi for your requirements by editing bin/Wifi.ini (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. 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

Check your Data.MySQL.dll in Robust.[HG.]ini

In configurations for Wifi before the 0.8.1 add-in, Diva.Data.MySQL.dll was used as the “StorageProvider” both within the Wifi modules and for other Robust services. This is no longer necessary. The default StorageProvider = OpenSim.Data.MySQL.dll should be used for all normal Robust.exe services as configured in Robust.[HG.]ini as Wifi itself picks up the StorageProvider = Diva.Data.MySQL.dll separately from the settings in Wifi.ini.

Update of Diva Addons for OpenSim 0.9.1.0 onwards – using .NET Framework 4.6

Instructions to amend the version of the Diva Addon Modules as at 12-Dec-2018 to Framework 4.6 and fix a couple of compiler warnings is available, along with a zip file of a modified version, via http://openvce.net/resources/downloads/diva-wifi/


Update 17-Nov-2019: Updated version of notes and Zip file using 17-Nov-2019 Diva Addon Modules GitHub Source also made available via same directory.

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.