8

I want to make a cool Raspberry Pi thing that will be put in people's cars. What it does is not important, but somehow people must be able to interact with it.

The ideal solution would be that users on the phone simply used Bluetooth to find the Raspberry Pi, and after pairing - automagically their web browser displayed a webpage served from the Raspberry Pi. Or the phone could render an X desktop or VNC served from the Raspberry Pi.

I guess that this is not possible without an app?

If it requires an app:

  1. Can Bluetooth trigger an "app suggestion" on the phone?
  2. Are there any open source projects for such an app?
  3. Are there any generic apps that provides functionality as described (opens a web page after Bluetooth connection)?

Can Bluetooth serve http traffic at all?

frodeborli
  • 191
  • 3
  • 3
    Why make this harder than it has to be? Print a QR code they can scan with there phone that will send their browser to the webpage hosted on the Pi. No need to pair, plenty of apps to read QR codes. – Steve Robillard Jan 05 '17 at 17:31
  • 2
    Or, slightly more difficult but totally within the realm of known solutions with plenty of documentation on the Internet, have the RPi act as a WiFi host, and once a device connects to that network the suggested webpage shows up. – Phil B. Jan 05 '17 at 18:17
  • 1
    @SteveRobillard I've considered that solution - however I don't think it will work. First of all, the phone and the Pi must be on the same network one way or another. One of the reasons I want to connect a mobile phone to the device this way, is because I want to provide a user interface for connecting the Pi to the internet in the first place. Only after that, it will be possible to have a QR code to launch the webpage. – frodeborli Jan 06 '17 at 08:21
  • 2
    @PhilB That's one possibility, I've done something like that in the past. It's not a smooth enough experience. – frodeborli Jan 06 '17 at 08:22
  • 1
    1/ There could be TCP/IP over BT, I did it already time ago. 2/ it is imho possible to - after a connection happens - to initiate a communication from RPi - send web address or whatever. Check this http://stackoverflow.com/questions/17692368/android-bluetoothpan-to-create-tcp-ip-network-between-android-device-and-windows – jaromrax Feb 08 '17 at 15:22
  • 1
    There is a very nice VNC Viewer app for iPhone. https://www.realvnc.com/download/viewer/ios/ – Stone True Feb 21 '17 at 17:16

3 Answers3

2

A quick google search pulls up a couple of tutorials on how to tether your smartphone to your laptop, or even several laptops to share internet, but none of these solutions would let you run the setup headless.

Judging by the thread here RPi Bluetooth is fiddly at best and at worse a firmware nightmare, requiring a fair bit of tinkering and access to set up. Though once setup -- provided the bluetooth stack doesn't crash -- it should recover the connection gracefully enough the next time the client is in range. Thought that doesn't help with the first time a particular phone gets in the car.

Maybe I'm not being fair to the little board that can, Bluetooth by its nature is fiddly, it might not be a RPi problem at all. Low power signals are easily interfered with after all. All of the big automotive companies have spent large sums of money for systems that work consistently with their customer's phones.

This site might provide some tools to help you. Sadly, since Bluetooth is an actively licensed brand, open source solutions may not be be feature rich.

Finally -- and I hesitate to offer this -- a Bluetooth Beacon may not sound like what your after, but there is a solution direct from Bluetooth.org that supports the project on a RPi, so it might be worth a look. It will require signing up for their developer's kit and not having done that myself I can not speak for their treatment of hobbyists though the fact that they have development kits for RPi and Arduino 101's is promising.

Since Bluetooth beacons are being developed to provide location aware advertising (sic) to smart phones, then this branch of the technology is likely to be better supported in the future and might suit your needs with a little creative coding.

If you have the means to develop an app to run your project, you can use something like the Eddystone project to tag smartphones that get into your car. From there, its in the hands of the user.

If your unsure of what a Bluetooth beacon is, I can give a quick example. Target runs them to drive folks to their Cartwheel savings app. When I walk into a Target store (or even drive through the parking lot sometimes) I get a banner notice on my phone. Its inviting me to open their app and connect to the deals available in the store. While you are hopefully not going to be serving ads to the people getting into your car, the principle is the same.

Sandor Dosa
  • 501
  • 1
  • 4
  • 17
1

you not only want to access the Raspi but it also should have internet access, right? This is what I do:

1) Tether from Smartphone. Make sure the SSID and PW are already stored in /etc/wpa_supplicant/wpa_supplicant.conf, so your Raspi automatically connects to your phone.
2) If Raspi is running a webserver you can now access it by typing raspberrypi.local into your browser. (Or SSH, FTP,...)

Notes: This trusts on your smartphone supporting/hosting DHCP. The URL corresponds to the device hostname, raspberrypi is default.

Jeremy
  • 161
  • 1
  • 4
1

This may sound stupid, but thinking about simplicity, why not connect the pi to a portable wifi dongle (I know EE does carfi), then have them connect, set the homepage to send them to the app store to download VNC Viewer, then as you are connected to the network they simply type in the ip, username and password and bobs your uncle. A crude and simplistic format but it may help.

Will Marks
  • 31
  • 6