I'm trying to write a crossplatform Bluetooth LE - Application using xabre Plugin.BLE (or as an alternative aritchie Plugin.BluetoothLE) on Xamarin.Forms. The app is supposed to detect all bluetooth devices in my surrounding that run my app. Therefore, the app needs to contain two functions:
1) Broadcasting a custom UUID
2) Detect all bluetooth devices near me that broadcast the custom UUID of my Application.
I've searched for hours for a suitable example but haven't found one. Is it possible at all to do it with the given plugin? If not, would it be possible with aritchie's Plugin.BluetoothLE (if so, how would I do it in that case?)
I hope this will help others with the same problem, too, since it seems like there isn't a concrete "how-to" for this problem.
Related
I want to expose multiple BLE services from one device using Qt (on linux), but don't know how to do it if it's even possible.
In my specific case I want my device to be both a heart rate service (HRS) and a cycling power service (CPS).
My testing code is very similar to the heart rate server example from Qt's documentation, http://doc.qt.io/qt-5/qtbluetooth-heartrate-server-main-cpp.html, and I've tried the following two approaches:
Using two QLowEnergyControllers from one application
Using one QLowEnergyController, but adding two different services using bleController->addService().
However it doesn't seems like either one is working properly, or it is just the apps I use for testing that doesn't really handles this properly. I currently use my iPhone 6s with TrainerRoad for testing, and if I just expose one of the services it works well.
Can this be done, and if so, what is the correct way?
I retried this a while back and could successfully provide multiple services using one device. The correct way is to use option 2, so one QLowEnergyController and then add multiple services.
Unfortunately I didn't keep the code from my first attempt, so I can't provide a good answer of what I did wrong. But it works "as expected", no special stuff is needed.
I've nearly finished my lambda service for my smart home skill, and everything works great. The Echo is receiving my confirmations and correctly relaying their information. I'm now trying to build in error handling.
From the SHS API reference, there are a bunch of error messages listed that correspond to different circumstances. Are these errors supposed to change what Alexa says? Regardless of which one, if any, that I use Alexa just responds that the command doesn't work on that device. Right now I'm literally just using callback(err) and return the copy and pasted object from the API reference and still Alexa responds with the generic error.
It's easy to put in a bunch of constants to define error returns. It's harder to wire all of that into a firmware patch of a hardware device. Also, they only release an update to the SDK a few times a year. While they patch the hardware every couple of weeks.
Given that, I suspect that they put those error returns into the SDK to meet with a ship date with the SDK. More as placeholders than specific functionality. Over time, and if there is increased adoption of home skills, they will roll out updates to the hardware device that will take advantage of those returns.
My advice would be to use them. But not to expect there to be a difference right now. And don't mention differences in your documentation. If there is another place you can surface diagnostic information, you might want to do that so your customers can fix their problems.
what's the proper way to capture biometric information (pressure, speed...) by signing with a stylus on a canvas developed in a JSP web Page
Alright, since no one else has attempted to answer this question, I shall elaborate on my comment and opefully it will serve as an answer to others as well.
First, Java Server Pages (JSP) is a server-side language. It is meant to run on the web-server and not on the user's browser. The same goes for other server-side languages like PHP and ASP.
So a server-side language is not able to directly interact with devices (keyboard, scanners, cameras, etc). Only when the data is submitted by the browser or client program, the server receives it for processing.
For a device to receive input, there are two key pieces of software needed.
The device driver: which must be installed on the user's machine
The application program to capture inputs and do any processing.
If either one is missing, the device cannot function. And then there's another issues. Depending on the device, there's various feedback from the driver/API that should go back to the application that reads it. For example, if a fingerprint scan was not very successful for some reason, the scanner should tell this to the user. So again, there's the need for interactivity between the device and the user's application.
Thus, using any server-side language is out of the question for such applicatoins.
Now, in order to make this possible, you may use a client-side program. Here are some options.
A native application in VB, C/C++, Pascal or other language. If this is an option, the user must install this application on their computer.
A browser-based program. This can be a program created using JAVA (not Javascript or JSP), or ActiveX component. ActiveX is largely OS/browser dependent. And the TRUTH is that even Java is not truly platform independent when it comes to different operating systems. There are some technical differences that you'll need to look into. But for the most part of interactivity and high-level operations, yes, Java is more platform-independent than the others. But on a personal note, Java is my worst language. I try not to use it anywhere anymore. That's a different story.
In both options above, every client machine must have their own proprietory drivers and often some sort of API for browser integration.
A year or so ago, I had to program a Bio-Mini fingerprint scanner using VB. It was all sweet in the beginning. Then due to the restrictions of networkability and concurrent usage, the drivers/SDK could not take the load and things were going wrong. By the way, the drivers/SDK were meant for MS-Access. Knowing that the DB was the problem, I started to port this to MySQL. And it was a severe climb from there. I had to do a near-rewrite of the SDK for capturing and comparing data using arrays in VB. And to make things worst, the device was changed and things went wrong again. But do note that the new device was from the same manufacturer.
So keep in mind that even a simple change like that can cause a problem.
I am making a tangible controller for Spotify (like the one from Jordi Parra, http://vimeo.com/21387481#at=0) using an Arduino microcontroller.
I have a Processing sketch running which does all the calculations with the data from the Arduino. I want this Processing sketch to be able to control different options in Spotify like: Next, Previous, Play/Pause, Volume Up/Down, Shuffle.
Right now I use an extra Arduino Leonardo which simulates key presses while AutoHotKey listens to those and sends them to Spotify. It does not work very well and I only have limited options.
I would love to get rid of that extra Arduino while getting more control.
I am working on a Windows thing so Apple script won't work (for me).
Is there a possibility to control the Spotify app from Processing? Or is it possible to use the library to create a new Spotify app in Processing?
Many thanks in advance!
Paul
Disclaimer: I work at Spotify
Right now there is no cross-platform way to control the Spotify application. On Linux, Spotify will respond to dbus commands, which means that a bit of hacking could send play/pause/next/previous. I have heard that it is also possible to control Spotify on Mac OSX via applescript, but I'm not 100% certain about this. A quick google search for "control spotify mac os x applescript" produced some interesting results, though I'm not sure how current or relevant any of them are. As for Windows, I'm not sure if/how one would control the application at all.
Otherwise, your best bet would be libspotify, for which you would need to write a Processing library to communicate with it. Based on a bit of quick research, it seems that Processing libraries are written in Java, which means you'd either need to use a wrapper such as jlibspotify or hand-roll your own JNI wrapper for libspotify.
I'm not sure how current jlibspotify is, given that they are wrapping a rather old version of the library. If you do any libspotify hacking it is better done in C/C++ with a minimal JNI wrapper, but all of this may be way more work than you are intending for this project.
Why not utilize Spotify's keyboard integration.
The Arduino Leonardo supports USB HID mode.
So, send the keyboard keys for Next, Previous, Play/Pause, Volume Up/Down, Shuffle.
Most everything has a single bound global key. I believe only shuffle does not. You could create a global hotkey in your OS to bind to the app's shuffle control key.
If you are looking for status feedback on the state of each button, this of course won't help you.
Good luck.
I am planning on creating my own POS system by using pos for .net.
So far i have never created any POS system or used pos for .net. I was trying to find some tutorials but wasn't successfull, does anybody know some good website or book? I am also wondering if there is a way to emulate the pos devices (like barcode scanner....)
Using windows embedded 8 industry
As your base system and the POS .net you will be able to achieve what you are trying to do.
As mentioned by #CResults most barcode readers are plug and play. So unless they need to have com ports mapped you will not have to do anything to them. They scan decode and then send the values like a keyboard
Receipt printers are the issue. You can either use the windows driver to print to the printer (highly buggy) or every receipt printer you can communicate directly too through a Com port. You will need to ask for the SDK from the manufacture. This way you are communicating direct to the printer rather then relying a mediator that could crash or freeze.
But the time you are going to spend building your project there are plenty of already created ones. It would be worth while to use a system that has already been developed on for years. Rather then re-invent the wheel.
Check out Bepoz http://bepoz.com/ They have been around for a while and have a very solid application.
Disclaimer: Employee of Bepoz
I believe the SDK comes with plenty of sample code and documentation.
There's also a community forum:
http://social.msdn.microsoft.com/Forums/en-US/posfordotnet/threads
To answer part of your question most barcode scanners appear to the OS as keyboards, sending their output (the decoded value of the barcode) to your app as a string of characters.
So to emulate all you need do is capture the keyboard.