Wifi and Other Diva Addons

Hello everyone! OpenSim 0.8.1 brings a few minor bug fixes to core OpenSim and a significant change to how the web app Wifi is deployed in grids (no changes for D2 standalones). In general, this release introduces a mechanism for me and others to provide 3rd-party addons via mono addins, a mechanism that has been in OpenSim for a very long time, but that was severely underutilized. Let me explain how to deploy Wifi in your grid from here on, and then I’ll explain how to install additional Diva addons in either grids or standalones.

NOTE: mono addins works in both .NET and mono. If you run Wifi in Windows you do not need to install mono in order to run mono addins. Everything you need is already included in the OpenSim distribution.

Wifi for Grids

Let me recap how Wifi has been deployed in grids up to now. Again, operators of D2 standalones don’t need to know any of this, since Wifi comes pre-installed in D2.

Up to now, every time I made a new D2 release, I also made a special package (a zip file) with just the Wifi DLLs (see here). Some people in the community have written detailed instructions on what to do with these DLLs, which boils down to copying files manually to certain folders and then adding a few configuration sections to the Robust configuration file. (Wifi for grids runs in a Robust server)

From here on, I will stop producing this extra zip file. Instead, I am producing a mono addin package (which happens to also be a zip file, but with more information inside), and I’m making it available from the metaversink mono addins repository listed here. Installation and future updates are done via the generic mono addins mechanism, not by copying files by hand.

So here are the detailed instructions for how to install Wifi in your grid when updating from OpenSim 0.8.0 to OpenSim 0.8.1. Note: If you are making a new install from scratch, skip to step 6.

  1. Make a backup of your WifiPages folder to somewhere safe, especially if you customized some of them. Likely you won’t need this backup, but better safe than sorry.
  2. Update your robust installation to 0.8.1
  3. Make sure to incorporate any OpenSim configuration changes in your Robust configuration file
  4. (From here on, all console commands are supposed to be given from the opensim bin folder)
  5. Edit your Robust configuration file and remove the DivaWifi server connector. Depending on how old your config file is, this may be at the end of a very long string called ServiceConnectors under [Startup] or in a variable under [ServiceList]. Wherever it is, remove it, because Wifi now will run as a mono addin.
  6. Still in your Robust configuration file, go to the [Startup] section. Set the RegistryLocation and the ConfigDirectory to folders outside of the bin folder. For example:
        RegistryLocation = "../../addins-registry"
        ConfigDirectory = "../../addins-config"

    Alternatively, you can give absolute paths, for example:

        RegistryLocation = "/home/opensim/addins-registry"
        ConfigDirectory = "/home/opensim/addins-config"
  7. Still in your Robust config file, go to the [DatabaseService] section. If you had
    StorageProvider = "Diva.Data.MySQL.dll"

    switch it back to the default

    StorageProvider = "OpenSim.Data.MySQL.dll"

    Don’t worry, Diva Wifi will use the right one, but the rest of your Robust will use the default.
    Save and close your Robust configuration file.

  8. Populate the mono addins registry with all the OpenSim core addins:
     $ [mono] mautil.exe -reg /path/to/registry reg-update

    where /path/to/registry is the RegistryLocation you set in the configuration file, so for example ../../addins-registry or /home/opensim/addins-registry. IT’S VERY IMPORTANT THAT THIS PATH IS EXACTLY THE SAME AS THE ONE YOU WROTE IN YOUR CONFIG FILE FOR RegistryLocation.

  9. Add the metaversink addins repo as one of your sources of addins, and update its contents locally:
    $ [mono] mautil.exe -reg /path/to/registry rep-add http://metaverseink.com/repo
    $ [mono] mautil.exe -reg /path/to/registry rep-update
  10. You can now see the list of all the available addins:
    $ [mono] mautil.exe -reg /path/to/registry list-av
  11. Install the Diva.Wifi addin:
    $ [mono] mautil.exe -reg /path/to/registry install Diva.Wifi

