- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm currently working on an application in Unity 3D that connects to a BLE device to send/receive data. The BLE device is configured to only work with the CY5677 BLE dongle. I need to be able to connect to the dongle through the COM ports, but I'm having some issues. I found a forum post from 2020 where another user seems to have had the same issue and found a working solution (https://community.infineon.com/t5/PSoC-4/CySmart-DLL-Import-Unity/m-p/28990#M97 ). However, I do not understand what they did to solve their issue. Does anyone have some insight on how this issue can be resolved? Any help would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ChrisMims
Can you please explain the exact issues you encountered while trying to connect to the dongle through the COM ports? Also, can you please share the screenshots of the error messages seen in the console?
Thanks and Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey, @LeoMathews!
I've attached a ZIP file with a very simple Unity project that should show the issue much more clearly than I can explain it. Usually, what I wrote should be enough to communicate with COM ports (or in this case, at least be able to confirm that the device is connected). Going off of what @TaDa_1407706 found, it seems to be an issue with the CySmart DLLs not being compatible with Unity.
They mentioned that they "modified PSoC 4 dongle firmware which output UART (P1[4],P1[5])" in their solution, but I don't understand what that means or how to apply that solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ChrisMims
They are mentioning that they have modified the PSoC4 dongle (CY5677 BLE dongle) firmware which is used to communicate with the BLE device instead of using the dll files. Can you please tell me which BLE device you are using to communicate with the CY5677 BLE dongle?
Thanks and Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey, @LeoMathews ,
The BLE device I'm using with the dongle is the MAXREFDES104 by Maxim Integrated. Can you give me some guidance or resources on modifying the firmware to communicate with the BLE device instead of using the DLL files?
Thanks,
Chris Mims
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ChrisMims
Can you please share the project code for CY5677 BLE dongle used to communicate with the BLE device? We will try to modify it to work with Unity 3D.
Thanks and Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey, @LeoMathews ,
Here's a simple project that just tries to connect to the CY5677 BLE dongle through the COM port. Unfortunately, I can't share the entire project due to an NDA. Any help you can provide would be incredibly helpful! Please let me know if there's anything else I can provide.
Thanks,
- Chris Mims
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ChrisMims
There is a package for integrating any hardware/software with unity called Ardity. Can you please try importing the package to your project and see if it helps? I have also tried the same from my part and was able to establish the connection between CY5677 BLE dongle with Unity. You can clone the Ardity package from this github repo.
Thanks and Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ChrisMims
I have created(attached) a Unity project(Connecting_BLE) that interfaces with CY5677 BLE dongle. Using this you can connect to the dongle through the COM ports. Also a modified PSoC Creator project(SCB_UartComm01.cydsn) is attached which performs LED blinking based on commands given through Unity. First program the CY5677 BLE dongle with the PSoC Creator project.
Also please install the Ardity Package and import the same in your project.
Then open the Unity Project (the version I used is 2020.3.14f1) and set the COM port settings by navigating to Project>Assets>Ardity>Scenes>DemoScene_UserPoll_ReadWrite. Then select SerialController as shown in the below picture and configure the corresponding COM port and Baud Rate.
Then run the Unity Project. Observe the console messages while running and the LED blinking based on the commands given through keyboard.
Thanks and Regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It works! Thank you so much!