Bluetooth GATT server using D-Bus and .Net Core - c#

I am trying to run a Bluetooth GATT server on raspberry pi 3 and raspbian OS. Based on this post, the BlueZ D-Bus api can be used in .Net Core by Tmds.DBus library and its C# interfaces can be generate using Tmds.DBus tool.
I have read Bluez docs and most of the existing samples (based on python and c),
but i can't understand how to define and advertise the GATT server in .Net Core.
Can anyone provide a .Net sample or any other solution?

Creating a BLE peripheral is one of the more tricky things to do with BlueZ D-Bus API. You will need to create a GATT server and an advertisement. Unlike the GATT client, creating the server requires for objects to be registered on the dbus.
I am not familiar with .NET, but it is the ability to register objects in D-Bus is the key to getting a GATT server working. From this example I found the key word is : RegisterObjectAsync
Using that keyword, I then did a search and turned up this library as using it:
https://github.com/phylomeno/dotnet-ble-server
This looks like it should be of interest to you.

Related

How to create Facebook RTSP stream with C# .NET Core (windows + linux) using Console Application?

Connection i need is:
React Native Application -> C# .Net Core Server -> RTSP Facebook API
To be honest, i am not sure how to start with that. My first idea was to use GRPC Streams as connector between Client and Server, and then convert everything to RTSP at Server and send it to Facebook API. First problem i have found there are not many "fresh" libraries or SDKs for .Net Core allows me to make server side stream via RTSP.
Have you any idea how to cope with that?

Data push to a cusom app on a Raspberry Pi from a windows server

The title basically says it all. I am running Debian GNU/Linux 7.0 (wheezy) on the Pi and .Net on the server. This will be for a consumer device so I expect it to just be behind someones wireless router.
I am trying to find someone code this for me and everyone I talk to has a completely different plan of attack and would appreciate some input.
My original plan was to use signalR for most of this
Is there a way to simply get signalR to work on the RaPi?
Will mono work to port the signalR code over? (I've heard mono doesn't work for the pi)
Is there a simple way to accomplish this without signalR which would still easily implement the security features already built into it?
A couple people said I may have to worry about port forwarding issues, why if it works in a web browser without issues.
I can load up a web browser on the Pi and hit my windows site using signalR to push data and it works fine. Sounds fairly simple to me to copy the basic functionality of a browser in .net(my primary language), is it really that much more complicated in Linux?
Overall my main goal is to get data pushed to the RaPi, not polled as others have suggested.
Any suggestions would be great.
Thanx
SignalR works on the Pi - see this github sample.
A IIS/Windows hosted MVC app runs the SignalR hub
The remote control / UI is an MVC page. It connects to SignalR via javascript
The pi runs a console app, connecting to the SignalR hub via the c# client
The only trick is to compile the mono.sln in the signalR repo to get the C# client binaries.
The nuget C# signalr client binaries didn't connect to the server from the pi.
The mono compiled client signalr binaries can be used to connect from a pi or windows hosted console app.
Note this code base targets mono 3 while the default package from apt-get is mono 2. Compiling from mono3 from source isn't hard.

Communication between Java ME application and C# application using bluetooth

I am C# developer which started working in Java lately, never done anything in Java ME. My next project requires to pass simple keypress from phone keyboard to C# application using bluetooth, there are some examples on sending/recieving files over bluetooh, but so little documentation how to pass messages between applications:
I stumbled on 32feet.NET library but provided samples are just poor, and bigger mystery for me is J2ME side of application.
if someone could provide any code samples or just explain some basic stuff and principals of bluetooth communication beetween phone and desktop applications:
what bluetooth service is used for passing messages? Serial port?
what type of data can is used for communication?
how is connection kept alive?

Google Cloud Messaging Server Side Code in C#

I want to write implement 3rd party server for GCM (Google Cloud Messaging) for android using .Net. The official documentation gives guidelines for using it with servlet-api and gcm-server.jar ( Java helper for server side ).
Is there any equivalent for using it in C#?
The Google Cloud Messaging Client Library has been ported to C#:
https://github.com/Redth/GCMSharp
The same developer has produced a library for sending server-side push notifications to iOS, Android, Windows Phone, and Blackberry:
https://github.com/Redth/PushSharp
If you're not keen on rewriting the whole thing, perhaps IKVM.NET will help? It is a Java virtual machine for .NET and has tools for Java-.NET interoperability as well.
Hope this helps!

How can I write an SNMP agent or SNMP extension agent DLL in C#

I need to write an SNMP agent for my application.
I read the CodeProject article on how to write an SNMP extension agent DLL using win32, but would like to know if it is possible to do it with managed code.
Also, is it possible to write my own SNMP agent in managed code and run it along windows SNMP service?
windows SNMP service is required to run on my server to provide the basic operating system management info.
What C# SNMP library would you recommend? I found a few C# SNMP protocol implementations, but could not find sample code on how to implement an SNMP agent - most samples are only about querying other agents or sending traps.
If you would like to use the SNMP protocol from the .Net Framework, regard this library: #SNMP.
It seems possibly to write your own SNMP server with it. But the standard SNMP Agent archictecture is not based on .Net und so - I assume - you cannot use the mentioned library to extend it. You must write your own and this looks possible with the mentioned library.
Hope this help.
br--mabra
the best library I have used in 8
years of NMS development -
adventnet
you can write your own, but you need to understand ASN. Good luck with that.
SNMP agents do 2 things: query for data, send and receive traps. What else you want
them to do? wash your laundry?! (sorry couldn't resist that! :) ).
What are you trying to do with your SNMP agent?! Does you app need to send traps?! or query for data from a node?!

Categories