Everytime I connected Bluetooth my APP is crash, When I use call BT ReceiveText

84 views
Skip to first unread message

劉瑞成

unread,
Mar 27, 2016, 3:17:12 PM3/27/16
to MIT App Inventor Forum

Hi everyone:

I am trying to make a bluetooth connection APP. I can connected to the Bluetooth HC-06 and send some texts, the function is okay. But when I added the Clock with Call BluetoothClient.ReceiveText and following objective. After I connected to bluetooth and the APP has crashed. My APP is very simple, I don't know the reason why. I can received few days ago but it can not work lately. Save me please...


Thanks everybody.




屏幕快照 2016-03-27 下午8.57.49.png
屏幕快照 2016-03-27 下午8.58.59.png

Taifun

unread,
Mar 27, 2016, 9:45:09 PM3/27/16
to MIT App Inventor Forum
how to connect correctly and how to receive something via Bluetooth, see this example
Taifun

劉瑞成

unread,
Mar 28, 2016, 3:32:27 AM3/28/16
to MIT App Inventor Forum
Thank you very much. But at once I use "call Bluetooth Client1.ReceiveText numberOfBytes" or "call BluetoothClient1.BytesAvailableToReceive", after bluetooth connection selected then my APP is going crash....I had try your suggestion but same result.... Than

So I think that could be function problems....

My system is new install, Bluetooth is good(It can received text by android but android alway crash by received function), So.... 

Such simple program should be okay...but I always crashed in my case.
Thank you and everybody...



BlueToothTest.aia

Abraham Getzler

unread,
Mar 28, 2016, 10:10:28 PM3/28/16
to MIT App Inventor Forum
In the Designer, Clock1 was left enabled and always firing, even though BT was not connected.
Maybe start the Clock after selecting a connection?

Also, how many bytes might come in in one second from the BT transmitter?

ABG


Reply all
Reply to author
Forward
0 new messages