We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all,
I am trying to establish bidirectional communication via Wifi between an Android device and a PC running Windows. I have followed the Daniel Sauter's book "Rapid Android Development", Chapter 6: Networking devices with Wifi. https://www.mobileprocessing.org/networking.html
I am trying the first example of the chapter.
On the Android side, the code can be found at:
On the PC side, the code can be found at:
When running both codes, the android device gets the messages from the PC but the PC doesn't get the messages sent by the Android device. Is there any solution? If not, Is there another approach to establish the communication using Processing?
I am using:
PC: Windows 10 v.1709, Processing 3.3.6, Android Mode 4.0, Ketai 14, oscP5 0.9.9
Android device: Samsung S5 Mini (SM-G800F), Android 6.0.1
Thanks in advance!
Answers
Solved!
I found another discussion with a similar problem:
https://forum.processing.org/two/discussion/18194/receive-osc-using-oscp5-library-android-mode-4-0-beta2
It seems that oscP5 is not compatible with Android Mode 4.0. So, I have changed the codes to use the library UDP and now it works.
Print, please, the redesigned code under to use the library UDP
I found the working code. Maybe someone will need it. Processing 3.3.6, Android Mode 4.0. Phone: Android 7.0.
https://github.com/gratefulfrog/Car/wiki/Processing-Android-mode-and-Ketai-Library#wifi
I delete this part:
public void settings(){
fullScreen();
and replace in setup() this :
orientation(PORTRAIT); //LANDSCAPE);
work code see below:
For Pc javaMode:
For Android device, android Mode:
Hi! Thanks for your answer.
Where you have made the changes? Do you have modified the libraries? Because in my case, your code is still not working in my Samsung S5 mini.
See below the codes working with UDP
For PC (Java mode):
For Android device (Android Mode):