Create simple mobile app and transfer data between pc and mobile using BleuIO
source link: https://www.bleuio.com/blog/details.php?id=1120&title=Create-simple-mobile-app-and-transfer-data-between-pc-and-mobile-using-BleuIO
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Create simple mobile app and transfer data between pc and mobile using BleuIO
2021-05-05 13:26:01This project will demonstrate how to easily create a mobile app to connect to BleuIO dongle and share data between them.
At first, we will connect BleuIO dongle to our pc.
We already created a simple mobile app for this project. All you need to clone this project and run the app on your mobile phone. You can make changes if you need to.
Requirements
- BleuIO connected to a pc with ionic framework installed.
- Ionic framework
- Mobile phone.
- Android studio.
We will set BleuIO dongle as peripheral, and our mobile app will connect to this dongle. Then we can start sending data back and forth.
Connect your BleuIO dongle to the computer.
Connect to dongle using comport and start advertising by AT+ADVSTART.
Clone this git repo.
git clone https://github.com/smart-sensor-devices-ab/bleuio_sps_example_mobileapp.git
go inside the folder and run npm install
if you run ionic serve, you will be able to see the layout on the browser. But for this app, we need mobile phones native feature. Therefore connect your android phone to your computer and run ionic cap run android
If you get an error regarding gradle, Type ionic capacitor update and run ionic cap run android again.
Your app will install and open up on your mobile phone.
Make sure the dongle is on peripheral mode and advertising.
Click scan for BleuIO devices.
On the scan result, select one of your dongles to connect.
After a successful connection, you can send data back and forth, and you will be able to see your messages on both the mobile app and the terminal.
For better understanding, watch the video.
To learn more about BleuIO AT commands, visit https://www.bleuio.com/getting_started/
Share this post on :
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK