<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Program With Dave &#187; Blackberry</title>
	<atom:link href="http://www.daveandrews.org/category/blackberry/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.daveandrews.org</link>
	<description>My Programming Tutorials and Experiments</description>
	<lastBuildDate>Thu, 29 Jul 2010 06:00:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Accessing the Internet From a Blackberry Simulator</title>
		<link>http://www.daveandrews.org/2009/09/24/accessing-the-internet-from-a-blackberry-simulator/</link>
		<comments>http://www.daveandrews.org/2009/09/24/accessing-the-internet-from-a-blackberry-simulator/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 22:06:50 +0000</pubDate>
		<dc:creator>Dave Andrews</dc:creator>
				<category><![CDATA[Blackberry]]></category>

		<guid isPermaLink="false">http://www.daveandrews.org/?p=101</guid>
		<description><![CDATA[I had to work on a project recently which involved accessing a web page from a blackberry device. In order to know what it will look like exactly, I decided to write the page software on my machine, and use a Blackberry simulator from Research In Motion to pull up the page so I&#8217;ll know [...]]]></description>
			<content:encoded><![CDATA[<p>I had to work on a project recently which involved accessing a web page from a blackberry device. In order to know what it will look like exactly, I decided to write the page software on my machine, and use a Blackberry simulator from Research In Motion to pull up the page so I&#8217;ll know how it will look on the client phones.</p>
<p>Downloading the simulator was easy! <a href="http://na.blackberry.com/eng/developers/resources/simulators.jsp">You can get the Blackberry Simulator software here.</a> But I ran into an issue: I couldn&#8217;t access the internet! All I would see when I opened the browser and tried to access a webpage was a &#8220;Requesting&#8230;&#8221; progress bar at the bottom. No internet access!</p>
<p>I would then receive the message &#8220;Unable to connect to the selected Mobile Data Service, please try again later.&#8221;</p>
<div id="attachment_105" class="wp-caption aligncenter" style="width: 177px"><a href="http://www.daveandrews.org/wp-content/uploads/2009/09/blackberry_nointernet.jpg"><img class="size-medium wp-image-105" title="blackberry_nointernet" src="http://www.daveandrews.org/wp-content/uploads/2009/09/blackberry_nointernet-167x300.jpg" alt="blackberry_nointernet" width="167" height="300" /></a><p class="wp-caption-text">No Internet On The Simulator!</p></div>
<p>After a little bit of research I determined that what I needed is the &#8220;Blackberry Email and MDS Services Simulator.&#8221; <a href="https://www.blackberry.com/Downloads/entry.do?code=2DF45244F09369E16EA3F9117CA45157">You can download the MDS Services Simulator here</a>. I downloaded and installed the simulator, but then I ran into another problem.</p>
<div id="attachment_108" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.daveandrews.org/wp-content/uploads/2009/09/MDSSImulatorError.jpg"><img class="size-medium wp-image-108" title="MDSSImulatorError" src="http://www.daveandrews.org/wp-content/uploads/2009/09/MDSSImulatorError-300x149.jpg" alt="Error on the MDS Simulator" width="300" height="149" /></a><p class="wp-caption-text">Error on the MDS Simulator</p></div>
<p>The internet on my blackberry simulator still was not working. I looked through the MDS output on the command prompt window, and I noticed an error: &#8220;java.net.BindException: Address Already In Use: JVM_Bind:8080&#8243;. Now, if you&#8217;ve read my <a href="http://www.daveandrews.org/2009/09/14/chat-clientserver-part-1-network-programming-primer-and-packet-base-class/">sockets tutorial network primer</a>, you know that a port can only be bound for listening once. So apparently I had another process on my PC which was bound to listen on port 8080.</p>
<p>So how can I tell which process was running on 8080? I stopped IIS, restarted MDS but I still got the error. I know from working in IT for so long, however, how I can tell what process is using what port.</p>
<p>Pull up a command prompt window and type the command:</p>
<blockquote><p>C:\&gt; netstat -a -b</p></blockquote>
<p>You will get output like the image below. As you can see, there is a java process already using port 8080. All I did from there was kill that java process using the Task Manager, and restarted MDS.</p>
<div id="attachment_109" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.daveandrews.org/wp-content/uploads/2009/09/java8080.jpg"><img class="size-medium wp-image-109" title="java8080" src="http://www.daveandrews.org/wp-content/uploads/2009/09/java8080-300x148.jpg" alt="java8080" width="300" height="148" /></a><p class="wp-caption-text">Java.exe is LISTENING on port 8080.</p></div>
<p>Restarting MDS and the Blackberry Simulator after killing that java process made the blackberry simulator work. I was connecting to the internet just fine.</p>
<div id="attachment_110" class="wp-caption aligncenter" style="width: 177px"><a href="http://www.daveandrews.org/wp-content/uploads/2009/09/BlackberryInternet.jpg"><img class="size-medium wp-image-110" title="BlackberryInternet" src="http://www.daveandrews.org/wp-content/uploads/2009/09/BlackberryInternet-167x300.jpg" alt="The simulator can hit the internet." width="167" height="300" /></a><p class="wp-caption-text">The simulator can hit the internet.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.daveandrews.org/2009/09/24/accessing-the-internet-from-a-blackberry-simulator/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
