Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

I2C configuration | Telit Cinterion IoT Developer Community

February 18, 2017 - 11:36pm, 3904 views

I've been having problems communicating with an I2C sensor

for some time.

I think I've got the EHS6 configured correctly, but would appreciate

advice from the pros.

I'm using an HDC1000 sensor. It has a fixed (slave) address @ 0x40.

Using "AT" commands, I do the following:

+PBREADY
ati1
Cinterion
EHS6
REVISION 03.001
A-REVISION 00.000.49

OK
at^scfg?
^SCFG: "Audio/Loop","0"
^SCFG: "Call/ECC","0"
^SCFG: "Call/Speech/Codec","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","rsv"
^SCFG: "Gpio/mode/DAI","gpio"
^SCFG: "Gpio/mode/DCD0","gpio"
^SCFG: "Gpio/mode/DSR0","rsv"
^SCFG: "Gpio/mode/DTR0","gpio"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/HSIC","rsv"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","gpio"
^SCFG: "Gpio/mode/SPI","std"
^SCFG: "Gpio/mode/SYNC","gpio"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","EHS6"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEShutdown/sVsup/threshold","0","0"
^SCFG: "MEopMode/CFUN","0","1"
^SCFG: "MEopMode/Comp1",""
^SCFG: "MEopMode/ExpectDTR","current"
^SCFG: "MEopMode/ExpectDTR","powerup"
^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","on"
^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","usb4",,,,"off"
^SCFG: "Userware/Watchdog","1"

OK
AT^SSPI=0010,0000,0000
CONNECT

--I entered--

<M40>{return}

------------

EHS6:
{M+}

---I entered---

<M4000>

--------------

EHS6 return:

{M-0001}

It's odd because if I don't have a device connected to the

I2C interface, I get the same response.

In an odd coincidence, if I use the Java libraries for I2C

(with no I2C devices connected) I can issue the commands

"I2cBusConnection conn = (I2CBusConnection) Connector.open("i2c:0")"

(and get a "CONNECTED" response), then

"conn.OpenOutputStream().write("<M40>".getBytes());"

command, and a subsequent "read" to the inputstream delivers some

data.

I've connected a logic analyzer to the I2CCLK/I2CDAT lines, and at all

times I've gotten no transitions in line state<s>.

Some questions are:

Should a "Connector.open("i2c:0")" command say "CONNECT"

if there are no I2C devices connected (does this indicate a connection

to the bus and not to any particular slave)?

If you send a "write" command to I2C and an address for a

device that isn't connected to the I2C bus, should you get "data"

back from a DataInputStream.read(byte[] b) call?

Does the output of the ^SCFG? command look like I've configured

the EHS6 correctly for I2C comms?

(I'm pretty certan I've gotten the GPIO/config stuff messed up)

Thanks for any help/suggestions!

-U4-