HE910, I2C Write problems

9 thoughts on “HE910, I2C Write problems

  1. I’m having problems
    write I2C commands to the Codec, MAX9867. As described in “HE910 Family Digital
    Voice Interface, App Note (Telit_HE910_DVI_Application_Note__r2)”, page 14, you
    should write to the codec with this command:






    But I never
    get a OK.

    This is the
    command I use:

    echo -e
    ‘AT#I2CWR=10,9,30,4,19r’ > /dev/ttyACM0

    echo -e
    ‘00109000100A330000330C0C09092424400060r’ > /dev/ttyACM0


    It looks
    like the write command never gets an finish or end of command. I do not see any
    activity on the I2C bus on the oscilloscope.


    How do I
    tell the modem that the I2C command is finish and it should start writing or I’m
    doing something else wrong?


    We have updated
    the modem with the latest firmware.


    1. You should positive have confirmation of the > prompt arrival before sending data.


      Signaling data end (although len is specified in the command):


      To complete the operation send Ctrl-Z char (0x1A hex); to exit without writing
      the message send ESC char (0x1B hex). 



      1. Yes I get a promt before I send the data. 

        I have now tried completing the transaction with
        a Ctrl-Z  (0x1A = 32 octal ) as you
        suggested and I get a result. Sadly it is an error.


        Here is what I write:


        echo -e ‘AT#I2CWR=10,9,30,4,19r’ > /dev/ttyACM0

        Print out:



        echo -e ‘00109000100A330000330C0C09092424400060r’
        > /dev/ttyACM0

        Print out:



        echo -e ‘032’ > /dev/ttyACM0

        Print out:


        1. Hi,


          module replies with an ERROR  in case of no acknowledge received by external device.

          The reason could be you mistake to define the GPIO pins usedas a I2C bus or device is not turned on.. or signal integrity issues so device is not able to decode the data.

          1. I can’t see any activity what so ever on the I2C bus
            when executing these commands. I’m using an oscilloscope to verify activities
            on the I2C bus. But when I do I2C reads, (for example echo -e
            "AT#I2CRD=10,9,31,0,24r" > /dev/ttyACM3), I get activities on the
            I2C bus and an OK for answer.



            It looks like the device not even tries to access the
            I2C when executing I2C write commands.

          2. I
            got it working!


            I had to attach the Control-Z at the end of the datastring, like this

            echo -e ‘00109000100A330000330C0C09092424400060032’
            > /dev/ttyACM0


            And then I
            got an OK and I could verify the write with a read command.


            Thank you for your help! 

          3. I seem to have a somewhat similar problem. Module is HE910-EUG, fw 12.00.216.

            I2C reads work fine, but write commands do not prompt the ‘>’ character. 

            I use the RS-Term-Plus to communicate between the PC and the module. Please see below:


            Send: at#i2crd=3,2,90,00,3<cr>

            #I2CRD: FFFF80


            Send: at#i2cwr=3,2,90,00,1<cr>

            Send: 81,1a<cr><lf>
            > 81,1a


            So AFTER sending “blind” the data ’81’ and the ctrl-Z there seems to be the prompt echoed,

            but then the module remains silent and will not answer, before issuing a hw reset.

            Any ideas, anyone, please?

          4. Hi Tom,

            please verify exactly what are you sending to module and if you are loosing some chars.

            My log below:

            10/08/2016 16:49:57.404 [TX] – AT#I2CWR=8,9,30,4,19<CR>

            10/08/2016 16:49:57.419 [RX] – AT#I2CWR=8,9,30,4,19<CR>
            10/08/2016 16:50:00.049 [TX] – 00109000100A330000330C0C09092424400060<SUB>
            10/08/2016 16:50:00.069 [RX] – 00109000100A330000330C0C09092424400060<SUB><CR><LF>

          5. Hi Tom,

            it seems an issue related to the fact your device has a single register and to write on it you have to use a continuous format transmission on I2C.

            This kind of I2C managemetn will be available on ht enext official release 12.00.xx8 in the format:

            AT#I2CCF=<sdapin>,<sclpin>,<dev id>,<lenwr>,<lenrd>

            so in your case should be:


            >val to write