OpenVPN for PocketPC forum

PocketPC version of OpenVPN tunneling software
It is currently Wed Sep 08, 2010 3:42 am

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: smartphone installation (T-mobile SDA Music aka Qtek 8100)
PostPosted: Fri Jun 02, 2006 11:37 am 
Offline

Joined: Fri Jun 02, 2006 11:30 am
Posts: 3
Hi,

firts of all - it's great that somebody started development on a openvpn port for windows mobile based devices and I would be happy using it.

However, I am not sure if it's designed for smartphones too?

I tried to install the ovpnppcinst.de.exe on my WM2003 based smartphone from T-Mobile SDA Music aka Qtek 8100, but failed. Error message says that installation on the mobile device is not possible because installation file is not intended to run on this device...

Any thoughts?

Thank you in advance,
Andy


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 03, 2006 12:39 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Wed Apr 19, 2006 8:32 pm
Posts: 231
Location: Tejas
strictly, it's designed for Pocket PC -based devices. There's some subtle differences between than and Smartphone. The most important are security features which disallow the installation of the TAP device driver and some API calls associated with using it.

That being said, it should work on Smartphone if your operator does not have those restrictions in place.

Your error message is interesting. Is there more detail in the message you can give me? Like some of the exact wording so I can put it in a search engine?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 06, 2006 7:33 am 
Offline

Joined: Fri Jun 02, 2006 11:30 am
Posts: 3
Hi,

and thank you for the answer.

Security shouldn't be an issue, since I have already "unlocked" the Smartphone with a specialt piece of software in order to come around this kind of restrictions.

The message is in german:
"Info: ziggurat29 OpenVPN.CAB konnte nicht auf dem Gerät installiert werden, da die Instalationsdatei nicht für dieses Gerät erstellt wurde."

It basically says, "that software could not be installed on the device because the installation file was not developped for this device."

By the way, I get exactly the same kind of message when I try to install any other Pocket-PC based software on my smartphone.

-Andy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 06, 2006 3:05 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Wed Apr 19, 2006 8:32 pm
Posts: 231
Location: Tejas
Ah, gotcha. Then it might be related to some flags set in the CAB itself. I'm a little less familiar with Smartphone deployment options.

If you're sporting, we could do an experiment: I can zip all the exes up and send them to you so you can manually deploy them. Mostly this involves copying the files, which you should be able to do easily enough over ActiveSync. The requisite registry keys will eventually be set up automatically by using the application.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 07, 2006 7:26 am 
Offline

Joined: Fri Jun 02, 2006 11:30 am
Posts: 3
I am not familar with the development stuff, but it's worth a try.

So I would appreciate if you could send me the files and instructions. I'll provide my email address in a private message.

-Andy


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 25, 2007 3:01 pm 
Offline
Registered User
Registered User

Joined: Mon Jun 25, 2007 2:53 pm
Posts: 11
andys: did you succeed? After first installing it on a PPC emu, I copied the entire OpenVPN filetree to my S710 smartphone and two files in /Windows (ovpncmgr.en.htm and tap-ce.dll). Then I tried to start ovpncmgr.exe from pocket explorer. Then I see an error "Can't find 'ovpncmgr' (or one of its components)"

ziggurat29: are there any other files installed somewhere? and do I need any reg key? There are at least 2 files in the .cab which i couldn't find: OVPNPP~2.000 and SETUP_~1.999

PS: gui isn't a prob since I use Fakecursor touchscreen emulation, furthermore the device is application unlocked and I should be able to run all drivers.

Thx,
JockyW


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 26, 2007 10:21 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Wed Apr 19, 2006 8:32 pm
Posts: 231
Location: Tejas
I get a lot of Smartphone requests, and I might try my hand at it some time this year. If the device is unlocked, you may have luck getting the driver to load. It won't load at boot time, but that's OK because the gui can dynamically load it if needed.

The error you are getting means that a dll is missing, or that there is an unresolved import. My suspicion is the former, because I made that gui with MFC and I don't believe Smartphone ships with the MFC dlls (unlike PPC). If you are sporting, you could try to simply recompile the gui with mfc statically linked. Really, I should redo the gui in, say, .NETCF since that is more widely available these days, or just make a pure C implementation.

The GUI is designed to be usable on PPC. It _might_ be usable with your touchscreen emulator, but it certainly wasn't designed for Smartphone.

If you do try to make your own gui, you should be in luck because the openvpn.exe and the tap-ce.dll could possibly work as-is on Smartphone, and because the gui is essentially a launcher of openvpn.exe.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 27, 2007 7:46 am 
Offline
Registered User
Registered User