Note that this command, as is, will install the latest version of  Diva.Wifi. This may or may not be what you need. Typically, several versions of it will be available from the Metaverseink repository (e.g. for OpenSim 0.8.1, 0.8.2, etc.), and you can see them all when you list what’s available (with the command in step 10). So, if your OpenSim installation is not the latest, you  need to install the particular version of Diva.Wifi that corresponds to your OpenSim version.

At this point, you can run your Robust server:

$ [mono] Robust.exe -inifile YourRobustConfig.ini

As you will see, it will warn you that Wifi needs to be configured, something like this:

2015-04-04 14:53:54,273 ERROR – Diva.Wifi.WifiServerConnector [Wifi]: PLEASE EDIT ../../addins-config/Wifi.ini BEFORE RUNNING THIS SERVICE

If you don’t see this warning message, something is wrong, likely the path to registry is inconsistent. Recheck the previous steps starting in step 8.

What does this warning message mean? Up to now, the Wifi configuration section was included into your Robust configuration file; from here on, it is in a separate file. That file is placed under ConfigDirectory/Wifi.ini, where ConfigDirectory is whatever you set in your Robust config file (see point 5 above). So, for example, ../../addins-config/Wifi.ini or /home/opensim/addins-config/Wifi.ini.

So edit that file and set up everything appropriately as you had before (copy-paste from your old file will do it). The configuration variables themselves didn’t change. Only one was added: don’t forget to set Enabled = true.

Once you’re done, save the file and restart Robust. This time everything should work.

IMPORTANT: from here on you can delete the [WifiService] section in your main Robust configuration file, because it will not be used anymore. Wifi configs will be read from /path/to/addins-config/Wifi.ini

Updating Wifi in the Future

I know changes of process are always a bit painful, and you may be wondering why I changed this. The reason is twofold: (1) much easier updates from here on; and (2) additional optional goodies coming up. Let me explain the updates.

When you follow the instructions above, your installation of Wifi will be relatively independent of your installation of OpenSim. The Wifi app itself is in /path/to/registry/addins/Diva.Wifi. and its configuration file in /path/to/config/Wifi.ini.

The next time that I make a new release of Wifi, all you have to do is to update Wifi, something like this:

$ [mono] mautil.exe -reg /path/to/registry rep-update 
$ [mono] mautil.exe -reg /path/to/registry list-update 
$ [mono] mautil.exe -reg /path/to/registry update Diva.Wifi

Voila! No copying things by hand anywhere. I’ll make sure to repeat these instructions again next time I make a release of Wifi.

Optional Diva Addons

The second reason why I did this is to be able to provide additional functionality in a modular manner. Take another look at the available addins:

$ [mono] mautil.exe -reg /path/to/registry list-av
Available add-ins:
 - Diva.AddinExample, (metaverseink.com)
 - Diva.AddinExample, (metaverseink.com)
 - Diva.Interfaces, (metaverseink.com)
 - Diva.MISearchModules, (metaverseink.com)
 - Diva.Modules, (metaverseink.com)
 - Diva.TOS, (metaverseink.com)
 - Diva.VirtualOffice, (metaverseink.com)
 - Diva.VirtualOffice, (metaverseink.com)
 - Diva.Wifi, (metaverseink.com)
 - Diva.Wifi, (metaverseink.com)
 - Diva.Wifi.GridManagement, (metaverseink.com)

What is all this? These are all Diva addons — modular functionality that I have been working on for some of my grids — several versions of them. Some of these addons are for Wifi, others are for the simulators. Also, some of them are free, others require a license. Here is an explanation of what they all are:

  • Diva.AddinExample is just an example of how to write addins for OpenSim. It’s intended for OpenSim developers. An explanation can be found here. It’s free, but you really don’t want to install it, it’s a dummy addon.
  • Diva.Interfaces is a generic piece of code upon which many Diva addons depend. It doesn’t provide any functionality by itself. Its free, but it doesn’t do anything by itself.
  • Diva.MISearchModules contains functionality that people may want to install on their simulators, so that their content and images are listed in the MISearch engine. It’s included in D2, and it’s free.
  • Diva.TOS contains functionality to support a Terms of Service acceptance step when people login or HG-teleport to a grid. It pertains to simulators. The Wifi part is already included in the free Wifi app, and this addon is included in D2. This addon is also free.
  • Diva.VirtualOffice contains a simulator-bound feature that supports the upload and display of PDF files inworld. It requires a license.
  • Diva.Wifi is…Diva Wifi. Free.
  • Diva.Wifi.GridManagement is an addon to Wifi that provides a much richer set of features for grid management, such as estate and group management; it requires a license.

