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

SerialPort support? #3

Open
dotKokott opened this issue Sep 17, 2019 · 10 comments
Open

SerialPort support? #3

dotKokott opened this issue Sep 17, 2019 · 10 comments

Comments

@dotKokott
Copy link

It seems that currently the C# version of the library only supports Bluethooth to connect to a local device.

Are there any plans to support a USB Serial connection as well in the near future?

@hgonzaleDigi
Copy link

hgonzaleDigi commented Sep 17, 2019

Hello @dotKokott,

Currently, serial interface communication is not supported in the "official" release, meaning, it is not included as a nuget package. However, we have implemented the serial interface support (only for Windows) and it is included in this branch.

There you can find several examples on how to work with the library.

Regards,
Hector.

@usmanshahid001
Copy link

usmanshahid001 commented Sep 18, 2019

how to install xbeeLibrary.windows as there is not any nudget package as you mentioned.thanks

@usmanshahid001
Copy link

where to find XBeeLibrary.windows.dll as it is being referred in all files.

@hgonzaleDigi
Copy link

To do so, you need to checkout the branch from the above link (which includes the Windows support).
With all the files that are downloaded, open the solution with the XBeeLibrary.sln file (just double-click on it and visual studio will open automatically, if you have it installed).

Once the solution is fully loaded in Visual Studio, right-click on the solution and select "build" in the contextual menu (or simply go to the top toolbar and click on Build -> Build Solution).

This process will generate a bin folder in <XBeeLibrary_installation_path>\XBeeLibrary.Windows.
In that folder, depending on whether you built the solution in debug or release mode, you will find the corresponding folder and inside there you will find the Windows and the Core DLL files that you need to import to your project.

@usmanshahid001
Copy link

well i followed all the steps but there are some errors produced upon building the project..

Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'ICloneable' could not be found (are you missing a using directive or an assembly reference?) XBeeLibrary.Core C:\Users\usman\Documents\GitHub\xbeeCoordinatorC#\xbee-csharp-windows_module\xbee-csharp-windows_module\XBeeLibrary.Core\Models\XBeeFirmware.cs 33 Active
Error CS0115 'XBeeFirmware.Equals(object)': no suitable method found to override XBeeLibrary.Core C:\Users\usman\Documents\GitHub\xbeeCoordinatorC#\xbee-csharp-windows_module\xbee-csharp-windows_module\XBeeLibrary.Core\Models\XBeeFirmware.cs 235 Active
Error CS0115 'XBeeFirmware.GetHashCode()': no suitable method found to override XBeeLibrary.Core C:\Users\usman\Documents\GitHub\xbeeCoordinatorC#\xbee-csharp-windows_module\xbee-csharp-windows_module\XBeeLibrary.Core\Models\XBeeFirmware.cs 251 Active
Error CS0115 'XBeeFirmware.ToString()': no suitable method found to override XBeeLibrary.Core C:\Users\usman\Documents\GitHub\xbeeCoordinatorC#\xbee-csharp-windows_module\xbee-csharp-windows_module\XBeeLibrary.Core\Models\XBeeFirmware.cs 260 Active
Error CS0120 An object reference is required for the non-static field, method, or property 'object.MemberwiseClone()' XBeeLibrary.Core C:\Users\usman\Documents\GitHub\xbeeCoordinatorC#\xbee-csharp-windows_module\xbee-csharp-windows_module\XBeeLibrary.Core\Models\XBeeFirmware.cs 553 Active
Error Package Plugin.BLE 1.3.0 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Plugin.BLE 1.3.0 supports:

  • monoandroid (MonoAndroid,Version=v0.0)
  • portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
  • xamarinios10 (Xamarin.iOS,Version=v1.0) 0
    Error One or more packages are incompatible with .NETStandard,Version=v2.0. 0

@hgonzaleDigi
Copy link

It seems there is some sort of problem with the configuration of your project. But this is not enough invormation for us to verify what could be going on with it.

Please, try to create a new project from scratch (If you are building a Windows Forms App):
image

Once created, right-click on the solution:
solution_explorer

Click on properties, and select the Application tab where the information of the project resides:
image

If all the information matches the one in this screenshot continue by adding the core and Windows DLLs to the project:
solution_explorer_references

Click on Add reference in the contextual menu and Browse for the DLL files of both Windows and Core libraries. Once added to the list, select them and click OK and both libraries should be imported to your project without any errors.

This is the manual way, but the core library could also be installed through the NuGet Package manager.

@usmanshahid001
Copy link

usmanshahid001 commented Sep 19, 2019

i updated my visual studio and now i am able to install XbeeLibrary.core and Xbeelibrary.xamrian successfully. actually my .netstandard was 1.3 but i m unable to build .sln provided in library folder in order to get xbeeLibrary.widoes.dll

@usmanshahid001
Copy link

can you please provide xbeeLibrary.windows.dll? i am unable to generate it by building solution.nuget packages are installed successfully .

@hgonzaleDigi
Copy link

The library is built for .netstandard 2.0, that may be the issue for you not being able to build or import the NuGets. Please, update to that version, otherwise we cannot assure you the library will work for you.

The DLL is subject to change as code is developed, so it would be better for you to create a project with the appropriate versions of the framework and build the DLL yourself so for next code updates, you can download the code and build the Windows support library.

@usmanshahid001
Copy link

done.thanks a lot dear.so nice of you...

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

3 participants