SPI problem on EHS5 | Telit Cinterion IoT Developer Community
September 19, 2016 - 8:34am, 7611 views
Hello,
I have a problem with SPI port on EHS engine REVISION 03.001, A-REVISION 00.000.14.
Initially I tried to open SPI port from Java midlet, but the code:
SpiConnection spiConnection = (SpiConnection)Connector.open("SPI:0;baudrate=100;clockMode=0");
thrown an javax.microedition.io.ConnectionNotFoundException, then I tried to use AT commands without any running midlet. First of all, I configured the port:
AT^SCFG="GPIO/mode/SPI"
but I received a "+CME ERROR: Unknown" to all these commands:
AT^SSPI?
AT^SSPI=?
AT^SSPI=1000,0000,1000
AT^SSPI=
Can you help me? Is there a wrong step in my procedure? The same commands works perfectly with BGS5 engine.
Thank you in advance.
Best regards,
Alessio.
Hello,
Could you paste AT^SCFG? output?
Regards,
Bartłomiej
Hello,
Please enable autostart and then try again. According to your log the autostart is disabled:
^SCFG: "Userware/Autostart","0"
Without autostart the factory JRC MIDlet is not starting automatically. And without that MIDlet some functionalities may not be working.
Regards,
Bartłomiej
Hello,
you are right, now it works via AT commands, but I'm not able to use SPI from java. I also tried with "spi" (lower case), but without success:
SpiConnection spiConnection = (SpiConnection)Connector.open("spi:0;baudrate=100;clockMode=0");
Thanks,
Alessio.
The connection string seems OK. What is exactly the result (exception) - same as before? Could you paste some log?
Are you using autostart for your MIDlet or you start it manually? There is also autostart delay configured for 5 seconds but I don't expect that you start your app faster after reboot.
The exception is "javax.microedition.io.ConnectionNotFoundException". In the SCFG report that you seen the autostart was disabled to try the AT commands, but normally I use autostart with a delay of 5 seconds, and I catch the exception during peripheral inizialization, few moments after start.
The midlet works fine, except this issue.
Alessio.
Please paste the log including the whole stack trace.
If your application is started by autostart, please try manually first and if you need autostart please set Oracle-MIDlet-Autostart: 2.
Regards,
Bartłomiej
Hello,
The exception is thrown on opening the connection. The connection string looks fine (I have also checked this string in my MIDlet), so there is a problem with connection target interface initialization.
As you claim it is working when you use AT commands, so maybe your MIDlet is causing the problem, changing the configuration or something else - could you try to reproduce it in a separate MIDlet without other activities? Can you write what else is the MIDlet doing?
Regards,
Bartłomiej
I have the same exception with a basic MidLet:
Pages