Up to now it was really painful to deploy this additional functionality on my grids, and pretty much impractical to make it available to others. This new mechanism makes it much simpler for me, and makes it possible for me to share it. Let me explain what you need to do if you want to install one of them, for example, Diva.MISearchModules.

  1. Go to your opensim installation — the simulators, not robust. Change to the bin folder.
  2. If you have a D2 installation, you can skip this step. If you don’t have a D2 installation, edit your configuration file OpenSim.ini, go to the section [Startup]. Set the variables RegistryLocation and ConfigDirectory to outside the OpenSim installation, for example:
        RegistryLocation = "/home/opensim/addins-registry"
        ConfigDirectory = "/home/opensim/addins-config"
  3. If your simulators installation folder is the same as your robust installation, you can skip this step. Otherwise do this to get the metaverseink repo and cache its contents locally:
    $ [mono] mautil.exe -reg /path/to/registry rep-add http://metaverseink.com/repo
    $ [mono] mautil.exe -reg /path/to/registry rep-update

    where path/to/registry is whatever you set it in RegistryLocation in step 1. In D2s it is ../../addins-registry

  4. Install the addon:
    $ [mono] mautil.exe -reg /path/to/registry install Diva.MISearchModules
  5. Reboot your simulator(s). You will likely get warnings about having to configure these addons. Follow the instructions in the warnings, and reboot the simulators again.
  6. README files, if any, are placed under /path/to/registry/addins/<addin>

If you are interested in any of the non-free addons, let me know.


4 replies on “Wifi and Other Diva Addons”

  1. Ai Austin says:

    >> I am producing a mono addin package… and I’m making it available from the
    >> metaversink mono addins repository listed here (http://metaverseink.com/repo/)

    Hi Diva… are there meant to be links in the table at http://metaverseink.com/repo/ ?
    Or is this still in preparation?

  2. Diva Canto says:

    Hi Ai, no links, no. That is just an inventory of what’s available. The installation is done via the command line mautil, which fetches files from the remote repositories.

  3. MVC says:

    Hello Diva !

    I’m very happy, that You have managed and succeded to upgrade Wifi in this much more interestign way.

    We base some of our web services on your wifi’s functionality. We appreciate your work a lot !

    I have made trial of installation of your new way of wifi app using mautil.exe and all process has been successful!

    But there is one thign that seems to be kidan stopper for me to use it in this new form.

    WifiPages folder, now, is placed in two locations: first one location is in old place, paralley to robust/bin folder

    But second one is inside the /path/to/registry/… and each time robust is restarted, then all html files are being extracted and set to default your settings, That absolutely makes us ver big and swerious problem Because we have modified plenty of html files in side wifPages and now, all our work is lost each time , it is restarted !

    I can’t copy this folder of mine each time, to yoru new location, oru server of robust is automatically restartted and who wil be copying this folder ?

    I hope you can fix it , Diva :)

    Kind Regards !!

  4. Steven says:

    When executing $ mautil -reg /home/ubuntu/addins-registry install Diva.Wifi
    I get the following error:
    ERROR: There was an error while scanning assembly: /home/ubuntu/opensim-0.8.1/bin/openjpeg-dotnet-x86_64.dll (Format of the executable (.exe) or library (.dll) is invalid.)
    ERROR: There was an error while scanning assembly: /home/ubuntu/opensim-0.8.1/bin/openjpeg-dotnet.dll (Format of the executable (.exe) or library (.dll) is invalid.)

    I’ve followed the instructions to the letter. Any idea what I can do to fix this? Thanks!

Comments are closed.