- Mac Bluetooth Keyboard
- Android Bluetooth Tutorial
- Bluetooth Mac App Tutorial Windows 10
- Bluetooth Mac App Tutorial Android Studio
- Bluetooth Mac App Tutorial Software
- Bluetooth Mac App Tutorial App
A simple Bluetooth Chat with App Inventor 2
SwiftUI is a modern way to declare user interfaces for any Apple platform. Create beautiful, dynamic apps faster than ever before. Download Apple Bluetooth for Mac to use a Bluetooth enabled mobile phone for Internet connection.
This App Inventor 2 example is based on the following 2 examples:
- J.W.Tyler's Bluetooth Chat example, revised by Liz Looney, and
- Shival Wolf's Bluetooth Chat example (unfortunately this page is not available anymore), both made with App Inventor Classic.
- Bluetooth LE Explorer allows users to find and interrogate nearby Bluetooth LE devices, read their service and characteristics and write to them. It can also be used in server mode to advertise as a battery server or a Microsoft test service server. This app is meant to show how the bluetooth APIs can be used in a UWP app.
- In this tutorial we will be working with the Bluetooth Low Energy feature of this in Arduino IDE and create a custom Android app using Thunkable, a free and visual app building tool. What actually sparked me to do this tutorial was this YouTube video by Andreas Spiess in which he experiments with the BLE feature a.
I now tried to set up an App Inventor 2 example as simple as possible. As in the other examples, both the bluetooth client and server modules are used to create a chat session. Both components are in the same app. The client component will be used for the device which starts the connection, the server component will be used for the device accepting the connection. The devices must have been paired first. There is no searching for available chat clients. The example only works to send messages between 2 devices.
Screenshots
For questions about App Inventor,
please ask in the App Inventor community.Thank you.
App Inventor Blocks
Initialization
Set the nickname to a random user name, general initialization.
The procedure print will print the current text to the label while the previous text will scroll down.
The procedure print will print the current text to the label while the previous text will scroll down.
Client: Connect
In the listpicker.BeforePicking event the listpicker will be initialized with the MAC addresses and names of the available paired devices. After selecting a MAC address, the server module will stop listening for further connection requests. In the screen title 'Role=Client' will be displayed.
The procedure connected (parameter=true) will enable the Send button, disable the Connect listpicker, start the Clock and enable the Disconnect button.
The procedure connected (parameter=true) will enable the Send button, disable the Connect listpicker, start the Clock and enable the Disconnect button.
Server: Connection accepted
If the app receives a connection request, it accepts it. In this case in the screen title 'Role=Server' will be displayed.
Timer: Check if new messages have been sent
Every second it will be checked, if there has been received some text. If yes, it will be displayed in the result label. Depending on role=server or client, different blocks have to be used.
Disconnect
The procedure connected (parameter=false) will disable the Send button, enable the Connect listpicker, stop the Clock component and disable the Disconnect button.
Other blocks used
The Screen.ErrorOccurred block catches errors and displays them in the result label.
Test
Tested successfully on HTC Desire running Android 2.2 and Samsung Galaxy Tab 10.1N running Android 3.2.
Known Issues
- While trying to connect, both client and server display an 'Error 509 Accept Connection: Unable to accept a connection from a bluetooth device'. This message can be ignored.
- As far as I can see, after client or server disconnected, there is no possibility for the chat partner to see, that the connection is gone. Therefore currently an 'Error 516: Unable to write: Connection reset by peer' will be diplayed after trying to send a text without connection.
- Sometimes 'Error 507: Unable to connect. Is the device turned on?' shows up while trying to connect.
Questions and Answers
Q1: My problem is to connect the Android Device in a way that the PC thinks it ist a BT keyboard (i have a real one that works and i know how to pair devices) and receives keystrokes that finally go to word processors etc.
A: See this thread and use PC Wedge and Datasnip serial to keybord redirection on your Windows PC.
Q2: I need to create a Multiple bluetooth connections to multiple devices to implement a 'chat room'. I don't know how to make it?
A: The Bluetooth component of App Inventor only offers communication between 2 devices. You could use several bluetooth server and client components, but this will be very cumbersome. For a chat room, I therefore recommend you to use the web component instead, see also my Chat Demo with App Inventor 2 and PubNub.
A: See this thread and use PC Wedge and Datasnip serial to keybord redirection on your Windows PC.
Q2: I need to create a Multiple bluetooth connections to multiple devices to implement a 'chat room'. I don't know how to make it?
A: The Bluetooth component of App Inventor only offers communication between 2 devices. You could use several bluetooth server and client components, but this will be very cumbersome. For a chat room, I therefore recommend you to use the web component instead, see also my Chat Demo with App Inventor 2 and PubNub.
Download
Developing and maintaining snippets, tutorials and extensions for App Inventor takes a lot of time.
I hope it saved some of your time. If yes, then you might consider to donate a small amount!
or donate some mBTC to Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Thank you! Taifun
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Thank you! Taifun
Download aia file for App Inventor
Back to top of page ...
Back to top of page ...
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.
Get all best apps via Setapp
Replace Mac defaults and discover new gems in one suite.
Today, Bluetooth is one of the most popular wireless technologies, allowing you to connect two or more devices to perform daily tasks with less hardware. With a wide range of possibilities, it’s completely up to you to decide how to use Bluetooth on Mac — but linking your computer to wireless keyboards, mice, trackpads, and speakers is a good place to start.
Installing Bluetooth devices is usually pretty straightforward: first you turn on Bluetooth on Mac, then you follow a few basic steps to make your device discoverable for connection. But sometimes there’s a catch.
Get ToothFairy for seamless Bluetoothing
Download an ideal Bluetooth assistant that connects your AirPods — just like any other Bluetooth device — to Mac. In a single click.
How to turn on Bluetooth on Mac?
Most Macs come with the built-in Bluetooth capability, so all you need to do is make sure it’s turned on:
- Go to System Preferences in the Apple menu
- Click on Bluetooth
- Select Turn Bluetooth On
While you’re at it, tick the box beside the “Show Bluetooth in menu bar” option at the bottom of the screen. The menu-bar Bluetooth icon will serve as a shortcut to indicate if the Bluetooth is on, if any devices are connected, or even if particular device’s battery is low.
Connecting Bluetooth devices to Mac
Mac Bluetooth Keyboard
Now that you know how to connect to Bluetooth on Mac, your computer is ready to get in touch with other devices. The process of establishing a connection between a specific device and your Mac is called pairing. Pairing makes other devices recognizable by your Mac and allows for easy automatic connections to be made.
The good news is that Bluetooth devices that came with your Mac are already pre-paired and should connect automatically when turned on. In case you’ve bought an Apple Bluetooth device separately, here’s how to pair it with your Mac:
- Connect the device to you Mac using a cable (if available)
- Turn the device on
- Go to System Preferences ➙ Bluetooth ➙ Turn Bluetooth On
- After the device pairs with your Mac, it will appear in the list of available devices ➙ click Connect
- When the device is charged, unplug it for wireless use
When connecting non-Apple Bluetooth devices, the key is to enable pairing or discoverable mode on the device in question. The exact way to do this will vary, so check the instructions from the manufacturer first. As a rule, devices only stay in discoverable mode for a few minutes — to save the battery. So hurry up!
How to connect Bluetooth headphones to Mac?
Android Bluetooth Tutorial
In most ways, Bluetooth headphones are no different than other Bluetooth-enabled devices. Start by making sure your Bluetooth headphones are charged and in discoverable mode. After that you’re just a few clicks away from having them connected to your Mac:
- Go to System Preferences
- Click on Bluetooth ➙ Turn Bluetooth On
- On the right you’ll see a list of devices. When your headphones show up ➙ click Connect
![Bluetooth Mac App Tutorial Bluetooth Mac App Tutorial](/uploads/1/3/4/2/134202059/343122397.jpg)
The same steps can be followed if you wonder how to connect Mac to Bluetooth speaker.
Solve Magic Mouse not connecting to Mac Bluetooth
Connecting your Magic Mouse to MacBook Bluetooth is identical to connecting Bluetooth headphones. Simply follow the steps described above and everything should work out just fine. Occasionally, though, your Bluetooth mouse might misbehave: but before assuming that it’s not connecting properly — try to wake it:
- Make sure it’s on
- Try restarting it
- Click the mouse button to see if there’s any response
- Make sure the battery isn’t dead
If none of the above helped and your mouse is still not showing up on the Bluetooth devices list, try the following:
- Go to System Preferences ➙ Bluetooth ➙ check that Bluetooth is on
- Plug in your mouse with the Lightning cable
- Go to System Preferences ➙ Mouse ➙ Set Up Bluetooth Mouse ➙ wait for your Mac to search for the device and connect to it
As you can see, connecting Bluetooth gadgets to Mac is fairly straightforward, but might turn into quite a multistep ordeal. Luckily, there’s a super-simple single-click way to fix Magic Mouse not connecting.
ToothFairy is a miracle Bluetooth assistant app. First, it lets you choose an icon for each of your devices and adds it right to your menu bar, from which you can then connect in a click and view all the essential info at a glance. ToothFairy also gives you an option to improve audio quality — a neat way to get the most out of your speakers and headphones:
- Open ToothFairy and click Advanced
- Select the option to “Improve sound quality…”
How to easily wake Bluetooth connection up?
Bluetooth not working on Mac doesn’t happen that often, but when it does it can get quite frustrating. No need for despair — sometimes devices disconnect simply because they haven’t been used for a while. Just make sure to take the following checklist into account before looking into any further Mac Bluetooth troubleshooting:
- Check the battery. If the battery is low, the device will have difficulty connecting. The Bluetooth icon in the menu bar will warn you too.
- Make sure you turn on Bluetooth on Mac. Simple but often overlooked step.
- Bring the device within 30 ft from your Mac and avoid any interference from household devices (cordless phones, baby monitors, microwaves, and wireless networks that use the same 2.4 GHz band) and metal objects.
If nothing helps, try these tips below to reset Bluetooth on Mac.
Tip 1: Turn Bluetooth off and back on
Restarting can sometimes fix the problem. Simply click on the Bluetooth icon in the menu bar at the top of your screen, choose Turn Bluetooth Off and then Turn Bluetooth On.
Tip 2: Disconnect all USB devices
If turning your Mac Bluetooth off and on didn’t help, try disconnecting all your USB and Bluetooth devices and then connecting them back on again:
Bluetooth Mac App Tutorial Windows 10
- Go to System Preferences ➙ Bluetooth
- Click on X beside the device to disconnect it
- Restart your Mac
- Wait for a few minutes and reconnect your devices
Note that there can be too many connected Bluetooth devices. The maximum number is seven, but at times you might encounter problems once you go over three or four, as some devices need more data than others.
Bluetooth Mac App Tutorial Android Studio
Tip 3: Delete the Bluetooth .plist files
If you still have Mac Bluetooth not available, try deleting Property List files. They sometimes could become corrupted and stealthily affect Bluetooth connectivity. To remove the .plist files:
- Choose Go from the Finder menu at the top of your screen ➙ Go to Folder
- Type in: /Library/Preferences ➙ Go
- Find the com.apple.Bluetooth.plist file and delete it
- Go back to Go in the Finder Menu ➙ Go to Folder
- Type in: ~/Library/Preferences/ByHost ➙ Go
- Find com.apple.Bluetooth.xxx.plist file and delete it
Now shut down your Mac and keep it turned off for about a minute. After the restart, it will automatically generate new .plist files, which should fix the issue of MacBook Bluetooth not available.
Tip 4: Reset the Bluetooth module
If none of the above troubleshooting solved the problem of Bluetooth not available on Mac, resetting the Bluetooth module will attempt to debug any issues on a deeper level. Here’s how to reset Bluetooth on Mac:
- Hold Shift + Option and click on the Bluetooth icon in the menu bar
- Click Debug and select “Remove all devices”
- Click Debug again and select “Reset the Bluetooth module”
- Restart your Mac and re-pair your Bluetooth devices
Tip 5: Optimize and remove your system junk
Finally, it’s natural for your Mac hard drive to get cluttered with all kinds of user and system-generated trash over time. Bluetooth connectivity suffers too. So the next time you see MacBook Pro Bluetooth not available, try doing a thorough but quick system optimization with CleanMyMac X.
CleanMyMac X is a powerful and easy way to bring your Mac back to its mint condition: without user or system cache files, language logs, malware, login items, and more. And it only takes one click to scan:
- Navigate to System Junk
- Click Scan and wait for the process to finish
- Review Details and Clean anything you don’t need
So anytime you have trouble connecting Bluetooth to Mac, go through the tips above and use ToothFairy along with CleanMyMac X for top results. Best of all, both apps are available for a free 7-day trial through Setapp, a platform of more than 150 Mac utilities that can solve any problem, from photo-editing to better music listening experience. Time to connect Bluetooth headphones to Mac!
Setapp lives on Mac and iOS. Please come back from another device.
Meantime, prepare for all the awesome things you can do with Setapp.
Read onSign Up
Bluetooth Mac App Tutorial Software
Setapp uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy.