Browse file system of Raspberry Pi from android via bluetooth - android

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.

Related

Control Raspberry Pi with phone

I am new to Raspberry Pi. I wish to turn on/off a light and play some sounds on the Pi from my phone both Android and iPhone. It is a kids toy that I am prototyping.
I need the setup to be easy for any user to download the app and just connect to the Pi with little trouble. I dont want the Pi connected to the internet so no external api services.
I have search for tutorials but surprising nothing other than using a service.
Could anyone poin me in the right direct. I dont have a preference over bluetooth of wifi. Just one that is easy for a kid or parent to setup.
Thanks
You mentioned playing sounds, you need a beeper (if those sounds are more complicated, use a speaker). Also, you need those lights connected to GPIO (USB is also a viable option, by simply turning on/off the USB port).
Issuing a USB Hub class request (CLEAR_FEATURE PORT_POWER) to port 2 on the LAN9514 will > deactivate the USB output power switch.
There's an app for that:
https://github.com/codazoda/hub-ctrl.c
This is a bit harder to setup, but you don't need any soldering with this. Then, you need to setup an AP for the kids to connect to the Raspberry Pi's website (should be a website, app is harder to make). Also why you don't want the Raspberry Pi to connect to the internet?
Are the lights you want to turn on/off wired to the Raspberry Pi (for example via GPIO)?
You need to install one of the open source automation software (like OpenHAB or Home Assistant, etc.). Disable port forwarding to the Raspberry Pi (usually you need to do this port forwarding, so here you don't need to do anything).
In this case, the IP is a local IP, and you get local access only.
Then probably you need is already implemented by someone from the community, or you need to develop a simple script to achieve what you want.

Radio module (GNU RADIO) and USB by bluetooth

I'm working actually on an android application. The goal of this app, is to connect in bluetooth one device (smartphone) too another device (raspberry pi). My radio module is connect into USB at raspberry pi.
My application actually can connect in bluetooth with this raspberry pi.
First of all, I want to know if it's possible to get the name of radio module with this app (port 9100 with bluetooth?).
Second, I made flowgraph with GNURADIO. It works well if want to send informations (FM transmitter). Now I want to transform this flowgraph in java code for send information (files, music..) from smartphone to this radio module.
I found this tutorial : http://gnuradio.org/redmine/projects/gnuradio/wiki/GRAndWalkthrough
I just drawed this if you do not understand me (Sorry about my english).
enter image description here
Is it a good tutorial for my project ?
Thanks for any help.

Send command from android mobile to PIC 16F1517 microcontroller via Bluetooth

I am struggling through one issue which is related to Android, Bluetooth Dongle and PIC micro-controller(16F1517). First i have to connect through my Android device and external Bluetooth dongle. Bluetooth dongle is connected with control Box(PIC micro-controller). Then i have to send some binary command from Android device to PIC micro-controller through Bluetooth. I tried a lot but did not get any luck to get rid this peace of work. I gone through below link
Question posted by me
nbCafe link
Here i have couple of doubts:
Can i get any library or interface for PIC micro controller through
which I can communicate from Android device?
Can i get any code sample for Android, so that i can use it?

Connecting Android with Raspberry PI

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.

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