Analog input stops - BlueZ to Bluedroid ruins everything (4.2 and after)

123 views
Skip to first unread message

Emre

unread,
Apr 3, 2015, 2:20:37 AM4/3/15
to ioio-...@googlegroups.com
I have 3 identical IOIOV1 with 3.11/5.00 and 3 tablets with different android versions(4.1.1,4.2.2,4.4.2) .

I tested for a week to be sure and tried all sample code supplied in IOIO's page(Sample App ETC)

The code runs flawless in 4.1.1 for a week but it stops and shows the last value it gots in 4.2.2 and 4.4.2 on the screen.

However, Digital input and outputs remains working in 4.2.2 and 4.4.2.

Waiting for your suggestion&help?

The only interesting thing logcat shows that:

04-03 09:17:54.680: W/bt-btif(917): dm_pm_timer expires
04-03 09:17:54.680: W/bt-btif(917): dm_pm_timer expires 0
04-03 09:17:54.680: W/bt-btif(917): proc dm_pm_timer expires
04-03 09:17:54.690: E/bt-btif(917): bta_dm_pm_btm_status  hci_status=36

Emre

unread,
Apr 3, 2015, 2:51:39 AM4/3/15
to ioio-...@googlegroups.com
Then got this

04-03 09:45:53.290: E/IOIOProtocol(2660): Protocol error: 
04-03 09:45:53.290: E/IOIOProtocol(2660): ioio.lib.impl.IOIOProtocol$ProtocolError: Received unexpected command: 0x8
04-03 09:45:53.290: E/IOIOProtocol(2660): at ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:928)
04-03 09:45:53.300: D/IOIOImpl(2660): Physical disconnect.
04-03 09:45:53.300: V/BluetoothIOIOConnection(2660): Client initiated disconnect
04-03 09:45:53.300: W/bt-btif(917): bta_jv_rfc_port_to_cb(port_handle:0x15):jv handle:0x0 not FOUND
04-03 09:45:53.370: D/IOIOImpl(2660): Waiting for IOIO connection
04-03 09:45:53.370: V/IOIOImpl(2660): Waiting for underlying connection
04-03 09:45:53.370: D/BluetoothAdapterService(1110273000)(917): Get Bonded Devices being called
04-03 09:45:53.370: D/BluetoothAdapterProperties(917): getBondedDevices: length=1
04-03 09:45:53.370: V/BluetoothIOIOConnection(2660): Attempting to connect to Bluetooth device: IOIO (71:50)
04-03 09:45:53.370: W/BluetoothAdapter(2660): getBluetoothService() called with no BluetoothManagerCallback
04-03 09:45:53.380: D/BTIF_SOCK(917): service_uuid: 00001101-0000-1000-8000-00805f9b34fb
04-03 09:45:53.380: D/BluetoothSocket(2660): connect(), SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[76]}
04-03 09:45:53.410: W/bt-sdp(917): process_service_search_attr_rsp
04-03 09:45:53.480: W/bt-btif(917): new conn_srvc id:26, app_id:1
04-03 09:45:53.480: W/bt-btif(917): bta_dm_pm_ssr conn_srvc id:26, app_id:1
04-03 09:45:53.480: W/bt-btif(917): bta_dm_pm_ssr:2, lat:1200
04-03 09:45:53.480: V/BluetoothIOIOConnection(2660): Established connection to device IOIO (71:50) address: 00:1A:7D:DA:71:50
04-03 09:45:53.480: V/IOIOImpl(2660): Waiting for handshake
04-03 09:45:53.490: I/IncomingState(2660): IOIO Connection established. Hardware ID: SPRK0016 Bootloader ID: IOIO0311 Firmware ID: IOIO0500
04-03 09:45:53.490: V/IOIOImpl(2660): Querying for required interface ID
04-03 09:45:53.500: V/IOIOImpl(2660): Required interface ID is supported
04-03 09:45:53.500: I/IOIOImpl(2660): IOIO connection established
04-03 09:45:54.510: D/dalvikvm(2660): GC_FOR_ALLOC freed 511K, 20% free 3528K/4408K, paused 15ms, total 15ms
04-03 09:46:00.220: W/bt-btif(917): dm_pm_timer expires
04-03 09:46:00.220: W/bt-btif(917): dm_pm_timer expires 0
04-03 09:46:00.220: W/bt-btif(917): proc dm_pm_timer expires
04-03 09:46:00.230: E/bt-btif(917): bta_dm_pm_btm_status  hci_status=36
04-03 09:46:04.170: D/dalvikvm(2660): GC_FOR_ALLOC freed 511K, 20% free 3529K/4408K, paused 35ms, total 35ms
 

