Windows

From GnokiiWiki
Jump to: navigation, search

Contents

Gnokii on Windows (Win32/Win64)

Gnokii can be run on Windows. Currently tested platforms are:

  • Win32 XP (Win32 only)
  • Server 2008
  • Vista
  • Windows 7

There are both 32-bit and 64-bit builds available since Gnokii 0.6.28.

If you have anything to report, please do so at the mailing list.

Binaries

Binary versions are available at Gnokii download site.

Compiling

For those wanting to compile the binaries by themselves, current Gnokii versions can be compiled with MS Visual Studio.

The only compiler currently supported by project are Visual C/C++ version 2008. There exist numerous editions of the product, but any of them (including the freely available Express edition) seem to work.

Compiler versions not supported

  • Visual Studio 2005 (commercial and Express)
  • Visual C/C++ 4.2 or 6.0 (only ancient commercial versions available)
  • Visual C++ toolkit 2003 (license restrictions, build system missing)

If you are working with these versions and manage to get Gnokii working, please inform the community in the mailing list. We are interested in putting updated project files into CVS.

Compiling 64-bit versions

The solution and project files do contain information for 64-bit builds too.
Cmd.exe example:

C:\Gnokii\Windows\MSVS2008> "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64
C:\Gnokii\Windows\MSVS2008> vcbuild /useenv gnokii.sln "Release|x64"

On Visual Studio GUI: select the configuration Release and architecture x64 to achieve same results.

The Visual Studio 2008 C++ Express Edition does not include a 64-bit compiler. Only 32-bit builds can be made with it. Any Visual Studio commercial editions work fine for 64-bit builds.

There are indications in the Net that latest Windows SDK contains a CLI compiler for 64-bit binaries. This has not been tested yet.

Preparing for compile

After Gnokii 0.6.22 was released, a crucial file of include/config.h was removed from CVS in favor of autoconf. As it happens there is no autoconf/automake for Windows making the compiling virtually impossible.

Important note: Always execute win32/gen_gnokii_h.ps1 or win32/gen_gnokii_h.bat before attempting the compile.

New: Powershell-file

  • A single Windows Powershell file can do the required extraction, deduction and writing the gnokii.h.
  • If you are running Windows XP or Vista, go download the Powershell from Microsoft.
  • On Windows 7 or Windows Server 2008 (or later), the software is part of operating system.
  • If .ps1 file extension has been associated with Powershell, then a double click of the script will do.
  • Or on a Cmd.exe prompt:
C:\gnokii\Windows> powershell.exe -command ".\gen_gnokii_h.ps1"
  • Or on a Powershell prompt:
PS > "C:\gnokii\Windows\gen_gnokii_h.ps1"

Old: Bat-file

  • Since the macros in config.h.in are not very complex, it is possible to use Cmd.Exe's findstr for information gathering and SED to do simple find/replace from a .bat file.
    • sed.exe are required for the process to succeed.
    • You can get the utilities from Cygwin project.
    • Any reasonably sane sed.exe will do the trick, there is nothing Cygwin specific in them. Just make sure the utilities are accessible via PATH.

Visual C/C++ 2008

MS Visual C++ 2008 Express edition is supported. It can be downloaded from Micosoft website free of charge. The license is relaxed enough for any practical use. It seems to include enough files from Platform SDK for the Gnokii to compile succesfully.

Visual C/C++ 2005

We're currently phasing out Commercial Visual Studio or MS Visual C++ 2005 Express editions. For Bluetooth support Platform SDK is required. Commercial MSVS 2005 does have a limited Platform SDK but it does not contain Bluetooth headers.

Express edition is no longer available for download, but if you have it, you can use it. Platform SDK can be downloaded from MS website without charge. The license in both the Express edition and Platform SDK is relaxed enough for any reasonable use.

Cable support

In short: any phone supported on *nix is supported on Windows. Unlike on a *nix, on Windows most cables available are supported.

All serial cables are supported.

Most USB cables come with a Windows driver creating a virtual Com-port. That can be accessed like a hardware serial port. All that is required is proper model support in Gnokii.

Drivers for genuine Nokia cables are usually installed together with Nokia PC Suite (only one application at a time can access the Com-port so you need to quit Nokia PC Suite before using gnokii) but they can also be downloaded separately from Nokia.

Bluetooth support

Both virtual COM ports (connection = serial) and direct Bluetooh connections (connection = bluetooth) are supported without the need of specific phone drivers.

IrDA

Nokia IrDA driver is required, it is in Nokia PC Suite software package. When proper drivers are in place, enable IrDA on the phone and place it near PC. A virtual Com-port should appear.

Make sure that connection is irda on your rc-file.

rc-file

Current versions attempt to read the gnokiirc from:

  1. User's home directory: %HOMEDRIVE%\%HOMEPATH%\_gnokiirc
  2. Windows installation directory: %SYSTEMROOT%\gnokiirc

If user Gnokii configuration can not be found, system global is used.

Three values are required in the config file for gnokii to work: port, model and connection. See the comments in the config file for further information.

In Windows the port is always a Com-port, a hard wired or virtual. For port numbers from 1 to 9 the correct name is like COM1: and from 10 onward it is like \\.\COM10 in upper case and with the exact punctuation. See the README-files for correct phone model number. See the README-files for correct connection cable type.

Gnokii wiki has example configurations for various handsets.

Limitations

Gnokii is a *nix originated project, so Windows support is roughly 98%. Issues:

  • Some I/O issues, especially keyboard input
  • No port locking