I think this QA is similar, but this problem is NOT Win or Mac problem,
since I confirmed that I could connect CY5677 dongle when using C# WPF project.
I don't think anyone has tried importing the DLLs into a Unity project other than the one thread you mentioned. We have tested the application to work in Visual Studio as a WPF project. I'm inclined to believe this will work even in Unity if the target platform is set to Windows in the Build Settings.
After you added the code, did you see any error in the console when you run the application? Can you please share the Player.log file which gets generated at this path: "C:\Users\<user_name>\AppData\LocalLow\<company_name>\<app_name>"
I tried creating an application to test it at my end. I need to set up my environment correctly, I see some DLLs like XInput1_3.dll and IL2CPP missing. I will try to get those fixed.
Meanwhile, please attach the log so that we can get more insight into this. Looking forward to your reply
Thank you for your comment.
First, I upload WPF project.
This project is very simple (just checking port open)
and I confirmed this work well.
And what I want to do is to import this function to Unity.
(off course I'd like to receive BLE data at Unity but DLL import check is the first. )
Next I'll upload Unity project and player.log file.
CyBLE_Rx_PortOpen.zip 270.6 K
I upload three files.
1. Unity Project (This project is also very simple (just checking dongle port open, same as WPF project. ))
2. Editor log file
3. Player log file
It seems that output_log.txt shows "PlatformNotSupportedException" was happened.
I built this project as a UWP(x86, IL2cpp, Api compatibility: DotNet2.0)
After building at Visual Studio 2019 (Release x86,Local computer),
I found "NotSupportedException: System.IO.Ports.SerialPort" shown as attached file.
So I'm pretty sure that this problem is caused by SerialPort Dll.
NGlog.png 168.3 K
I modified PSoC 4 dongle firmware which output UART (P1,P1).
In this case, I don't need to use DLL file such as cybleautobase.dll,
so I can use Serial Port as usual, and confirmed BLE information.
I think this is one of the solution for Unity reciving BLE from Cypress Dongle.
I tried bellow cases, but in all cases,"NotSupportedException: System.IO.Ports.SerialPort" happen.
Case 1. Unity 2018 Mono .Net 4.x
Case 2. Unity 2018 IL2CPP .Net 4.x
Case 3. Unity 2018 Mono .Net standoard 2.x
Case 4. Unity 2018 IL2CPP .Net standoard 2.x
(When switching .NET 3.5 Equivalent environment, the situation doesn't change)
Case 5. Unity 2019 Mono .Net 4.x
Case 6. Unity 2019 IL2CPP .Net 4.x
Case 7. Unity 2019 Mono .Net standoard 2.x
Case 8. Unity 2019 IL2CPP .Net standoard 2.x