Ytai Ben-Tsvi

unread,
Apr 4, 2015, 2:17:38 PM4/4/15
to ioio-...@googlegroups.com
This most likely have to do with data getting dropped / corrupt as result of the higher bandwidth imposed by using AnalogInput (1000 10-bit samples per second per channel + some overhead).
I have found that different dongles tend to exhibit this behavior while others don't. Can you try the same IOIO with the same dongle against all three phones as opposed to have 3 different IOIOs and dongles?

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Emre

unread,
Apr 4, 2015, 2:43:03 PM4/4/15
to ioio-...@googlegroups.com
I did that. I used same IOIO and BT dongle I've used with 4.1.1 tablet. It was working for a week without any corrupt but the connection dropped&corrupted in nearly 10 hours with 4.2.2 and 4.4.2, 

Ytai Ben-Tsvi

unread,
Apr 4, 2015, 5:39:51 PM4/4/15
to ioio-...@googlegroups.com
Got it. So yeah, according to your analysis it seems like a potential problem in the Android BT stack.

On Sat, Apr 4, 2015 at 11:43 AM, Emre <gul...@gmail.com> wrote:
I did that. I used same IOIO and BT dongle I've used with 4.1.1 tablet. It was working for a week without any corrupt but the connection dropped&corrupted in nearly 10 hours with 4.2.2 and 4.4.2, 

--

Emre

unread,
Apr 5, 2015, 5:23:16 PM4/5/15
to ioio-...@googlegroups.com
Do you think we could figure out a solutin by changing the library?

Ytai Ben-Tsvi

unread,
Apr 5, 2015, 7:03:59 PM4/5/15
to ioio-...@googlegroups.com

Possibly. Only a matter of how complicated it would be.

Emre

unread,
Apr 8, 2015, 12:29:29 PM4/8/15
to ioio-...@googlegroups.com
I was testing the application and got this error. I hope it helps 
 
04-08 19:21:00.867: E/IOIOProtocol(8340): Protocol error: 
04-08 19:21:00.867: E/IOIOProtocol(8340): ioio.lib.impl.IOIOProtocol$ProtocolError: Received unexpected command: 0x8b
04-08 19:21:00.867: E/IOIOProtocol(8340): at ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:928)
04-08 19:21:00.867: W/bt-rfcomm(2462): Port state disc_wait_ua Event ignored 12
04-08 19:21:00.867: W/bt-btif(2462): invalid rfc slot id: 96

 

Ytai Ben-Tsvi

unread,
Apr 8, 2015, 12:32:05 PM4/8/15
to ioio-...@googlegroups.com
This is usually an indication of a flaky connection. Have you tried to see if you're getting different performance with different dongles?

--
Message has been deleted

Ytai Ben-Tsvi

unread,
Apr 9, 2015, 6:03:14 PM4/9/15
to ioio-...@googlegroups.com
I have no idea what this is.

On Thu, Apr 9, 2015 at 2:21 PM, Emre <gul...@gmail.com> wrote:
04-10 00:17:19.446: E/bt-btif(1014): send none, EAGAIN or EWOULDBLOCK, errno:11

Finally, I found sth but couldnot figure out how to handle it? Any suggestion? 

Emre

