This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SensroTag GATT ERROR CODE:3

Other Parts Discussed in Thread: MSP-FET

Hi, I tried to build SensorTag source codes to run on the SensorTag and connect with Android app. 

I downolad BLE software from: http://www.ti.com/tool/ble-stack. Use IAR 8.30.2.

My first problem is: When building source code by IAR, it says: Error while running Linker. Then I followed the link to make this error disappear: http://e2e.ti.com/support/low_power_rf/f/538/p/305764/1069645.aspx

Then I can finally build source code without error and program codes into SensorTag. Android app can scan and connect with SensorTag, but then it says: GATT ERROR CODE:3

Please help me to solve the problem. Did I compile source codes correctly? How to solve GATT error?

One more clue: I download SensorTag firmware from: http://processors.wiki.ti.com/index.php/SensorTag_Firmware. rev 1.4 works very well with android app. But rev 1.5 also gets the "GATT ERROR CODE:3".

Thank you.

  • Hi Shiwei,

    I have not seen that error message before, have you looked at our Android example App, found here.

    Best Regards

    Joakim

  • Yes. I download this android app from same link. My tablet is new nexus 7. I will try again. Thank you.

  • I have the same problem..

    Sometime GATT error: 13 or 3

    ~

  • Hi,

    Can anyone share howto solve the problem?

    My setup:

    samsung galaxy note3, with andriod 4.42, running the TI BLE Sensortag from the play store

    BLE-CC254x-1.4.0

    Error code:  3 or 13

    Urgent!

    thanks

  • Has anyone resolved this issue? I just received my SensorTag and get the same messages using the the TI SensorTag app from the play store.

    GATT error code: 13 then GATT error code: 3 right after that.

    I don't get readings for Humidity or Barometer

    Firmware is 1.5

    Thanks

    WW

  • Same issue here.

    HTC One, 4.4.2, running SensorTag app downloaded from play store today - late August 2014.

    Firmware 1.5, error codes 3 and 13, scan and connect works well - I only appear to get data from ambient temp and object temp.

  • Hi,

    Mostly I guess it's problem from application side because error codes are 13 and 3.

    13 means "A write operation exceeds the maximum length of the attribute"

    3 means "GATT write operation is not permitted" . This is because wrong length of attribute.

    Can you try to get older version of application and try? Mostly it shouldn't be error from firmware side.

  • I do get the same error 13 and 3 after upgrading the FW to 1.5.

    It came with FW 1.4 and I'm running the App on a Galaxy S5 with 4.4.2. From the sensors only temperature seem to still work.

    The current image shows: Not an OAD image

    Appreciate any help.

    Thx, GG430

  • Hi all. Same problem here with same versions as everyone else. Android application from the app store, and this all started happening after a crash of the very poorly written android app when upgrading firmware. The oad firmware updater no longer detects an oad firmware on the device, yet I get temperatures streamed back. Anyone have any ideas? At this point I consider the device bricked... 

  • Not bricked.

    I had both GATT error 13 and 3 and had no measurements after firmware upgrade with Android (Nexus 5, 4.4.2).

    Accessing via iPad reveals a much nicer interface with which my device works very well.

    Appears to be Android app is less developed.

    'twould be nice if TI treated Android as well as it does ios.

  • I received the SensorTag today, took it out, assembled it, downloaded the app, and it immediately had problems. No problem connecting, no problem communicating, but the accelerometer output displayed only '*'s. Same for the gyroscope. All other sensors were fine. I pulled out the battery and reinserted it. Then the gyroscope gave a display, but there was a 4.7 deg/sec bias on the x and a 1.2 deg/sec bias on the z, even when it was sitting motionless on a desk. Still no accelerometer readings. I thought maybe upgrading the firmware from 1.4 to 1.5 would help. It seemed to go through the upgrade just fine, but then it gave me these dreaded error codes (GATT error code 13 and 3). I can't even reload the firmware, because the app keeps crashing as soon as it starts the upgrade. I don't have an iPad, so I can't do that test. If I want to communicate with windows, it says I need a TI USB dongle. If I want to reload the firmware, it says I need a  CC Debugger and SmartRF Flash Programmer. I do have an MSP-FET, but I guess I'd have to make some sort of adapter to be able to connect.

  • Hi Dan,

    I'm sorry to hear that the sensor tag isn't working. It could be that the sensors have been damaged during transportation. You should contact the vendor that sold it to and see if you can get a new one. If not, send me a private message including a corporate address and I'll send you a CC Debugger free of charge, so that you may re-flash the sensortag.

    Best Regards

    Joakim

  • Joakim, I had a very similar problem:

    1. Got SensorTag running v 1.4

    2. Magnetometer/Gyro showed data, Accelerometer just showed * g

    3. Upgraded to v 1.5

    4. Error 13 messages.

    UPDATE: Solved by hard restart of the SensorTag.

  • I got the same problem.

    F/w version: v. 1.5, (BLE_CC254x_140.zip)

    APP reversion: 1.10, ASUS Nexus 7 Android 4.4.4 KTU84P

    Any suggestion?

    Thanks~

    << Error Description >>

    ====

    GATT ERROR CODE:3    

    is GATT_WRITE_NOT_PERMITTED,

    occurred when "onCharacteristicWrite()" write to UUID

    AA32 (Magnetometer Configuration)

    AA42 (Barometric Pressure Configuration)

    AA52 (Gyroscope Configuration)

    ====

    GATT ERROR CODE:13

    is GATT_INVALID_ATTRIBUTE_LENGTH,

    occurred when "onCharacteristicWrite()" write to UUID

    AA12 (Accelerometer Configuration)

    AA22 (Humidity Configuration)

    ====

    Only AA02 (IR Temperature Configuration) has no problem...

  • I change the F/w back to v.1.4, and modify the GATT_TIMEOUT to 400 ms (from 100 ms) in DeviceActivity.java.

    Then the sensor values are shown correctly.

  • Hi Andrew,
    How did you succeed to downgrade the FW from 1.5 to 1.4 ?
    I tried a lot but I am not able to do as android app crashes after a couple of seconds and currently I am stuck. I have a motorola android phone (XT1032) and after being able to upgrade to 1.5 I get error code 3 and 13.
    It seems that those BT sensors are not so reliable as I expected, maybe I revert to Zwave.
    BR
    Bob
  • Well, it seems that an hard reset of the android device fixes the problem. Now I can even see accelerometer data that were null with 1.4 FW.
    At least it worked with my device :-) ...
  • It's 07 Jan 2015.   Are there any updates on this issue?

    Moto X (1st generation) running Android 4.4.2

    BLE Sensor Tag app  Revision 1.01

    SensorTag Firmware 1.5

    Getting GATT Error 13 and/or 3

  • I download the BLE-CC254x-1.4.0 software stack from TI, and compile the SensorTag source code directly. This is what I mean v.1.4.

    But I found that the problem is GATT_TIMEOUT in APP is too short.

  • I've seen intermittent problems of this sort with new SensorTags (with 2 so far). After some time, they seem to just go away. No idea why this happens though, but once the error 3/error 13s stopped, I haven't seen them come back.

  • Hi,
    I have exactly the same problem.
    Have youy found a solution?
    Tkanks
  • Hello,

    I received the sensor tag today. Was pairing, getting button and temp inputs on FW v1.4.
    Then upgraded to v1.5 and started getting Code 3 and 13 errors and buttons/sensors stopped working.
    Tried hard reset - same errors.
    Tried reboot to clear the cache (Nexus 5 running 5.0.1) - same errors.

    I then went into bluetooth settings, manually paired and added the sensor tag to trusted devices.

    Success. Buttons/sensors all working.

    Hope this helps.