Connecting Android with Raspberry PI - android

The requirement is to use android phone APP to write the data on the Raspberry PI device.
Connection between PI and android will be done using the USB cable.
Data can be written in the form of a file on the filesystem of PI or can be transmitted as a String to some process running on the PI. Later is preferable.
Has somebody done that or has pointers for me?
Thanks in advance

if you want to send any string from Android to PI over USB first read about the AOA(Android open accessory) Protocol. This protocol is used communication over USB.
for this type of implementation you have to use this permission into your manifest
More information about this go here
you can use the the MQTT protocol for send any string from Android smart phone to PI by using IP and Port no.

Related

Usb Communication Android Phone to Android Things

I am trying to setup USB communication serially with an Android phone to a Raspberry Pi loaded with Android Things (USB OTG cable).
I am using an OTG cable to connect to the Raspberry Pi, making my Android phone the Host
I understand how to use the Android USB Host API however it is the other side, that is, the code on the Android Things Raspberry Pi that I do not know what to do.
What does the code on the Android Things Raspberry Pi have to be to receive and react to USB serial communication from the Host Android phone? If possible, can you give a code example of how to react to a read command then provide specific information (say just a simply a string) back to the phone.
Raspberry Pi 3B cannot act as USB slave, only as USB host.
Some references:
Pi as a USB client
Using USB as a slave
Raspberry pi 3 as USB device and many other over the Internet.
However, RPi 3B has another capability which you may find of interest but, honestly, I am not sure if Android Things supports it.

How to establish connection between raspberry pi and android?

I need to sent my sensor data's to android device and i need to control actuators from my Android
Raspberry pi 3 have embedded wifi module, so you can easily connect it with android via bluetooth, wifi direct or wifi hotspot. If you have a older version of raspberry you have to connect it by lan cable and to write a service on raspberry which will receive the data from android client. Also you can use side services to sync the data between your phone and IOT device, for example you can use google drive or mail.

How to setup Wi-Fi connection remotely in a mobile application through Bluetooth

There is a computer without any peripherals (keyboard, monitor, etc.) with Wi-Fi/Bluetooth interfaces (e.g. Raspberry Pi). I would like to find an open source solution to setup Wi-Fi connection on this computer remotely using some mobile application (as a part of this solution) through bluetooth connection.
Use case: someone wants to connect Raspberry Pi to home Wi-Fi network, he runs an application on his smartphone, connects to Raspberry Pi using Bluetooth and send Wi-Fi credentials to Raspberry Pi. Raspberry Pi receives Wi-Fi credentials and automatically connects to home Wi-Fi network.
Is there such solution ready to use? Maybe is there implemented bluetooth profile to do it? Please share any information. Thanks.

Browse file system of Raspberry Pi from android via bluetooth

Use Case:
I am working on a project which involves a android phone and Raspberry Pi. Raspberry Pi unit would be planted with sensors in the field and once in a while user would walk around with the phone and try to get the readings from the Raspberry Pi. So the app's responsibility is to get the data and plot the graph.
Design:
I was planning to allow user to select the location of the file once the devices are paired. As of now, identification of available devices, programmatic pairing of devices has been done. But I am unable to navigate the Raspberry Pi's file system from android. How do you achieve that?
Any help would be appreciated. In case you pointing to this resource, please explain as well (taken from selected answer here).
You may deploy a Java application on your Raspberry pi and connect it with your Android app via a bluetooth socket:
Send data from android bluetooth to PC with bluecove
From there you can execute File.listRoots() and create your own remote dir browser.

Connecting a Raspberry-Pi to Android phone wirelessly

I am trying to wirelessly connect my android phone to a Raspberry-Pi, so I can then make a controller app to interact with the RPi.
I have just bought a dongle, as I was thinking of using Wifi-Direct. However this doesn't look as simple as I originally thought.
There's not much information out there on how to do this, and I am completely new to RPis.
I have found the odd tutorial like this: https://www.youtube.com/watch?v=6GPv8TfZqe4
But it seems overly complicated and I am not sure if they applicable to my dongle.
I am thinking there must be a more simple way to do this(e.g. through wpa_gui on Raspbian)
Any suggestions on how I could achieve this?
You can try:
SSH to raspberry Pi with given credentials (if both devices are connected to the network... but that may not always be doable)
Setup web API/app on RPi and use it via browser on Android (like https://github.com/NeonHorizon/berryio )
Use Bluetooth UART: Adafruit has a full blown Bluetooth UART board, and Chinese make many slave (or master) UART serial boards. This way you could open a serial connection from the phone - and with luck you would get the terminal which by default is cloned to UART in RPi (or it would get your script running on Pi and handling incoming UART messages).

Categories

Resources