Smartphone Emulator: Deploy, Debug, Internet connection

H

Hilton

Hi,

I need to deploy my app to the Smartphone Emulator and have the app 'see'
the Internet. Debugging would be great too, but not absolutely necessary.
I have searched, but cannot find the settings that allow: deploy, debug, and
Internet connection.

I found some settings that would allow PIE to see web sites, but I could not
deploy. The default settings allow deploy/run, but no Internet connection.

FYI: I installed the VM Network Driver while trying some settings.

Any settings that are known to work?

Hilton
 
J

JDeats

This is yet another example of how it seems the Microsoft Windows
Mobile software engineers seem to go out of their way to make life hell
for the developers.... I just gave up with the emulator and started
doing everything on the device.

Functionally the J2ME emulator and assoicated images are very simple im
comparison, but at least they are useful and very fast. IMO The Windows
Mobile emulator and assoicated images do not provide a suitable
solution for debugging and application testing. They do have some
novelity value and it looks good for advertising..... functionally they
are useless to me as a developer, a lot of ease-of-development of
Windows Mobile 5 is an illusion, most of what I was led to believe
going in turned out to be false. So welcome to the club.
 
K

kdarling

Hilton said:
I need to deploy my app to the Smartphone Emulator and have the app 'see'
the Internet. Debugging would be great too, but not absolutely necessary.
I have searched, but cannot find the settings that allow: deploy, debug, and
Internet connection.

I think Microsoft has no idea how many potential developers they've
lost due to the lack of information on using the emulators. So I just
wrote this up, and I hope people copy and enhance this with pictures
etc for everyone:

How to: make internet connection from Windows Mobile simulators.

IMPORTANT: if you're behind a corporate firewall with a proxy, this
won't work unless you also set the proxy information. You'll see where
below.

ENABLING ACTIVESYNC TO THE SIMS:

1) Bring up Activesync, choose File - Connection Settings
2) set "Allow connections to one of the following": DMA

AVOIDING THAT HORRIBLE ACTIVESYNC PROMPT:

To prevent getting the annoying partnership prompt each time you cradle
a device, use regedit and create this new DWORD value on YOUR HOST PC.
Life is so much more pleasant afterwards.

HKLM \ software \ microsoft \ windows ce services \ GuestOnly = 0x01


CRADLING NOTES:

1) Use the Device Emulation Manager to start any sim. (under Tools in
VS2005)
2) Select the sim you want, right-click - Connect.
3) After it's running, right-click - Cradle. This ActiveSyncs to the
sim. Make sure no other device is using ActiveSync or it won't work.
4) BEFORE YOU EXIT AND SAVE STATE FROM A SIM, BE SURE TO right-click in
Device Manager AND UNCRADLE !!!! Otherwise you're going to have a hard
time getting it to sync again.

DEPLOYING:

If you're cradled as above, then deploy will find the sim device. Note
that the first time you deploy, it might have to copy the Compact
Framework over and install it. That will take a while. Therefore be
sure to File - Save State & Exit on that Sim at least once to speed up
the next time you use the simulated device. Only Save State when that
Sim is working well, of course, otherwise you'll have to Clear it and
start setting it up again from scratch.

SMARTPHONE EMULATOR:

Start - Settings - Data Connections
Change "Work Connection" to use "Pass through connection".
Click "Done"

Start - Internet Explorer - Menu - Options - Connections
Uncheck "Automatically detect settings"
Select "Work" as your network.
Click "Done"

You should now be able to click Favorites and surf now.
Be sure to save state & exit so you don't have to setup this again.

WINDOWS MOBILE EMULATOR:

Start - Internet Explorer - Favorites - MSN Mobile
(let it fail) then click Settings in the popup balloon
Advanced - Select Networks - Set "My Work Network" for both - OK
Tasks - Set up my proxy server - check "This network connects to the
Internet" - OK - OK
Now you should be able to surf to the Favorites etc

Good luck!

Kevin Darling
Verizon developer
 
K

kdarling

WINDOWS MOBILE EMULATOR:

Start - Internet Explorer - Favorites - MSN Mobile
(let it fail) then click Settings in the popup balloon
Advanced - Select Networks - Set "My Work Network" for both - OK
Tasks - Set up my proxy server - check "This network connects to the
Internet" - OK - OK
Now you should be able to surf to the Favorites etc

Also, a partial alternative for setting up WM5, but I haven't checked
what else is needed ...

Start - Settings - Connections - Connections - Advanced

Select which networks are automatically used - Select Networks
Set both to My Work Network
Edit the first Work Network...
Under Proxy Settings, check "This network connects to the Internet"
If you need to put in a proxy, do so now, else uncheck the proxy
option.
Click OK - OK - OK - X

Kev
 
