Gemalto is now part of the Thales Group, find out more.

You are here

SPI problems on the Concept Board (EHS6) | Thales IoT Developer Community

October 16, 2015 - 3:54pm, 3369 views

Hi Gemalto,,,

I can't get SPI to work on the Concept Board with AT commands or from Java.

Here's what I've done:

1. On the 'right-hand' switchbank (The one that has only 4 switches), I have switch 3 low and switch 4 high. According to the 'Concept_Board_Hardware_Interface_Description.pdf' page 13, this will send all the SPI signals to the shield interface (That's where I am looking for data output or at least a clock output).

2. Here's basically my java code:

try {

SpiConnection spiConn = (SpiConnection) Connector.open("spi:0;baudrate=100;clockMode=1");

int baudrate = spiConn.getBaudRate();

InputStream inStream  = spiConn.openInputStream();

OutputStream outStream = spiConn.openOutputStream();

 

while (true) {

 

System.out.println("Sending Spi again...");

 

try {

Thread.sleep(1000);

} catch (InterruptedException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

 

String data = "<dummy>";

outStream.write(data.getBytes(), 0, data.length());

outStream.flush();

}

}

catch (Exception e) {System.out.println(e);}

I expect to measure some data or clock signals on the SPI output on the shield interface (labelled 'SCK' and 'MOSI' on the concept board). I don't have a slave connected, but I assume it should work anyway.

3. I've tried to use the AT command 'AT^SCFG="Gpio/****/SPI","std" and I get the 'OK' response. My AT^SCFG? is pasted below:

AT^SCFG?

^SCFG: "Call/ECC","0"

^SCFG: "Gpio/****/ASC1","rsv"

^SCFG: "Gpio/****/DAI","gpio"

^SCFG: "Gpio/****/DCD0","std"

^SCFG: "Gpio/****/DSR0","rsv"

^SCFG: "Gpio/****/DTR0","std"

^SCFG: "Gpio/****/FSR","gpio"

^SCFG: "Gpio/****/HSIC","rsv"

^SCFG: "Gpio/****/PULSE","gpio"

^SCFG: "Gpio/****/PWM","gpio"

^SCFG: "Gpio/****/RING0","std"

^SCFG: "Gpio/****/SPI","std"

^SCFG: "Gpio/****/SYNC","gpio"

^SCFG: "GPRS/AutoAttach","enabled"

^SCFG: "Ident/Manufacturer","Cinterion"

^SCFG: "Ident/Product","EHS6"

^SCFG: "MEopMode/SoR","off"

^SCFG: "MEShutdown/Fso","0"

^SCFG: "Radio/Band","511"

^SCFG: "Radio/OutputPowerReduction","4"

^SCFG: "Serial/Interface/Allocation","1","1"

^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","on"

^SCFG: "Trace/Syslog/Otap","0"

^SCFG: "Userware/Autostart","0"

^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","asc0",,,,"off"

^SCFG: "Userware/Watchdog","0"

OK

4. My AT^SSPI? output only produces the following: '+CME ERROR: Unknown'.

Thanks for reading and please let me know if you have any advice.