Problems getting Eclipse Java Debugger running to EHS8 over USB | Telit Cinterion IoT Developer Community
March 2, 2016 - 8:22am, 12092 views
I am trying to setup Eclipse Java development environment for EHS8 on custom board.
I am trying to run On Device Debugging using the HelloWorld demo.
It seems to be close but problems with debugger connecting to EHS8.
I have copied the HelloWorld.jar and HelloWorld.jad files to the EHS8 using MES and successfully run it using:
AT^SCFG="Userware/Stdout","usb5"
AT^SJAM=0,"a:/HelloWorld.jad",""
AT^SJAM=1,"a:/HelloWorld.jad",""
I am using Windows 8.1 64-bit
I have installed JDK 7U25 using jdk-7u25-windows-i586.exe from “install CD” zip file
ehsx_rev03.001_arn0000014_install-cd.zip
I have installed Eclipse Juno SR2 from eclipse-mobile-juno-SR2-win32.zip.
I have run Setup file from install CD zip file, this has installed the Gemalto SDK and examples.
The PPP Modem is at COM4
The USB Com ports to EHS8 are on COM15-COM20.
I CAN issue AT commands over COM4 or other COM ports
Powered up board.
Plug in usb to EHS8
Waited at least 15 seconds
Open another Teraterm for Output and change Setup->Serial Port to COM19 115200 8N1 to match USB5 serial port from EHS8.
Open Another Teraterm for AT Command Console and change Setup->Serial Port to COM17 115200 8N1
In COM17 window:
at
OK
ati
Cinterion
EHS8
REVISION 03.001
OK
at^SCFG?
^SCFG: "Audio/Loop","0"
^SCFG: "Call/ECC","0"
^SCFG: "Call/Speech/Codec","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","gpio"
^SCFG: "Gpio/mode/DAI","gpio"
^SCFG: "Gpio/mode/DCD0","std"
^SCFG: "Gpio/mode/DSR0","std"
^SCFG: "Gpio/mode/DTR0","std"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/GPSANT","gpio"
^SCFG: "Gpio/mode/HSIC","gpio"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","gpio"
^SCFG: "Gpio/mode/SPI","rsv"
^SCFG: "Gpio/mode/SYNC","gpio"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","EHS8"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEShutdown/sVsup/threshold","0","0"
^SCFG: "MEopMode/CFUN","0","1"
^SCFG: "MEopMode/SoR","off"
^SCFG: "Radio/Band","511"
^SCFG: "Radio/Mtpl","0"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","0","0"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0058","Cinterion Wireless Modules","EHx",""
^SCFG: "Tcp/IRT","3"
^SCFG: "Tcp/MR","10"
^SCFG: "Tcp/OT","6000"
^SCFG: "Tcp/WithURCs","off"
^SCFG: "Trace/Syslog/OTAP","0"
^SCFG: "URC/Ringline","local"
^SCFG: "URC/Ringline/ActiveTime","2"
^SCFG: "Userware/Autostart","1"
^SCFG: "Userware/Autostart/Delay","0"
^SCFG: "Userware/DebugInterface","0.0.0.0","0.0.0.0","0"
^SCFG: "Userware/DebugMode","on"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","null",,,,"off"
^SCFG: "Userware/Watchdog","0"
OK
at^SCFG="Userware/Stdout","usb5"
^SCFG: "Userware/Stdout","usb5",,,,"off"
OK
Start Eclipse
Select HelloWorld project
Run->Debug as->Emulated Java ME Midlet
Popup Window:
Problem Occurred
‘Launching HelloWorld’ has encountered a problem.
Couldn’t connect to virtual machine
Debugger launch time-out exceeded
Console Window:
Using USB port COM4.
Connecting to module...
Initializing module for debugging...
Establishing "IP connection for remote debugging of EHSx"...
Registering ip address "192.168.244.1" of remote debugging device...
Waiting for debug device registration of "IMP_NG_EHS5_REMOTE"...
Passing control to external device emulator...
Failed to connect remote debugging device!
*** Error ***
Device "IMP_NG_EHS5_REMOTE1" not registered!
End of debug session. Emulator is closed!
Opened Command Prompt
(Partial ipconfig shown)
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\dpanderson>ipconfig/all
Windows IP Configuration
Host Name . . . . . . . . . . . . : dpalap2
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
PPP adapter IP connection for remote debugging of EHSx:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : IP connection for remote debugging of EH
x
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.244.2(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Enabled
NOTE: I CAN ping the EHS8 over PPP:
C:\Users\dpanderson>ping 192.168.244.1
Pinging 192.168.244.1 with 32 bytes of data:
Reply from 192.168.244.1: bytes=32 time=2ms TTL=128
Reply from 192.168.244.1: bytes=32 time=2ms TTL=128
Reply from 192.168.244.1: bytes=32 time=2ms TTL=128
Reply from 192.168.244.1: bytes=32 time=2ms TTL=128
Ping statistics for 192.168.244.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip ***** in milli-seconds:
Minimum = 2ms, Maximum = 2ms, Average = 2ms
RERAN AT^SCFG? AFTER DEBUGGER
at^SCFG?
^SCFG: "Audio/Loop","0"
^SCFG: "Call/ECC","0"
^SCFG: "Call/Speech/Codec","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","gpio"
^SCFG: "Gpio/mode/DAI","gpio"
^SCFG: "Gpio/mode/DCD0","std"
^SCFG: "Gpio/mode/DSR0","std"
^SCFG: "Gpio/mode/DTR0","std"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/GPSANT","gpio"
^SCFG: "Gpio/mode/HSIC","gpio"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","gpio"
^SCFG: "Gpio/mode/SPI","rsv"
^SCFG: "Gpio/mode/SYNC","gpio"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","EHS8"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEShutdown/sVsup/threshold","0","0"
^SCFG: "MEopMode/CFUN","0","1"
^SCFG: "MEopMode/SoR","off"
^SCFG: "Radio/Band","511"
^SCFG: "Radio/Mtpl","0"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","0","0"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0058","Cinterion Wireless Modules","EHx",""
^SCFG: "Tcp/IRT","3"
^SCFG: "Tcp/MR","10"
^SCFG: "Tcp/OT","6000"
^SCFG: "Tcp/WithURCs","off"
^SCFG: "Trace/Syslog/OTAP","0"
^SCFG: "URC/Ringline","local"
^SCFG: "URC/Ringline/ActiveTime","2"
^SCFG: "Userware/Autostart","1"
^SCFG: "Userware/Autostart/Delay","0"
^SCFG: "Userware/DebugInterface","192.168.244.1","192.168.244.2","0"
^SCFG: "Userware/DebugMode","on"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","usb5",,,,"off"
^SCFG: "Userware/Watchdog","0"
OK
NOTE: Starting up debugger automatically set IP addresses in “Userware/DebugInterface”
I have turned off Windows Firewall.
What else am I missing in setup?
Has anyone run debugger with Windows 8.1 64-bit?
Has anyone run debugger with newer Java JDK like Java 8U74 or must I stick with Java7u25 to be compatable with Cinterion SDK and setup files?
Hello,
Windows 8 is not officially supported but it still can work.
Please open the project properties click on Java ME and make sure that the configuration is IMP_NG_EHS5_REMOTE1 and not IMP_NG_EHS5_REMOTE.
Please also make sure that you don't keep the modem port open in the terminal or MES is not configured for that port.
Try to restart the module but close the OJMEE first (you will find it open in the system tray) and close all USB connections to the module.
Regards,
Bartłomiej
Based on your response, here is what I have tried:
I powered up Module
I connected USB from EHS8 to PC
I opened File Explorer
I right clicked on Module, selected Properties, selected Port Tab, and selected COM18 (EHS8 usb4 connection so that it doesn’t match the COM4 that the modem uses)
Open system Tray and if OJMEE Device Manager 3.2 is there, right click on it and select Exit and wait for it to go away from system tray.
Right Click on Windows icon->Control Panel->Network and Internet->Network and Sharing Center->Change Adapter Settings
If “IP connection for remote debugging of EHSx” does not say Disconnected then right click on it and select Status then click Disconnect button.
I opened Eclipse
I right clicked on HelloWorld project and selected Properties->Java ME and confirmed that the configuration=”IMP_NG_EHS5_REMOTE1” and the active box is checked.
I clicked OK to close window
Select HelloWorld project
Run->Debug as->Emulated Java ME Midlet
Same result as before
I tried repeating again – same result
Let me know if I misunderstood something and what can I check next.
Thanks
Just an update.
I am still unable to get the debugger to connect to the EHS8 under Windows 8.1 64-bit
I think I discovered that during installation, after installing Java JDK and extracting Eclipse Zip file, It is necessary to start Eclipse at least once and select the Workspace then close Eclipse BEFORE running the Setup.exe program to install the remainder of the tools. Otherwise the customizations that add the Cinterion SDK and the device IMP_NG_EHS5_REMOTE1 don’t get added properly. If you change to a new workspace this ***** to be rerun.
In Eclipse:
Select Menu item Windows->Preferences->Java ME->Device Management
Confirm presence of:
Folder IMP-NG EHS5 Wireless Toolkit by Cinterion
IMP_NG_EHS5
IMP_NG_EHS5_REMOTE1
If these are missing:
Close Eclipse
Power up the Module and connect the USB cable from the module to the PC.
Go to Control Panel->Uninstall programs
Select the Gemalto EHSx SDK
Click Change
then select Repair
It ran through everything again and fixes the configuration.
---------------
I dug an old laptop out of “mothballs” that still had Windows 7 64-bit on it.
I went through the installation and the debugger connected to the EHS8 properly.
Here are the expected Console messages from the HelloWorld Demo application:
Using USB port COM27.
Connecting to module...
Initializing module for debugging...
Establishing "IP connection for remote debugging of EHSx"...
Registering ip address "192.168.244.1" of remote debugging device...
Waiting for debug device registration of "IMP_NG_EHS5_REMOTE"...
Passing control to external device emulator...
Installing suite from: http://192.168.244.2:49686/HelloWorld.jad
Constructor
startApp
Hello World
Sending dispose command to the VM.
destroyApp(true)
End of debug session. Emulator is closed!
(NOTE: The Port Number (49686) changes when run again – it is not a fixed value)
----------
I have disabled Windows Firewall and rebooted PC before trying to use the debugger but still cant get this to work under Windows 8.1
I have been searching for differences between the installations on the Windows 7 vs the Windows 8.1 PC but have not found anything that will get this to run under Windows 8.1
Hello,
There's always the option to remove everything including the drivers and try again but in this case it doesn't seem to have sense.
You could try to compare the logs from the debugger for both systems. You will find the file here: C:\Users\your_profile_name\Cinterion\EHS5-WTK\3.2\log
You could also try with NetBeans which is in the zip file too. It might turn out that it will be working in NetBeans.
Regards,
Bartłomiej
I have tried removing everything including the drivers. reinstalling Java, fresh unzip of Eclipse. reinstall Gemalto drivers. Same result, Works on Windows 7, doesnt work on Windows 8.1.
Thanks for pointing out that log file.
It is amazingly detailed.
The logs for Windows 8.1 did not contain any errors.
The logs were identical up until the device was detected (except of the dynamic PORT number).
The Windows 8.1 logs just registered and removed callback id pairs from 0+1 to 14+15.
The Windows 7 log detected the device during callback ids 4+5.
The first differences in Windows 7 were the following BOLD lines:
[2016-03-04 00:54:53.730] DEBUG - ver.rmiimpl.CallbackServerImpl - Registering callback on DeviceManager with DeviceRegistrationListener
[2016-03-04 00:54:53.730] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback succesfully registered with id 4.
[2016-03-04 00:54:53.730] DEBUG - ver.rmiimpl.CallbackServerImpl - Registering callback on DeviceRegistrationManager with DeviceStateListener
[2016-03-04 00:54:53.730] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback succesfully registered with id 5.
[2016-03-04 00:54:53.760] DEBUG - device.GenericOdtDeviceAdapter - Using detected address for device 1: address = 192.168.244.1, port = 55123
[2016-03-04 00:54:53.770] DEBUG - g.bridge.JavameSocketConnector - Connecting to /192.168.244.1:55123
[2016-03-04 00:54:53.770] DEBUG - g.bridge.JavameSocketConnector - Connected to /192.168.244.1:55123
[2016-03-04 00:54:53.770] DEBUG - ver.rmiimpl.CallbackServerImpl - CallbackServer created
[2016-03-04 00:54:53.770] INFO - .rmiimpl.RemotingConnectorImpl - Starting JMX connector on service:jmx:rmi:///jndi/rmi://127.0.0.1:60222/device-1
[2016-03-04 00:54:53.880] DEBUG - mon.channel.NetmonChannelProxy - Starting post thread
[2016-03-04 00:54:53.890] DEBUG - et.portforwarder.PortForwarder - Started forwarding 50203 <-> 192.168.244.1:51235.
[2016-03-04 00:54:53.900] DEBUG - et.portforwarder.PortForwarder - Started forwarding 50204 <-> 192.168.244.1:51236.
[2016-03-04 00:54:53.910] INFO - kdp.KDP - JavaME Debug Agent started with options:
[2016-03-04 00:54:53.910] INFO - kdp.KDP - Local port listening for debugger: 50205
[2016-03-04 00:54:53.910] INFO - kdp.KDP - VM host: 192.168.244.1
[2016-03-04 00:54:53.910] INFO - kdp.KDP - VM debugging port: 2808
[2016-03-04 00:54:53.930] INFO - kdp.KDP - Waiting for debugger on port 50205
[2016-03-04 00:54:53.940] INFO - kdp.KDP - KVMListener: got connection Socket[addr=/192.168.244.1,port=2808,localport=50206]
[2016-03-04 00:54:53.940] INFO - kdp.KDP - KVMListener: Sending handshake string to VM
[2016-03-04 00:54:53.982] DEBUG - try.rmi.DeviceStateManagerImpl - Device 1 state set to: CONNECTED
Hello,
Could you also paste the log from Widows8?
How about NetBeans, have you tried it?
Regards,
Bartłomiej
As I said, up until the point in bold, the Windows 8 logs were identical (except dynamic port number).
The windows 8 log just continues on and tears down the callbacks and registers them again.
From Windows 8.1 log:
[2016-03-04 01:47:21.062] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback succesfully registered with id 4.
[2016-03-04 01:47:21.064] DEBUG - ver.rmiimpl.CallbackServerImpl - Registering callback on DeviceRegistrationManager with DeviceStateListener
[2016-03-04 01:47:21.064] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback succesfully registered with id 5.
[2016-03-04 01:47:21.092] DEBUG - ver.rmiimpl.CallbackServerImpl - Removing callback with id 4
[2016-03-04 01:47:21.092] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback 4 removed from object.
[2016-03-04 01:47:21.093] DEBUG - ver.rmiimpl.CallbackServerImpl - Removing callback with id 5
[2016-03-04 01:47:21.093] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback 5 removed from object.
[2016-03-04 01:47:26.342] DEBUG - ver.rmiimpl.CallbackServerImpl - Registering callback on DeviceManager with DeviceRegistrationListener
[2016-03-04 01:47:26.343] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback succesfully registered with id 6.
[2016-03-04 01:47:26.345] DEBUG - ver.rmiimpl.CallbackServerImpl - Registering callback on DeviceRegistrationManager with DeviceStateListener
[2016-03-04 01:47:26.345] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback succesfully registered with id 7.
[2016-03-04 01:47:26.373] DEBUG - ver.rmiimpl.CallbackServerImpl - Removing callback with id 6
[2016-03-04 01:47:26.373] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback 6 removed from object.
[2016-03-04 01:47:26.374] DEBUG - ver.rmiimpl.CallbackServerImpl - Removing callback with id 7
[2016-03-04 01:47:26.375] DEBUG - ver.rmiimpl.CallbackServerImpl - Callback 7 removed from object.
etc... up to ids 14 and 15.
**********
I am unclear if others are using Eclipse successfully on Windows 8 and am trying to debug a driver conflict unique to my PC or if others are only compiling but not debugging or even not using Eclipse on Windows 8 and it doesnt work for anyone?
Was hoping other users might chime in with it works for them on Windows 8.1 64-bit using Eclipse version XX, Java version XX.
I have not tried Netbeans under Windows 8.
I need to keep the project moving forward and am using Eclipse on old Windows 7 PC for now.
Hello,
You're right that this log is not much helpful - there's no errors in it.
I'd try with NetBeans to compare if there will be the same behaviour.
Regards,
Bartłomiej
Hi All,
I've been trying to Run/Debug on a Windows 8.1 x64 machine, and at this moment I'm able to Run/Debug any project that doesn't need cwmlib_1.0.jar included on the libraries. when trying to emulate the project it sends JAD file to modem, but when module tries to get JAR file emulator looses connectivity via dial-up connection, i.e. I loose ping connectivity to module, if no cwmlib_1.0.jar it ransfers both files to module, installs everything as expected and runs without loosing IP connectivity with modem. The problem everyone is facing has nothing to do with IDE or JDK versions, in Win7 x32 I have working latest Eclipse Mars, JDK 8u92...
The same JAD/JAR pair, I can copy it to module A:/, and the install the midlet with AT^SJAM regular AT commands, so JAD/JAR are OK, module can handle correctly the installation.
I see some comments that this SW package can run on a Win8.1 machine, I was able to put it running on Win7 x32, but Win8.1, no way to get dial-up to proceed with the JAR file transfer. I checket JAR size is OK also.
Anyone?
Regards,
William
Hello,
Interesting. How about if you added some other jar instead of cwmlib or some file just to make the MIDlet bigger. It's hard to believe that cwmlib could cause the problem. As the latest officially supported system is Win 7 I'd still bet that maybe the problem is caused by some incompatibility or unexpected system settings etc...
Regards,
Bartłomiej
Pages