Problems getting Eclipse Java Debugger running to EHS8 over USB | Telit Cinterion IoT Developer Community
March 2, 2016 - 8:22am, 11181 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?
Hi,
I have a lot bigger applications then AtCmdDemo with the lib included, it's not a size issue. If I put OTAP debug enabled, module gets the full size of JAD and JAR, I use netstat to check transfered bytes, I beleive module downloads the file and only states ok after starting installation, but it seems to fail this step.
Is it possible to get cwmlib source? Or add it to project unpacked? After compiled the app, it puts cwmlib on a trusted directory, and jad/jar on another directory, does the module get lib on a separated download? Or should it be packed on jad/jar pair?
Regards,
William
Hi,
I made a little more progress, I installed a Win8.1 Java emulator, where I created BGS5_REMOTE1 device, and ran the JAD/JAR generated by AtCmdDemo, and as expected it blows up:
Constructor
java.lang.NoClassDefFoundError: com/cinterion/internal/ATCommandHelper
- com.cinterion.io.ATCommand.<init>(ATCommand.java:689)
- AtCmdDemo.AtCmdDemo.<init>(AtCmdDemo.java:73)
- java.lang.Class.newInstance(), bci=0
- com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=65
- com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=64
- com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=25
- com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
- com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
- com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=124
- com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
[AMS-TRACE] MIDlet:AtCmdDemo MIDlet Suite status=2
[AMS-TRACE] MIDlet:AtCmdDemo MIDlet Suite status=3
[AMS-CRITICAL] MIDlet:AtCmdDemo MIDlet Suite abnormal exit
[AMS-CRITICAL] MIDlet:AtCmdDemo MIDlet Suite restart
Or ATCommandHElper class is missing, or module can't get it internally....
Opening cmwlib, there is no such class, but some references to it, this makes me think that it's implemented inside module VM, but when installing via debug, it can't find it.
Any thoughts on how to solve this?
Regards,
William
Hello,
Could you paste a log from OTAP tracer?
When cwmlib is marked for export in Eclipse it is unpacked and the class files are packaged to the jar together with your program files. The ATCommandHelper class is not a part of cwmlib library - maybe you get this exception because JRC MIDlet is not running.
Regards,
Bartłomiej
Hi,
Eclipse:
Using USB port COM7.
Connecting to module...
Initializing module for debugging...
Establishing "IP connection for remote debugging of BGSx"...
Registering ip address "192.168.244.1" of remote debugging device...
Waiting for debug device registration of "IMP_NG_BGS5_REMOTE"...
Passing control to external device emulator...
Installing suite from: http://192.168.244.2:55068/AtCmdDemo.jad
OTAP Tracer:
at^scfg="Trace/Syslog/Otap","1"
OTAP.OUT STARTED
[OTAP] Try to get http://192.168.244.2:55068/AtCmdDemo.jad ...
[OTAP] Transfer finished.
[OTAP] Try to get http://192.168.244.2:55068/AtCmdDemo.jar ...
After this is looses connectivity with modem, I need to force disconnect Dial-Up.
Regards,
William
Hi,
Now, HelloWorld demo, or any other without the need to import cwmlib_1.0.jar:
Eclipse:
Using USB port COM7.
Connecting to module...
Initializing module for debugging...
Establishing "IP connection for remote debugging of BGSx"...
Registering ip address "192.168.244.1" of remote debugging device...
Waiting for debug device registration of "IMP_NG_BGS5_REMOTE"...
Passing control to external device emulator...
Installing suite from: http://192.168.244.2:55303/HelloWorld.jad
Constructor
startApp
Hello World
OTAP Debug:
at^scfg="Trace/Syslog/Otap","1"
OTAP.OUT STARTED
[OTAP] Try to get http://192.168.244.2:55303/HelloWorld.jad ...
[OTAP] Transfer finished.
[OTAP] Try to get http://192.168.244.2:55303/HelloWorld.jar ...
[OTAP] Transfer finished.
[OTAP] Installation completed with result: 900 Success
[OTAP] No NotifyURL set. Not posting result.
And I can do this over and over again, module never looses connectivity...
Regards,
William
Hello,
So it looks like the files transfer procedure is not finished so there is no chance for installation attempt.
But as the Windows 8 system is not listed as supported systems list there is not much I can do more here. I could only speculate what is so special in the cwmlib and what is the difference in Win 8 that the transmission hangs. If the system was supported I would be able to report this problem as defect and some experts would analyse it and fix. Or this problem would probably not even exist then.
Regards,
Bartłomiej
Hi,
So this means that who ever is in charge of SDK maintenance is stuck to a OS that is no longer available, and anyone who is quite stupid and want's to use Cinterion Java modules must work with hacked versions of Win7?
Regards,
William
Dear William,
Unfortunately at the moment only Windows 7 is officially supported (but you can still buy it as far as I know). I'm sure it's going to change in the future.
However as you can find on this forum it is possible to use on device debugging feature with some versions of newer Windows. But as we don't officially support these versions we cannot guarantee that it will work with all Windows 8 and newer installations.
Best regards,
Bartłomiej
Hi,
I also can use debug features, in Win 8, 8.1, 10.... but only if no cwmlib imported to the project.
Regards,
William
Thank you William,
Anyway it is a new information about the cwmlib influence on debugging feature with newer Windows systems. So it might help in final preparation of support for these systems.
Regards,
Bartłomiej