Joined: Mon Jun 25, 2007 2:53 pm
Posts: 11
Ok let's forget about the gui for now :)

Some more questions:

- I can launch openvpn.exe manually with a shortcut such as
Code:
77#"\Program Files\OpenVPN\openvpn.exe" "\Program Files\OpenVPN\smartphone.ovpn"
In the M$ PPC emu that works (at least for a few seconds). But is there also a shortcut to disconnect?

- I installed the client in the M$ WM5 PPC emu and can connect to my server via activesync (tcp-client). However after a few seconds the TAP device state changes from "in use" to "not loaded" and the connection is down. Is there a solution?
Update: it works flawlessly in M$ WM6 PPC emu

Also "big" progress on my S710 (WM6):
- I copied MFCCE300.DLL and Doclist.dll from an archive "arm dlls" I found on http://izemize.fw.hu/hpc.php and I can now indeed start ovpncmgr.exe on my S710 and see the GUI to a large extent. I can switch tabs etc. However, after leaving the app (or perhaps it still runs in the background), there is no way to bring it in the foreground. It doesn't show up in HTC Taskmanager so I can't kill the task either.

- The TAP list in my S710 shows Device TAP1: in state available, so I guess the tap device driver tap-ce.dll is running fine. Now I wonder how I can start a configuration since there is no icon bottom-right as on a PPC :(

I will now try to manually start openvpn.exe as I did on the emu. Stay tuned.

EDIT: It's working perfect on my WM6 smartphone. I'll put the files for manual installation in an archive and will publish the link soon.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 30, 2007 9:43 am 
Offline
Registered User
Registered User

Joined: Mon Jun 25, 2007 2:53 pm
Posts: 11
ziggurat29: how can I disconnect and release the TAP device by invoking openvpn with a shortcut?

Should it be like this:
"\path\openvpn.exe --down openvpn_exit_1"

PS: On WM6 smartphone I have got a VPN tunnel (udp) for internet traffic to work when I connect with wifi. I've got problems with the tunnel on top of a GPRS/Edge connection.

Also I'd like to know how to add the additional parameters you referred to in the usage manual: "Additionally, two items are specified that will effectively override those in the config file: the named termination event, and the management interface and port."


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 01, 2007 1:41 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Wed Apr 19, 2006 8:32 pm
Posts: 231
Location: Tejas
You will be a hero to many by publishing such instructions.

All the settings in the gui turn into command-line parameters. All the command line parameters are the stock openvpn items, so you can look at the openvpn documentation and see all the details of what is available. The management connection parameters are specified with --management, the termination event is specified with --service, and the log file is specified with --log, and the config file is specified with --config. Your shortcut did not have --config, which will work as a quirk of not having any other options, but if you add more options you will need to explicitly say --config.

There are two ways of shutting down the vpn. You can make a management connection, which works sort of like telnet and is a text-based protocol, and also you get signal a named event object. Neither of these is easily doable without writing code. The easiest of the two would be to make a short program that opens the shutdown event, signals it, and then exits. You can name the event whatever you like, you specify it when starting the openvpn (with the --service option).

Yes, alas, the gui is designed for PPC's UI, and so even getting it to execute on Smartphone (and bully to you for getting that far) doesn't quite cut it because there is no taskbar notification are to use to call the UI up. Really, Smartphone needs it's own specialized UI for it to be usable.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 01, 2007 11:27 am 
Offline
Registered User
Registered User

Joined: Mon Jun 25, 2007 2:53 pm
Posts: 11
ziggurat29 wrote:
All the settings in the gui turn into command-line parameters. All the command line parameters are the stock openvpn items, so you can look at the openvpn documentation and see all the details of what is available. The management connection parameters are specified with --management, the termination event is specified with --service, and the log file is specified with --log, and the config file is specified with --config. Your shortcut did not have --config, which will work as a quirk of not having any other options, but if you add more options you will need to explicitly say --config.

Great, but what about the windows connection manager settings in "Settings 2"? I also would like to know if there's a difference for OpenVPN in using wifi or edge?

Quote:
There are two ways of shutting down the vpn. You can make a management connection, which works sort of like telnet and is a text-based protocol, and also you get signal a named event object. Neither of these is easily doable without writing code. The easiest of the two would be to make a short program that opens the shutdown event, signals it, and then exits. You can name the event whatever you like, you specify it when starting the openvpn (with the --service option).

Hmm, I don't wonna code for WM5 (yet) ... So what if I install telnet on my device and load a script which automatically connects, sends shutdown event, signal and disconnects. What are the text cmds for sending the event and signal?

Quote:
Yes, alas, the gui is designed for PPC's UI, and so even getting it to execute on Smartphone (and bully to you for getting that far) doesn't quite cut it because there is no taskbar notification are to use to call the UI up. Really, Smartphone needs it's own specialized UI for it to be usable.

Would be cool if you come up with a smartphone gui :)
I'm happy to test it anytime!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 01, 2007 4:59 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Wed Apr 19, 2006 8:32 pm
Posts: 231
Location: Tejas
Quote:
Great, but what about the windows connection manager settings in "Settings 2"?

