# Inquiries about ABSensor N01

**URL:** <https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861>\
**Category:** AprilBeacon\
**Created:** [July 28, 2022, 2:38am UTC](https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861 "2022-07-28T02:38:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimbobv22](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/kimbobv22/32/596_2.png) [@kimbobv22](https://bbs.aprbrother.com/u/kimbobv22)\
**Post date:** [July 28, 2022, 2:38am UTC](https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861/1 "2022-07-28T02:38:35Z")

</div>

Hello this is paul at south korea who developing program for ABSensor N01.

while i develop abeacon mode, An error has occurred.

error message is here.

Process: com.gomirang.gboxapp, PID: 13759  
java.lang.NullPointerException: Attempt to invoke virtual method ‘int java.lang.String.length()’ on a null object reference

and, my code is here.  
beacon\_connection.connectGattToWrite(new AprilBeaconConnection.MyWriteCallback(){  
@Override  
public void connected() {  
super.connected();  
}  
}, null);

maybe error cause password has null. (but, password was null in sample code)

please reply, thanks you.

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [July 28, 2022, 5:41am UTC](https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861/2 "2022-07-28T05:41:23Z")

</div>

Which example code did you follow? It doesn’t need password when connection.

Do you develop application for iBeacon only? I suggest you use the altBeacon library instead. Our andriod SDK is deprecated.

---

<div class="post-metadata">

**Author:** ![kimbobv22](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/kimbobv22/32/596_2.png) [@kimbobv22](https://bbs.aprbrother.com/u/kimbobv22)\
**Post date:** [July 28, 2022, 7:12am UTC](https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861/3 "2022-07-28T07:12:48Z")

</div>

thanks you for reply.

i want to receive data for accelerometer while app running. so did try to connect gatt to ibeacon with null password, and then an error that ‘java.lang.NullPointerException’ has occurred.

so, i want to know easy way to get data for accelerometer in android.

thanks you again.

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [July 28, 2022, 8:59am UTC](https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861/4 "2022-07-28T08:59:24Z")

</div>

N01 advertises accelerometer data directly. You don’t need connect N01. Just listen the advertising data from N01.

See our wiki for [the advertising data format of N01](https://wiki.aprbrother.com/en/ABSensor.html#n01-packet-format)

---

<div class="post-metadata">

**Author:** ![kimbobv22](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/kimbobv22/32/596_2.png) [@kimbobv22](https://bbs.aprbrother.com/u/kimbobv22)\
**Post date:** [August 1, 2022, 1:08am UTC](https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861/5 "2022-08-01T01:08:40Z")

</div>

thanks you to reply quickly.

do you mean just get from scan record while ble scan? or will be need to bond or connect?

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [August 1, 2022, 1:42am UTC](https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861/6 "2022-08-01T01:42:28Z")

</div>

> [@kimbobv22](#):
>
> do you mean just get from scan record while ble scan?

Yes. Just scan and don’t connect it.

---

<div class="post-metadata">

**Author:** ![kimbobv22](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/kimbobv22/32/596_2.png) [@kimbobv22](https://bbs.aprbrother.com/u/kimbobv22)\
**Post date:** [August 3, 2022, 5:56am UTC](https://bbs.aprbrother.com/t/inquiries-about-absensor-n01/1861/7 "2022-08-03T05:56:51Z")

</div>

thanks you for reply. I solved the problem.
