DEV Community

Cover image for Create simple mobile app and transfer data between pc and mobile
Bleuio tech
Bleuio tech

Posted on

Create simple mobile app and transfer data between pc and mobile

This 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.

For better understanding, watch the video.

Top comments (0)