Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Establishing connection #31

Open
Szabzi opened this issue Oct 13, 2023 · 2 comments
Open

Establishing connection #31

Szabzi opened this issue Oct 13, 2023 · 2 comments

Comments

@Szabzi
Copy link

Szabzi commented Oct 13, 2023

Hi there, thanks for the library. I have a question which might be really dumb but if I implement this into a unity project, do I need to implement the connection with my own code before connecting OBD.NET to that comport or is that all done in your library? I can't seem to connect my app to the obd even though other apps work. In the unity project the script to connect is mostly taken from the example console program you provided. Am I missing something? Thanks.

@DarthAffe
Copy link
Owner

In the example everything regarding the connection is handled in the SerialConnection that you configure with the serial-port.
The connection is opened when dev.Initialize is called.

What's perfectly possible though is, that this implementation does not work in unity-apps (They might have some limitations/different way of handling IO) in that case you might need to implement the ISerialConnection-interface with something Unity-specific.
But I don't have any experience with unity, which makes it quite hard to be sure if that's really the case.
Do you see any exceptions when requesting data?

@Szabzi
Copy link
Author

Szabzi commented Oct 15, 2023

I figured out that the freeze happens because of _serialPort.Open() in SerialConnections. No exceptions because if I don't comment out this line the whole editor freezes. I found some people online having issues with this function so maybe I can go from there. Btw it definately is a Unity thing because I can get your console project to open the port. Anyways thanks your help and this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants