xamarin-bluetooth-le | Bluetooth LE plugin for Xamarin | iOS library
kandi X-RAY | xamarin-bluetooth-le Summary
kandi X-RAY | xamarin-bluetooth-le Summary
Xamarin and MvvMCross plugin for accessing the bluetooth functionality. The plugin is loosely based on the BLE implementation of Monkey Robotics. Important Note: With the term "vanilla" we mean the non MvvmCross/pure Xamarin version. You can use it without MvvmCross, if you download the vanilla package.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of xamarin-bluetooth-le
xamarin-bluetooth-le Key Features
xamarin-bluetooth-le Examples and Code Snippets
Community Discussions
Trending Discussions on xamarin-bluetooth-le
QUESTION
I'm stuck with this task about reading some data from my BLE Device.
I have a HM-19 DSD Tech Bluetooth LE module on my target machine, and I want communicate with it with my smartphone.
I'm using Xamarin with Plugin.BLE to try to achieve this.
There is my BluetoothPage.xaml.cs
code
ANSWER
Answered 2021-Oct-27 at 10:03BLE communication can be a pain particularly with Xamarin.
In any case asynchronous calls from your application may return before data has actually been sent to your end device. This is due to several factors:
- Operating system BLE driver behaviour - Any call that you make in your application code is handled by the operating system drivers. These may return before any data is actually handled by the BLE hardware.
- BLE transport layer delays - BLE transmission of data is not instant. The data connection between two devices actually occurs within discrete time slots, between which the BLE transceiver is turned off to save power.
- End device response time.
Most implementations of two way communication between devices using BLE use a minimum of two characteristics, one for data being sent and the other for data being received by a device e.g. device 1 receives data on the characteristic that device 2 sends on and vice versa. This avoids the possibility of any collision of data being sent by both parties.
You could try placing a delay in your code prior to polling for characteristic data and see if that helps, but its not an optimal solution.
I see that you are using your characteristic "anonymously", rather than using its uuid to select it. If the Bluetooth service supports more than one characteristic then you will need to use the uuid to ensure that you are using the correct one. The list of characteristics, much like the list of services and devices may not be returned in the same order whenever you request them.
You have the option of polling characteristics by reading them on a timed basis or setting up handlers for characteristic notification/indication events if the characteristic supports it and your BLE device uses that mechanism to show that data is ready.
QUESTION
I have been fighting a bug for a few days now. I have been looking everywhere on a solution to this. I am at my end on what I can do.
Basically, my iOS app is crashing on startup. I am getting a SIGABT fault code with an error: FIXME: ftnptr_arg page trampolines
. I will attach a copy of the crash report below. I found some posts that are a little similar to my issue on this site:
Got a SIGABRT while executing native code xamarin.ios
SIGABRT error after last Xamarin.iOS update
Xamarin IOS app crashes with exception: EXC_BAD_ACCESS (SIGABRT)
and on GitHub: https://github.com/mono/mono/issues/9871
I have tried these solutions and they do not work for me. I would also like to add that I am using the Bluetooth on the device. I did add the correct permissions in the Info.plist file. The Bluetooth library that I am using is Plugin.BLE: https://github.com/xabre/xamarin-bluetooth-le
Anyways, the crash is happening on a page that does not access the bluetooth device. It is happening on a log in page (which is the first page that is displayed to the user). I do not think that the issue is related to the bluetooth. Like I said previously, I am pretty much at the end of what I can do. Not sure what is going on. Has anyone else out there ran into the issue?
Additional Note:
I would like to also add that I am able to debug the initialization of the form and step through the code without it crashing. I only have 3 functions. One for initialization, another for when the form appears, and a third for when a button is pressed. I can step through the code on the first 2 functions. After the program executes these two, the app crashes. I know that it is not an issue with my code because the same code runs fine on Android.
Also, I would create a minimalist code to post, however, the app includes a number of pictures and graphics that I think would be too large to post here. And I do not think that the issue is related to the code that I wrote. As said above, the code runs fine on Android.
Crash debug report:
...ANSWER
Answered 2020-Apr-16 at 15:45OK so for now the answer that I used to solve this was that I changed iPhones. I was running on a iPhone 5C. Now doing an iPhone SE (Not the 2020 model).
For now, this will be the answer. However, I will leave the question open as I would like to know why the code did not execute on the iPhone 5C.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install xamarin-bluetooth-le
Open a console, change to the folder "xamarin-bluetooth-le/.build" and run cake.
Build Open a console, change to the folder "xamarin-bluetooth-le/.build" and run cake.
pack the nuget nuget pack Plugin.BLE.nuspec nuget pack MvvmCross.Plugin.BLE.nuspec
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page