-2

I have a question, if we want to communicate with Raspberry PI device for either getting data or sending data on the device. For such requirement any SDK/Framework available or not.

I want to get data(json type) from Raspberry device to iPhone device. Also want to send json data(using http request post) to the Raspberry device.

  • 1
    Send using what language? what type of data? Sending from what program? – Steve Robillard Aug 26 '16 at 8:33
2

Are you planning to create an app or use some messenger to talk to the device. Say for example you can use xmpp to pass messages to your device and give triggers.

You can use light weight protocols like MQTT with Mosqitto broker to accomplish the process of talking to raspberry pi.

However if you are are looking to create an app and then talk to your Raspberry pi. I would suggest to create a ReSTful service and the then create a mobile app and talk to the service.

If you are on starting phase I will suggest the following steps for prototype. This is my experience.

  1. Create a RestFul service and tie that to a reverse proxy like nginx. I am python developer so I did it using Python - Pyramid framework. Flask is also a very good option.

  2. Use MQTT or XMPP. When I did a prototype I used Yowsup (Whatsapp messenger for Pi) to talk to the Pi from external world and by messaging to the whatsapp number tied to Rasperry Pi I triggered the RestFul service.

  3. You can port it to your custom app once the prototype works as expected.

The best app to try would be a Temperature/Humidity sensor or a process monitor app in Raspberry pi.

Hope you got it.

  • First, I want to create app for iPhone devices. I want to get data(json type) from Raspberry device to iPhone device. Also want to send json data(using http request post) to the Raspberry device. Using Bluetooth connection(PAN), Please suggest. – Ram S Aug 26 '16 at 9:07
  • @RamS I have couple of questions . The first one is are you looking to take control or restrict device access within the home network or are you planning to access it from outside. Second is that http and bluetooth are two different protocols. If you are using ReST then use http. If you are using bluetooth then you can obexpushd for raspberry pi. Please refer the link instructables.com/id/… for details. – Varad A G Aug 26 '16 at 9:20
  • @ Varad A G - First of all Thanks to provide valuable suggestion. I want to 1. Looking to take control, 2. Using Bluetooth connection. – Ram S Aug 26 '16 at 9:43
  • @RamS I would suggest you to relook at your design. The reason being it is not advised to use a protocol like Bluetooth when you are spending time to build an iOS app. Bluetooth protocol is used when you are planning to use the Raspberry Pi as a controller which controls other devices on the household, say for example controlling a Bluetooth enabled speaker. So suggest you to re look at the design. – Varad A G Aug 26 '16 at 10:16
  • @ Varad A G - Recently our requirement is clear that we have to receive data from Pi device via blue-tooth in offline mode, means if there is no network i.e. wifi at that situation iOS deveice will get data from Pi device and store locally and when iOS device will come over wifi zone stored data will move to server using restAPI. Please suggest any solution... and data will be huge in quantity that we have to read from Pi device. – Ram S Nov 14 '16 at 13:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.