|
On device debugging on JP-8 phones using USBCreated on: Dec 17, 2007 10:30 PM by Sony Ericsson Developer Support - Last Modified: Sep 2, 2009 8:46 AM by Sony Ericsson Developer SupportPrerequisites
Please note that the procedure has changed between JavaME SDK 2.5.0.1 and 2.5.0.2. This SDK version also works better with Windows Vista.
Configure the phoneFollow the steps below to configure the JP-8 phone for on device debugging.
Enable Java developer mode on the phone from the service menu.
Enable USB network on the phone.
Enable USB default mode (optional)
The phone is now redy to connect via USB.
Configure Windows XPOnce the phone is connected to the USB port and the drivers are installed there will be a emulated network card installed in the system. All debug traffic will go over this network card in JP-8 instead of over a COMM port in JP-7.
Connect the USB cable
Start debuggingNow that the configuration is complete one can connect to the device to start debugging.
Connect with the connection proxy
Use the device explorerOnce connected with the connection proxy you can start the device explorer. With the device explorer you can:
Debug on device using NetBeans or EclipseOnce connected with the connection proxy it is possible to debug on device / step in the code from NetBeans or Eclipse. Be sure to select the appropriate "debug on device"-profile for the target phone. For JP-8 phones please select Sony Ericsson SDK 2.5.0.1 beta for the Java(TM) ME Platform(Debug On-Device) and the phone Sony Ericsson JP-8.
On Device Debugging with Wireless Internet ConnectionIf you are trying to debug while using wireless internet connection(GPRS, UMTS, etc..) and it fails, do as follows:
On your device enter the following menus:
If you want to do the same thing for 'Streaming'.
Those setting will make it possible to use internet access and SDK Connection Proxy at the same time.
Still not working?Please try the steps below one by one if the connection is not working.
Reinitialize the USB network on the phone.
Make sure there is a valid network connection to the phone.
If the phone does not respond to the broadcast address there might be a firewall issue.
Configure firewalls for the deviceIf there is no connection to the device there is probably a packet filter of some sort installed on this network interface. In order for debugging to work, the network card must be able to send and receive ICMP and TCP traffic. For more information on firewall issues on JP-8 and symbian phones see this article: http://developer.sonyericsson.com/community/docs/DOC-1694
ICS issues during connectingInternet Connection Sharing (ICS) can be used together with Connection Proxy. Make sure that ICS is started BEFORE the Connection Proxy.
The Connection Proxy will in this case run without the ipprovider. See below for more information about the Connection Proxy running without the ipprovider.
If you have started the Connection Proxy before the ICS, the Connection Proxy starts the ipprovider, that continues to run for the entire pc session. You then have to manually shutdown the ipprovider. You do this by either restart the pc or find the process named java.exe in the 'Task manager' and kill it. (A bit ugly! The problem is that there could be several processes with that name.)
After shutting down the ipprovider, start the ICS, then start the Connection Proxy.
Proxy Disconnects even if device is still connectedCause The proxy has a supervision to detect a removed device. If response from device is too slow the proxy may disconnect a working connection.
Solution Disable the supervision by changing the property ping.time to 0 in the C:\SonyEricsson\JavaME_SDK_CLDC\OnDeviceDebug\lib\sdkme.properties file.
In newer SDK versions the property timeout.ping can be increased instead.
Can not connect and "Safely Remove Hardware" icon shows up in the notification areaWhen connecting the device to the computer via the usb cable, the "Safely Remove Hardware icon" shows up in the notification area and on the device the text Do not remove the USB-cable before you have closed the program on the computer.
Cause If the device starts when it is connected to a computer, it assumes that it should be started in file transfer mode.
Solution Unplug the device. Restart it. Then connect it again. It should now show a list of possible modes to connect it in. Choose phone mode.
The device never gets an IP, it's stuck in 'Acquiring network address' When connecting the device to the computer via the usb-cable the local interface never gets an IP. It just keeps trying to acquire an internet address without succeeding.
Cause The IPProvider tries to 'give out' IP-addresses on a subnet which is already used by the local computer and a collision(another internet host already has this IP) occurs.
Solution Update the file ipprovider.settings to start using another subnet. The file can be found here: \SonyEricsson\JavaME_SDK_CLDC\OnDeviceDebug\lib\
Running Connection Proxy without a ipprovider
This is only valid for JavaME SDK 2.5.0.1 and does NOT work on Java ME SDK 2.5.0.2!
Every time a device is plugged in, the user has to wait a little while before the device is ready to be used with Connection proxy. The reason for this is that a network interface needs to be created and an IP-address has to be assigned to that interface. Since there is no DHCP server on the computer, a link local address will eventually be generated. This can take up to one minute. To speed things up, the user can assign a static IP-address to the network interface that belongs to the device. This is how to assign a static IP-address to a network interface: 1. Connect device with USB cable to the computer. 2. Choose 'Phone Mode' 3. Wait! The device now starts to search for an IP-address for the new network interface. On Windows XP without Ipprovider this usually takes about a minute and on Vista or 'XP with Ipprovider' it's almost immediate. (There is a tray-icon indicating 'work in progress..') There is a small trick (see below) to make this faster but use it at your own risk!! (Only useful for Windows XP without Ipprovider.) Wait until you receive an IP for the interface. You can start a command prompt for this and enter 'ipconfig /all'. Look for the IP Configuration with the Description starting with some thing like: Sony Ericsson Device 117 USB Ethernet Emulation (NDIS 5) 4. When the new network interface is ready, open a command prompt and type in ipconfig and press Enter. A new local area connection has been added. For example:
Ethernet adapter Local Area Connection 8: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 169.254.66.37 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . :
Remember the IP-address (in this case 169.254.66.37). 5. Now go to Windows "Start"->"Settings"->"NetworkConnections" 6. Select the network interface that belongs to the device. Right click and choose "Properties". 7. Select "Internet Protocol(TCP/IP)" and press the "Properties" button. 8. Select "Use the following IP Address" and type in the IP-address you've got in step 3 (in this example "169.254.66.37"). "Subnet mask" should be 255.255.0.0. 9. Press OK. Next time the device is reconnected, it will just take a few seconds before the device is ready to be used with Connection proxy. Be aware that this static IP-address is only valid for this specific network interface. If switching to another device, a new network interface will be created and the same procedure has to be done to the new interface. Theoretically, the user can use any IP-address as the static address. The reason ipconfig was used in this example is that we want to make sure that the IP-address is really available, i.e no other devices already uses it.
Resource MonitorThe resource monitor is a fairly useful tool which can be used control the amount of memory etc your aplication uses. Keep in mind that a valid data account to be chosen in the phone.
Further readingHave more questions? Look in the forums. You can browse for more articles and postings on this subject using the tags below, such as this one. Even after following above document, my w910i does not connect to connectionproxy. It keeps showing alert telling USB settings and steps to turn on java developer mode (this has already been done). Any help? The Connection Proxy still works like crap on Vista. 2.5.0 is still the only version I been able to connect with. I have been trying to connect my SE K850, but unfortunately it is not working 1. When I connect my phone I get limited or no connectivity to the phone. 2. The device ip is 169.254.51.81, and it is replying when I ping it. 3. The firewall is off. 4. The ip detection is set to automatic i.e. no static IP is used. 5. I am using Sony Ericsson SDK 2.5.0.2. 6. When I try to connect to the interface using the Connection Proxy I get this message:
"The proxy could not connect to the handset.
The local interface was found, but wasn't ok. Perhaps it hasn't acquired an ip yet. If so please wait and try again!
If the local interface has acuired an local link address (169.254.xxx.xxx) it might be faster to unplug the handset and plug it again!
if you have set the ip address yourself (static ip), please undo it and let it be set automatically!
For more connectivity issues refer to: http://developer.sonyericsson.com/community/java_me"
Do you have any suggestions? When using SDK 2.5.0.2 the IP configuration have changed. There is now a DHCP server that gives the phone an IP address in the 192.168.x.x range.
/gustav I don't get it running. I have a W760i prototype. I try to get ODB running from within IntelliJ IDEA. I have done all that is described here. I was able to connect the connection proxy with the phone. I can use ejava without problems. But if I try to start on-device debuging from within IDEA, it starts to upload the MIDlet after a while, then it hangs a huge amount of time at 99% and then comes
The application itself is ok and runs fine if installed manually on the phone Hi, I have different behavior: If not connected to internet (by wifi) the connection proxy fails because port taken by another @, If connected to internet (by wifi) the computer hang (reboot needed due to lost of internet connection) I followed the procedure here above followed: at step "Connect the USB cable" no address is negotiated
WXP, SDK 2.5.0.2, SE K850i Attilio I am using Sony Ericsson SDK 2.5.0.2. too. The device ip is 169.254.20.31 I have the same error message as Mr. Halaseh.
"IP address in the 192.168.x.x range" is the property of SDK 2.5.0.2. How it info can help me ?
After following above instruction - "Solution Update the file ipprovider.settings to start using another subnet. The file can be found here: \SonyEricsson\JavaME_SDK_CLDC\OnDeviceDebug\lib\" , my SE K660i does not connect to connectionproxy.
I am using Sony Ericsson SDK 2.5.0.2 and also tried version 2.5.0.3. After installing Windows service pack 3, emulator won't connect or seems to recognize the phone anymore. I can get an ip address and nothing has changed except when trying to connect from emulator the phone is not finding. I'm getting the "make sure the device is connected" error. This is after installing sp3. I have a machine that still has windows service pack 2 and works ok there. Has anyone seen this issue? Could this be a compatibility issue and if so, which ones? Help is appreciated. Ok, I've got the same problem that er4z0had, but his solution has dissappeared.
I've got the phone connected but I need to debug an internet connection - how do I do this. i'd really appreciate some help. |
||||||||
|
||||||||
When debugging an application, that connects to the internet it will try to do this via USB-Networking and not via the Wireless Network . This can be problematic, if you want to debug things like. connectivity via UMTS/GPRS etc.
Can this be changed?