J

JDeats

Kevin,

Thanks for the work in putting this together. It's sad to me that the
Windows Mobile 5 platform is so dependant on the development community
to compensate for where Microsoft just dropped the ball. Anyway's who's
spend considerable time with the Compact Framework 2 and also bothered
to program with J2ME MIDP 2 knows exactly what I'm talking about,
overall WM5 is full of potentially but very... annoying is the word I'm
looking for.

It's diffuclt because for the most part Microsoft Development
technologies are excellent and shine about all commercial and open
source counterparts in terms of ease of use, documentation, cost of
ownership, etc... Generally, it's a wise choice to develop with
Microsoft tools, but when it comes to WM5 vs the competition, which I
guess in general is J2ME MIDP2, Microsoft did a horrible job. When I
say horrible, I mean the kind of job where every engineer on the team
should be ashamed. I've never experienced absolute hatered for a group
of people the way I have for that team, and if every one of them were
fired and had to live in the street there may be some justice. But that
won't happen.

Untill they get their act together and build a Compact Framework and a
solid debug environment (and I consider a solid emulator that "just
works" part of a good debug environment), I will continue to have to
split my mobile development time between J2ME and CF2 and hating
Microsoft's WM5 team for not doing a good enough job.

I was planning weekly post to demonstrate the failure of the CF2 team
next to J2ME in terms of time to develop mobile solutions. I'm putting
those finding in an e-book that I will publish independently and
release for free. The purpose of the publication will be: 1. To provide
allt he Windows Mobile 5 developers an alternative to the horrible and
expensinse developer tools Microsoft has provided, and it's important
to note I don't say that as a Linux bobblehead, or open-source liberal.
I am a Microsoft Architect developer, I really enjoy working with
Microsoft technologies and I really hate the poor job the WM5 team has
done. It's a big let down that we have to turn away from the tools we
love the most to be able to create cost effective solutions, but my
book (or booklet, I'm trying to keep it around 150 pages) will try to
make the J2ME transition painless for C# developers and give them some
light at the end of the tunnel in the mobile development world..

It's hard not to post a message about this without putting in a plea to
Microsoft (should someone in power read this). Please FIRE the lead
engineers on the Windows Mobile 5.0 Compact Framework 2 team! Their
failure can be found in a quick comparison of the J2ME features, their
entire direction with the CF2 should be called into question and
questions should be ask such as "why do managed mobile developers have
to write a native wrapper to perform function X". I've worked with a
lot of Microsoft technologies, since back before VC++ existed I was
working with Microsoft C++ and QuickBASIC. Comparing development
technologies over the years you have to make things relative to the day
and age, relative to what the company has already put on the market and
what everyone else is doing... Microsoft has made managed code
development the standard and now they are spitting in the face of all
WM5 developers. People say a lot about Microsoft, but you know over the
years they have always treated their developers very well... With
Windows Mobile 5 they have failed us, they have spit in our faces.
Microsoft do the right thing. Fire the SOBs responsible OR at least
reassign them (everyone deserves a second chance, whatever). In regard
to development tools, WM5 CF2 is hands down the worst mistake Microsoft
has made, compare J2ME MIDP2 to it and this is not an opinion it's an
assertive fact. Please Microsoft, punish those responsible, don't make
us wait on CF3 to make good on this. Put some time into providing
quality wrappers for CF2, give us quality emulators that near device
speeds and "just work", give us a free development environment....

You've been so good over the years....Compete damnit!

Compete or be replaced.
 
S

Stephen

OK, I don't understand all the fuss in this thread but to allow the emulator
to "see" the Internet using the emulators that ship with VS2005 just go to
File->Configure->Network tab in the emulator menu and check "Enable NE2000
PCMCIA network adapter and bind to:"

And to the guy who keeps going on about j2ME/MIDP vs. CF: please give it up.
j2me is a mess on the actual devices and I am happy there is an alternative.
If you don't like the Compact Framework then don't use it. You don't need to
use the CF to do Windows Mobile development. The CF is not a development
tool like you stated in your post, it is a framework. It has nothing to do
with Visual Studio or the emulators so your rant is offtopic here.

There are other frameworks out there for you if you don't like the CF. Check
out http://www.opennetcf.org for an example of this. If you really like
J2ME, then use it.
 
K

kdarling

Stephen said:
OK, I don't understand all the fuss in this thread but to allow the emulator
to "see" the Internet using the emulators that ship with VS2005 just go to
File->Configure->Network tab in the emulator menu and check "Enable NE2000
PCMCIA network adapter and bind to:"

Either your machine came to you already set up, or you've forgotten
some steps involved. I don't believe the NE2000 method works unless
you first have the virtual network driver installed. And even then, I
don't think it works unless you manually add it as "new hardware",
which is something not mentioned anywhere. Basically, it's very
frustrating getting started with the emulators, because the
documentation is scattered all over and/or misses a few crucial steps.
And to the guy who keeps going on about j2ME/MIDP vs. CF: please give it up.
j2me is a mess on the actual devices and I am happy there is an alternative.

Personally I think CF is very nice. It's just too bad that when you
actually start developing for real life, a lot is missing and you still
have to write custom p/invokes to do things that should be dirt common,
like RAS.

Kev
 
S

Stephen

You are right, there are a few steps before. I forgot to mention them
because I set it up a long time ago and I really didnt think it was a big
deal at the time. A google search turns up this:

1.Install the Virtual Machine Network Driver for Microsoft Device Emulator.
2. In Visual Studio 2005, open Tools>Options. Select Device Tools >
Devices. Then select the 'Windows Mobile 5.0 Pocket PC Emulator' and click
the Properteies button

3. Change Transport in the Emulator properties to 'TCP Connect Transport'.
Then click the 'Configure' button. You can then set an IP address (one valid
for your network); although I have found that the emulator retrieves one on
its own from from DHCP, if that is available. Additionally, I have found
that if you leave the IP as 127.0.0.1, you may be unable to deploy.

4. Click the Emulator Options button. In the Emulator Properties dialog that
opens, select the Network tab. Make certain that the 'Enable NE2000 PCMCIA
network adapter and bind to:" box is checked and that you have selected the
correct network adapter of your computer.

5. OK your way out of these dialogs

6. Start the emulator. Start > Settings > Network Cards

7. Tap NE2000 Compatible Ethernet Driver. Select either 'Connected network
card" or one of the adapters listed [that has a valid network connection].
Tap OK (and tap OK on the dialog that comes up).

8. Make certain that the 'My network card connects to:" drop-down is set to
'The Internet'

9. Clear any saved state from the emulator and hard-reset it.
 
S

Stephen

You are right, there are a few steps before. I forgot to mention them
because I set it up a long time ago and I really didnt think it was a big
deal at the time. A google search turns up this:

1.Install the Virtual Machine Network Driver for Microsoft Device Emulator.
2. In Visual Studio 2005, open Tools>Options. Select Device Tools >
Devices. Then select the 'Windows Mobile 5.0 Pocket PC Emulator' and click
the Properteies button

3. Change Transport in the Emulator properties to 'TCP Connect Transport'.
Then click the 'Configure' button. You can then set an IP address (one valid
for your network); although I have found that the emulator retrieves one on
its own from from DHCP, if that is available. Additionally, I have found
that if you leave the IP as 127.0.0.1, you may be unable to deploy.

4. Click the Emulator Options button. In the Emulator Properties dialog that
opens, select the Network tab. Make certain that the 'Enable NE2000 PCMCIA
network adapter and bind to:" box is checked and that you have selected the
correct network adapter of your computer.

5. OK your way out of these dialogs

6. Start the emulator. Start > Settings > Network Cards

7. Tap NE2000 Compatible Ethernet Driver. Select either 'Connected network
card" or one of the adapters listed [that has a valid network connection].
Tap OK (and tap OK on the dialog that comes up).

8. Make certain that the 'My network card connects to:" drop-down is set to
'The Internet'

9. Clear any saved state from the emulator and hard-reset it.
 
S

Stephen

You are right, there are a few steps before. I forgot to mention them
because I set it up a long time ago and I really didnt think it was a big
deal at the time. A google search turns up this:

1.Install the Virtual Machine Network Driver for Microsoft Device Emulator.
2. In Visual Studio 2005, open Tools>Options. Select Device Tools >
Devices. Then select the 'Windows Mobile 5.0 Pocket PC Emulator' and click
the Properteies button

3. Change Transport in the Emulator properties to 'TCP Connect Transport'.
Then click the 'Configure' button. You can then set an IP address (one valid
for your network); although I have found that the emulator retrieves one on
its own from from DHCP, if that is available. Additionally, I have found
that if you leave the IP as 127.0.0.1, you may be unable to deploy.

4. Click the Emulator Options button. In the Emulator Properties dialog that
opens, select the Network tab. Make certain that the 'Enable NE2000 PCMCIA
network adapter and bind to:" box is checked and that you have selected the
correct network adapter of your computer.

5. OK your way out of these dialogs

6. Start the emulator. Start > Settings > Network Cards

7. Tap NE2000 Compatible Ethernet Driver. Select either 'Connected network
card" or one of the adapters listed [that has a valid network connection].
Tap OK (and tap OK on the dialog that comes up).

8. Make certain that the 'My network card connects to:" drop-down is set to
'The Internet'

9. Clear any saved state from the emulator and hard-reset it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top