unread,
Apr 10, 2015, 3:24:59 PM4/10/15
to ioio-...@googlegroups.com
I remained the tablet connected to my pc for a day in ADB enabled and saw (day after)that the connection remains but analoginput.getVoltage gets same value again and again. Any clue?

Ytai Ben-Tsvi

unread,
Apr 10, 2015, 9:09:20 PM4/10/15
to ioio-...@googlegroups.com
It sounds like what might have happened is that the connection got silently dropped, i.e. IOIOLib doesn't know about it.

On Fri, Apr 10, 2015 at 12:24 PM, Emre <gul...@gmail.com> wrote:
I remained the tablet connected to my pc for a day in ADB enabled and saw (day after)that the connection remains but analoginput.getVoltage gets same value again and again. Any clue?

--

Emre

unread,
Apr 11, 2015, 2:47:01 AM4/11/15
to ioio-...@googlegroups.com
The bad/weird/annoying news is same code with same lib works flawlessly on 4.1
Really waiting and hoping for good news.

Note: I tried to replace bluedroid with bluez but couldnot succeed that

Emre

unread,
Apr 12, 2015, 9:28:58 PM4/12/15
to ioio-...@googlegroups.com
Tried everyway but couldnot fixed it waiting for your tests and fixes in Lib. Any info you need from me?

Emre

unread,
Apr 13, 2015, 6:51:54 AM4/13/15
to ioio-...@googlegroups.com
Analog input gets same voltage value but digital pin continues to work like in the image


On Saturday, April 11, 2015 at 4:09:20 AM UTC+3, Ytai wrote:
20150413_113255.jpg

Ytai Ben-Tsvi

unread,
Apr 15, 2015, 1:44:13 PM4/15/15
to ioio-...@googlegroups.com
What Android device is this? Are you using a custom-built OS or one provided by the OEM?
Message has been deleted

Ytai Ben-Tsvi

unread,
Apr 15, 2015, 4:01:01 PM4/15/15
to ioio-...@googlegroups.com

Crashes how?

On Apr 15, 2015 1:00 PM, "Emre" <gul...@gmail.com> wrote:
Tablets are chinese tablets (above average) and the phone nexus 5. By the way, I tested the prebuilt apk of ioioapps, the app crashes after a while.

Emre

unread,
Apr 15, 2015, 4:02:42 PM4/15/15
to ioio-...@googlegroups.com
Tablets: casper via t10, inca respect II with OEM OS and the phone nexus 5. By the way, I tested the prebuilt apk of ioioapps, the app crashes after a while.


On Wednesday, April 15, 2015 at 8:44:13 PM UTC+3, Ytai wrote:

Emre

unread,
Apr 15, 2015, 4:04:30 PM4/15/15
to ioio-...@googlegroups.com
IOIOSimpleApp closes itself while it is connected and reading analog values. Additionally, it turn off bluetooth if i use prebuilt apk. If I dont use prebuilt one, the analog input stops refreshing its value after a while

On Wednesday, April 15, 2015 at 11:01:01 PM UTC+3, Ytai wrote:

Crashes how?


Emre

unread,
Apr 15, 2015, 4:05:09 PM4/15/15
to ioio-...@googlegroups.com
I can send you a video record if you want

Ytai Ben-Tsvi

unread,
Apr 15, 2015, 4:30:01 PM4/15/15
to ioio-...@googlegroups.com
Are you using the latest version? Also, do the Android logs have any clue regarding the reason? How long does it typically take to crash?

--

Emre

unread,
Apr 15, 2015, 4:41:58 PM4/15/15
to ioio-...@googlegroups.com
Yes but tried previous versions too. It takes 3-5 hours generally at a distance( I guess IOIO disconnects/connects[I cannot see] or suffocates. It takes longer when its near. I'll give specific info after I carefully measure it. Trying now with LG G3 Beat 

Emre

unread,
Apr 16, 2015, 12:55:25 PM4/16/15
to ioio-...@googlegroups.com
Any improvement you've got or have you tried to test it?
Reply all
Reply to author
Forward
0 new messages