so I'm a Pi newbie and would love if someone can give me some hints on this. What I have currently:

  • The Pi will control a robot that I have built. I have built a bunch of python functions that interact with the robot using GPIO pins. The program also sends logging data to a database I've created on the internet (meaning it needs to be connected to the internet, but currently this is hardcoded in the code, username and passwd for wpa2). So, the core logic of the program itself is completed,

Here is my issue/troubles now with Rpi:

  • I want this to be controlled from an app (Android/Ios) I'm building. So, I just want to plug in my raspberry pi to a power source and then turn on my app and connect to my raspberry pi with bluetooth. Then once it's connected through bluetooth, from the app, you can connect the raspberry pi to the internet as well. From then on, I basically can send data to my raspberry pi to do something using my python functions. So, basically:

    1.) How do I make the pi completely discoverable and be able to connect to bluetooth through my phone.

    2.) Once connected, provide the user option to input custom username and password for the wifi, so rpi is also connected to wifi after

I think I've seen many place where this is done, but I cannot for the love of god, find any guides to get me there. I'm just frustrated cause I've got the main parts in for my robot, but I cannot send this out to anyone else since everything is relying on the internet and right now the wifi credentials are hardcoded. Any help or if there is any other solutions, please let me know...any help appreciated :)

  • have you considered having the pi host a website to connect to instead? that would be another option, using wifi, instead of bluetooth – scitronboy Mar 24 '18 at 20:44
  • What have you tried please - the internet is covered in various guides for this, though I recommend for a beginner using an existing (trustworthy) app to pair up with (these can send key-presses like a gamepad which is easy to code to interpret!). BTW the suggested method of using a web server is VERY easy to setup, however whatever you are using latency (i.e. lag) will be an issue you need to minimise (or just don't go near stairs - not from experience in any way! :) – Wilf Mar 24 '18 at 20:52
  • Thanks for the response, but even if I have just a website hosted on the pi, the pi still needs to get on the network through wifi first right? If I hand this robot out to customers, they will not have access to pi connections. This is why it needs to be done through Bluetooth. Use Bluetooth to connect to phone -> use phone to connect pi to network -> use phone app and be connected to pi using bluetooth/wifi @scitronboy – dmantor Mar 26 '18 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.