I am working on a Unity project. In my project, I just want to send LightLue Bean (Arduino Low Energy Bluetooth) color information to control the light color.
I am trying to send serial data from Unity to Bean BY SerialPort sp = new SerialPort("/dev/cu.LightBlue-Bean); But this gives me this error:
IOException: Inappropriate ioctl for device
I was thinking about using /dev/cu.Bluetooth-Incoming-Port, but could not enable the Use for Virtual Serial (/dev/cu.LightBlue-Bean) function.
Then I tried to read the entire serial port name from Unity. But ports.LengthZERO always matters. (code below):
string[] ports = SerialPort.GetPortNames();
Debug.Log (ports.Length);
for(int i=0; i<ports.Length; i++)
Debug.Log (ports[i]);
Can you give me some advice?
And if I manage to do this, will it work immediately for an Android phone if I create an APK file?