Using the Arduino Yun to communicate ad-hoc with a smartphone.

I am a college freshman student in South Korea with little grounding in coding or network programming (due to the Yun's space restrictions and ignorance on what alternative language development environments the repository service opkg offers I am currently learning Python. I have had minimum education in programming concepts in C and Java.) currently working as part of a laboratory project on IoT applications and smartphone-assisted localization. It is my understanding that the Yun's WLAN module is controlled not by the Arduino microprocessor but rather by the processor running Linux. What would I need to study besides Python concepts to implement a program that would allow the Yun to communicate ad-hoc (without an AP being present) with an Android smartphone, and is this feasible at all? We are currently using the Yun as a placeholder for 'smart' household items with connectivity features.

have a look at Bluetooth, you can use this direct from the Arduino without going through Linux or WLAN

Supported WIFI mode

Setup adhoc mode

mikeruss:
have a look at Bluetooth, you can use this direct from the Arduino without going through Linux or WLAN

Setup USB Bluetooth 4.0 Adapter

I am programming on a system to communicate with the yun from a webbrowser (firefox or chrome) which obviously can run on a any smartphone.

Actually it is a 3-tier system:

  • a script which runs on the Atmel32U4-part of the yun (uploaded through the Arduino IDE)
  • a program written in C which runs on the AR9331/Linux part of the yun
  • a php-script which runs on a (remote) webserver which can we accessed from anywhere through your (smartphone) webbrowser

The C-program (use gcc yun for compiling) is the central part: it uses sockets to communicate with the php-script on the webserver. So it can read settings/commands which you put there through your webbrowser. It also writes feedback to that same webserver (html-format, accessible for webbrowser).

The C-Program also communicates with the script which runs on the atmel32u4. I first tried serial communication through ttyATH0 but that did not work for me. So I choose to let them communicate through files. The arduino-script uses the Bridge-library to read/write those "communication files".

It works!