Anyone having issues with Unity API?

Python, Java, Android OS, etc.
TA-TSC
Posts: 8
Joined: Wed Aug 10, 2016 11:12 am

Anyone having issues with Unity API?

Postby TA-TSC » Wed Oct 05, 2016 11:05 am

Hello all,

I am having some issues connecting the BitAlino to the Unity engine. I have followed the video tutorial that was posted in the other thread. The issue I am having is the BitAlino is not being connected. My method is as follows:

1. Plug the supplied bluetooth adapter into a USB 2.0 Port
2. Clicked on the bluetooth icon in the Windows taskbar and clicked "Show Bluetooth Devices"
3. The computer can detect the BitAlino and I can input the "1234" code to connect to it
4. I then go into "Devices and Printers" and take note of the BitAlino's COM port number
5. Launch the Bitalino project folder that comes with the Unity API.
6. I change the COM port so that it matches exactly to the one found in "Devices and Printers" i.e. COM6
7. Press the play button in Unity

When Unity runs, I get an error message within the console telling me that it couldn't connect the BitAlino, and that the COM port specified is not open. I've tried this on one other computer and a laptop. The specs on my machine:
-Intel Xeon E5-2620
- 32GB RAM
- GeFORCE Titan X
- OS: Windows 10 Version 10 Build 10240
The other PC is the same specs and the laptop is an Alienware laptop, the specifications of which I'm not certain but the OS is Windows 10 Version 1607 build 14393.187. Each of the machines have a version of Unity running.

When I received the BitAlino I was running Unity 5.3 and it ran fine, even after the project upgrade that Unity does. I later updated to Unity 5.4.1f1 and it also worked fine the day before yesterday. When I try loading it today, it doesn't work. Nothing has changed on my PC since. The second PC is running 5.4.0p4 and doesn't work. The laptop is running the same Unity version but works for some reason.

Did anyone else have problems with the BitAlino and getting it to work with Unity? Is there an updated version of the API somewhere? I understand that was made in 2014 but not sure if the author has updated it since.

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: Anyone having issues with Unity API?

Postby BITalino » Wed Oct 05, 2016 5:11 pm

Hi there,

We're sorry to hear about the issues that you have been experiencing... we are not quite familiar with the Unity API, but a few issues that may be associated with this behaviour are changes in the COM port (the number is not guaranteed to stay the same forever), an incorrect COM port number (from what we recall the system assigns an input and an output port), other processes / applications already using the BITalino COM port or a baud rate that is not the one required by the device.

Best regards,
The BITalino Team

TA-TSC
Posts: 8
Joined: Wed Aug 10, 2016 11:12 am

Re: Anyone having issues with Unity API?

Postby TA-TSC » Thu Oct 06, 2016 8:24 am

Alright this will be a problem since I bought the Bitalino on the basis that it works with Unity. Anyway, I took some screenshots for reference as to what is going on. The first screenshot shows the COM port the Bitalino is connected to and I am explicity putting into the Unity property window (usually called the Inspector).The second screenshot shows the error messages I am getting. Note the window in the back that says I am connected but the console messages says otherswise. I'm going to try and look through the scripts to see if I can even attempt to fix this myself. If possible, does anyone know how to get in contact with the author of the API? It wouldn't hurt to send him an email
Attachments
capture2.PNG
capture2.PNG (56.69 KiB) Viewed 1854 times
capture1.PNG
capture1.PNG (47.83 KiB) Viewed 1854 times

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: Anyone having issues with Unity API?

Postby BITalino » Thu Oct 06, 2016 8:49 am

Unfortunately we don't have the direct contact of the author... if you haven't done so yet, please post a comment on the video: https://www.youtube.com/watch?v=Qffgl_vzMQE

or contact him through the contacts available on the YouTube profile:
https://www.youtube.com/channel/UCQDkxr ... En-g/about

TA-TSC
Posts: 8
Joined: Wed Aug 10, 2016 11:12 am

Re: Anyone having issues with Unity API?

Postby TA-TSC » Thu Nov 03, 2016 1:05 pm

Just a small update; since my last post we have tried plugging the board on to different machines. It appears that I may have a faulty bluetooth adapters. I forgot to connect the adapted to the laptop once (I mentioned that the Bitalino connects to the laptop for some reason in a previous post). Turns out, the laptop itself had its own Bluetooth built in. So I tried connecting the Bitalino to the laptop top with the usb bluetooth adapted connected to the laptop and then without it; both times it looked as though it connects although I'm not sure if it was connecting to the built-in bluetooth or the usb adapter bluetooth. What I am sure of however, is that if I use the usb bluetooth adapter on a desktop PC, although the PC can detect the Bitalino it will not connect to it.

onilatib
Posts: 2
Joined: Sat Dec 17, 2016 2:04 pm

Re: Anyone having issues with Unity API?

Postby onilatib » Sun Dec 18, 2016 11:24 pm

Hey,
do anyone have a solution for using bitalino in Unity building for Android.
The Problem is connecting with Bluetooth is not possible by a COM Port
thx

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: Anyone having issues with Unity API?

Postby BITalino » Mon Dec 19, 2016 8:36 am

Not sure if it helps a whole lot, but we've just released a new API for Android:
https://github.com/BITalinoWorld/revolution-android-api
http://bitalino.com/docs/android-api.pdf

Perhaps you can replace the current Unity connection procedures for this?

Best regards,
The BITalino Team

onilatib
Posts: 2
Joined: Sat Dec 17, 2016 2:04 pm

Re: Anyone having issues with Unity API?

Postby onilatib » Tue Dec 20, 2016 7:35 pm

Hey and thx for answare.
Unity and its implementation is working in c#.
So for example i need a BITalinoCommunication .cs .
Maybe i have to read about how to use java classes in c# but ....

Hope someone have a same target.

TA-TSC
Posts: 8
Joined: Wed Aug 10, 2016 11:12 am

Re: Anyone having issues with Unity API?

Postby TA-TSC » Tue Jun 06, 2017 1:47 pm

Keep getting inconsistent data. I can run the application through the Unity editor with the API. Issue is that when I run the executable, the application doesn't connect to the Bitalino. I'm having to close and then reopen the application until I get an instance of the application with the Bitalino connected. Even when it is connected, the data I'm getting through the sensor seems like there is a lot of noise. Running the BitAlino through OpenSignal seems to show the same although there was an instance, and still is the case, where the skin conductance sensor (EDA?) doesn't pick up anything. Could this be a damaged sensor?

I tried looking for contact details for the developers of the Unity API on bitbucket but couldn't find anything. Trying to contact the video maker for the Unity-Bitalino tutorial. Can someone suggest what I should try to do?

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: Anyone having issues with Unity API?

Postby BITalino » Tue Jun 06, 2017 1:51 pm

Hi there,

We're sorry to hear about the issues you are experiencing. Could you share a photo illustrating how the sensor is being connected?

Best regards,
The BITalino Team


Return to “Programming APIs”