You're very perceptive. That page, which is a bit of a hack anyway, did not originally pass anything to openvpn.exe -- rather all of that stuff was done in the gui app. Basically, it's for trying to keep Windows Connection Manager from dropping the network connection when the TAP adapter comes up. It seems only necessary for phone-based network connections and unneeded for for wifi. At any rate, a couple releases ago I _did_ move that code into openvpn.exe itself, and added a command line option to control it. The option is 'conmgr'. You can see details in the sample config file that is installed called 'sample.ovpn'. In sum:

* presence of the option is like having 'Use Windows Connection Manager' checked.
* the second parameter, in quotes, is the name of the Connection to use, as shown in the list box of the UI. (It can also be the guid if you know it, and you generally won't)
* the last optional parameter is '1' or nothing at all, which corresponds to the 'Exclusive' check box.

Again, all this was intended as a hack but I never figured out a good way to make these choices automatically programatically.

Quote:
Hmm, I don't wonna code for WM5 (yet)

OK I understand but the event method is way easier that trying any telnet script stuff. Here is the program I have used:
Code:
#include "stdafx.h"
#include <windows.h>

int wmain(int argc, wchar_t* argv[])
{
wchar_t* pszName;
if ( argc < 2 )
   {
   pszName = L"openvpn_exit_1";
   }
else
   {
   pszName = argv[1];
   }
HANDLE h = CreateEvent ( NULL, TRUE, FALSE, pszName );
if ( NULL == h )
   {
   wprintf ( L"couldn't open event '%s'!\n", pszName );
   return 2;
   }
DWORD dwErr = GetLastError();
SetEvent ( h );
CloseHandle ( h );
return 0;
}

It takes the name of the even on the command line, and defaults to 'openvpn_exit_1' which is what the GUI defaults to, but you'll still need to specify that name on the command line to openvpn.exe with the --service option. If you don't want to compile it I can do it for you and post it on the web so you can download it. Then you can make the 'end vpn' shortcut you're wanting.
Edit: OK, I just uploaded that file to:
http://ovpnppc.ziggurat29.com/files/ovpnend.exe
Quote:
Would be cool if you come up with a smartphone gui

May happen later this year. There have been a lot of requests for it, and with the fact that there are not that many pure PDAs any more, it has become more of a necessity. Still I am way too busy now, alas, and I don't have a device with which to test so I'd be flying blind.[url][/url][url][/url]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 01, 2007 6:29 pm 
Offline
Registered User
Registered User

Joined: Mon Jun 25, 2007 2:53 pm
Posts: 11
Many thanks for your great help! 8)

I'll test things and will post the files for a manual install of OpenVPN for Smartphone later. Hopefully t'morrow if time allows.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 01, 2007 10:09 pm 
Offline
Registered User
Registered User

Joined: Mon Jun 25, 2007 2:53 pm
Posts: 11
Something is not right :(

I've created a shortcut to start OpenVPN:
Code:
194#"\Storage Card\Program Files\OpenVPN\openvpn.exe" --config "\Storage Card\Program Files\OpenVPN\config\smartphone.ovpn" --log "\Storage Card\Program Files\OpenVPN\log\"  --service openvpn_exit_1


It starts and the TAP device state changes to "in use". Unfortunately no log file is written. And worse, when I run ovpnend.exe the TAP device state stays "in use" until I power cycle the device.

Is there something wrong with my shortcut?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 02, 2007 1:46 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Wed Apr 19, 2006 8:32 pm
Posts: 231
Location: Tejas
It looks good except:

* for the openvpn parameters (i.e. --config, --log, etc) you will need to double the backslashes. This is part of openvpn.exe's design.
* you should _not_ have to double the backslashes for the first item, the executable (i.e. it is fine as you have it). This is part of the OS' design.

I'm not at my machine now, so I might be wrong, but I don't think so. I'll try to make a shortcut myself later.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group