Skip to first unread message

Karina Garcia

unread,
Apr 15, 2017, 7:38:31 PM4/15/17
to MIT App Inventor Forum
Hello!!
My application isn't registering that there is a Bluetooth Connection between my application and the PIC18F4550. It shows that my device is paired on my phone but not within the app. 
When I select my listpicker to try to establish the connection within the app, there are no available devices to select.

Please help!!
How do I fix this issue? 
bluetooth connection.PNG

zac

unread,
Apr 15, 2017, 8:09:07 PM4/15/17
to mitappinv...@googlegroups.com
remove "not" in the second "if" and use "else" in the first "if" instead. 
and try BluetoothServer
Message has been deleted

Karina Garcia

unread,
Apr 16, 2017, 1:29:10 PM4/16/17
to MIT App Inventor Forum
So I edited the app as directed above and I still have issues with listpicker.
 I made two versions of this application the Client Version and the Server Version. With the client version I changed the if else statement as directed and list picker still remains empty. In the server version I realized I need to use the client version because I'm connecting with the HC-06 as my device. Because I'm trying to make this pairable for users it would be better for the Device to be open to receiving a connection  while the mobile app lets you make the connection.
Client Version.PNG
Server Version.PNG

Ghica

unread,
Apr 16, 2017, 2:01:05 PM4/16/17
to MIT App Inventor Forum
In your app you must connect to the Bluetooth device first, before you can communicate with it. Pairing is not enough. And your phone is usually a client, not a server. Look for examples under Arduino and Bluetooth in the FAQ: https://groups.google.com/forum/m/#!category-topic/mitappinventortest/2cd6Uz__xA0
Cheers, Ghica

Karina Garcia

unread,
Apr 16, 2017, 3:01:48 PM4/16/17
to MIT App Inventor Forum
I added a Bluetooth Enabled check to the code. It now registers that bluetooth is on for my Galaxy S7 but it still doesn't show any available devices for pairing on listpicker. 

Karina Garcia

unread,
Apr 16, 2017, 4:03:10 PM4/16/17
to MIT App Inventor Forum
So I edited my code based on an example online and it still only has a blank listpicker menu. My device is already paired with my phone seperately so it should show up on the list picker menu. What should I change to make those options visible?
screen pt 2.PNG
Screen pt 1.PNG

Ghica

unread,
Apr 17, 2017, 1:53:05 AM4/17/17
to MIT App Inventor Forum
I googled for PIC18F4550 and found nothing about Bluetooth. Instead this chip has built-in USB support. So please enlighten me what your setup is and what level of Bluetooth you are using.
For example, it may be that you are using a BT low energy shield and you would need the BLE extension in that case.
Cheers, Ghica
Reply all
Reply to author
Forward
0 new messages