Author Topic: Communication between Android phone and Arduino  (Read 1976 times)

0 Members and 1 Guest are viewing this topic.

Offline pascal_swedenTopic starter

  • Super Contributor
  • ***
  • Posts: 1539
  • Country: no
Communication between Android phone and Arduino
« on: December 01, 2015, 03:18:58 pm »
This thread is closed. I found a solution using Google Protocol Buffers.
« Last Edit: December 10, 2015, 10:48:27 am by pascal_sweden »
 

Offline Neverther

  • Regular Contributor
  • *
  • Posts: 129
Re: RPC mechanism between tablet device and ATmega via FT312D
« Reply #1 on: December 04, 2015, 06:47:46 pm »
Sounds like a wierd idea. Might work, but the implementation would be way too platform specific to be viable and automatic code generation will have some overhead. The implementation behind it would need arduino scale abstraction (see Arduino Total Control On google play).

I'd imagine they just pass the data with UART based on the datatype lenghts on the function definitions plus some glued on flow control. Passing pointers, maybe not so robust.
For actual C to programs it would need its own IDE to separate the code segments and automate communication. As far as I understood, you want the "C" source to generate the code handling communication on the android application (java?) and generate/compile avr application that work together (see above, arduino abstraction from HW simplifies it).

Just looking for something that will generate serial comm for the android side and implement the avr code yourself as by the specifications in the proto? Possibly borrow it from stuff like shown above if it is open source?

(not even a user here, for avr+android only modified a bootloader to work with watchdog reset so I could update over bluetooth)
 

Offline Neverther

  • Regular Contributor
  • *
  • Posts: 129
Re: RPC mechanism between tablet device and ATmega via FT312D
« Reply #2 on: December 04, 2015, 10:51:39 pm »
No, I just did quick search if there was anything like it.
Google bring up this: https://github.com/JuanLuisGonzalez/ATC-Release-Codes?files=1
No android side code as it is not free?
Seems like the datasets on total control are fixed and on android side the created layout just tapes together desired I/O to the receiving end.
Sending data from micro is the smae

Back on track.

So basically when prototype C function is called on tablet/micro, it pulls up the interface to communicate with the micro/tablet to run a function and returns the result for the tablet/micro to process. So at minimum function ID, parameters and their count/type upstream and result/type downstream.

Automating the code generation for the communication on micro and android when a function prototype is defined is the goal?

I might have missed it a bit as I assumed there was a need to generate one application with all code, where some code was defined to be ran on the micro only and some on androind only, my train of thought littlebit too complex...
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: RPC mechanism between tablet device and ATmega via FT312D
« Reply #3 on: December 10, 2015, 10:48:15 am »
You are making things more complicated than necessary. You already have a bidirectional serial link, just make your own simple protocol.

Regarding "frameworks":
http://discuss.joelonsoftware.com/?joel.3.219431.12
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Communication between Android phone and Arduino
« Reply #4 on: December 11, 2015, 01:14:23 am »
I was going to suggest looking at the video from Shahriar linked in the following thread:

https://www.eevblog.com/forum/projects/tutorial-esp8266-soc-blynk-app-arduino-and-internet-of-things/msg816090/#msg816090

But the OP deleted the question and found a solution, so now we don't know what the question really was (other than the subject).

Even if the question and the idea was complicated and/or weird it might have been interesting but now we wont know.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf