Bluetooth Advertisements Not Supported & Can't send data to Arduino 101

755 views
Skip to first unread message

Juliet

unread,
Aug 2, 2016, 1:47:30 PM8/2/16
to MIT App Inventor Forum
Hi, all

My smartphone android version is 6.0, bluetooth version is 4.2, supports ble.

I want to create an app to control the led light on and off. Here is the link of the tutorial.

But the statement "call BluetoothBLE1.startscanning" occurs the notification "Bluetooth Advertisements Not Supported".

And I also have the same problem like @Bluetrack :

For testing I use  the serial monitor.
-->I can successfully connect and disconnect, but can't send any data via the app. If I use "nRF Master Control" , I can write 49 to the arduino to make LED on and anyother numbers to make LED off. You can see the screenshots in the attachments.
-->but if I use app inventor to test the app, the monitor only shows "connected" or "disconnected", can't show any number that sent to the arduino ble. And also can't make the led on, whatever 49 or 1.
What I want to know is that why the statement "call BluetoothBLE1.WriteIntValue" doesn't work.

Thank you very much!

Juliet


BLE_Arduino101_blink.ino
LedBlink_BLE.aia
Bluetooth Advertisements Not Supported.jpg
nRF_Value.jpg
nRF_WriteValue.jpg
Blocks.jpg
AppInventor_SerialMonitor.png
nRF_SerialMonitor.png

Ghica

unread,
Aug 3, 2016, 11:20:02 AM8/3/16
to MIT App Inventor Forum
The advertisements not supported is a warning that you can ignore. It just means that your phone does not support them, but not many phones do and you do not need them, unless you want to use your phone as a server.
From your blocks I cannot see whether your device is connected properly, maybe you could build a check to show that.
I attach an AI2 app that you can use as a diagnostic tool to check if you can connect properly and find the right UUID's.
Cheers, Ghica.

BLuetoothLE_workshop.aia

Juliet

unread,
Aug 6, 2016, 12:24:50 PM8/6/16
to MIT App Inventor Forum
Thank you for your response! Sorry I reply late because I've been out of office for a few days.

I used the serial monitor to observe whether the deviced was connected. It did connect, you can see it on the screenshots I uploaded before.

I import your aia file and make a test, it's very helpful and I have learnt a few tips. It can see whether the device is connected clearly.

Could you recommend some tutorials of Ble with App Inventor so I can follow step by step? Thank you very much!

Juliet

Taifun

unread,
Aug 6, 2016, 1:01:31 PM8/6/16
to MIT App Inventor Forum
See BluetoothLE Documentation and Resources for more information. 
Taifun
          

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

Juliet

unread,
Aug 7, 2016, 8:35:52 AM8/7/16
to MIT App Inventor Forum
Thank you very much!

Ghica

unread,
Aug 7, 2016, 9:27:05 AM8/7/16
to MIT App Inventor Forum
You should be very careful with the documentation Taifun pointed you to. Much of it is obsolete and will not easily work.
There is really not very much right now. You should keep in mind that the BLE functionality is still very experimental.
Cheers, Ghica.

Juliet

unread,
Aug 7, 2016, 10:53:32 AM8/7/16
to MIT App Inventor Forum
You are right. I have tried almost all demos and tutorials before, but few is successful. I'll test very carefully again later and try to figure out why the phone can't transfer data to device via ble.

Bests,
Juliet

Marten

unread,
Aug 10, 2016, 6:55:39 AM8/10/16
to MIT App Inventor Forum
Hi Ghica,
Seems i am facing another problem, hope you can help me.

My phone display "Unsupported Bluetooth Advertisements", too. But it did run well by online AI Companion
Than, if I switch to Build -> APP (QR code), my problem happen after APK running . 

Problem: 
There was no BT device after Button "Scan" pushed even use your BLE_workshop example.

Have any idea??
Thanks in advance
Marten

Ghica

unread,
Aug 10, 2016, 8:43:27 AM8/10/16
to MIT App Inventor Forum
Yes. There is a bug in the build process, which has an easy workaround. Drag a normal Buetooth component into your design. You do not need to do anything with the component, and it does not matter whether you take the BluetootClient or the BluetoothServer. Build you app again, and now it should work.
Cheers, Ghica.
Reply all
Reply to author
Forward
0 new messages