I am making a desktop application to connect with an embedded device. I was going to use Windows but due to lack of proper examples and documentation I decided to go with Linux bluez development. Can someone suggest a good resource to go about programming for bluez. I found a MIT documentation but that was about it.
bluez uses D-Bus for communication. Use D-Feet to inspect the org.bluez interface so that you can write against the D-Bus API appropriately.
I've also been looking for info on Bluetooth application development in the Linux environment and came across this pretty good resource http://people.csail.mit.edu/albert/bluez-intro/c404.html.
There is quite good book Bluetooth Essentials for Programmers. It has section for both Windows and Linux bluetooth stack. At least you can look at sources of chapter examples on the book site.
Related
I have a relatively simple Winform application used to communicate with an Arduino via USB to Serial. I would like to make it as universal as possible, using Xamarin Forms.
My problem is that it seems there is no way to do this for both Android and UWP (my priorities, IoS "maybe" in the future). Googling around I found there is a System.IO.Ports.SerialPortdocumented in Xamarin documentation, but I did not find any way to add this library to either Droid and UWP projects.
If I need to, I guess I could write an Interface and have different implementations depending on which project is compiled, but I would love to find some examples.
I would also like to use WiFi as serial instead of USB and let the user choose which way he wants to link to the Arduino. All of this is no big deal in Winform, so I am quite surprised this looks close to be impossible on Xamarin!
Thanks for any help and pointers in the right direction. I would hate to have to abandon this project, but in the same time I cannot spend a lot of time on something which does not seems to be implemented (as of now).
It looks like you need to use an external library for Droid portion.
See: Comunicating with serial USB device over Android and specifically the project at https://github.com/felHR85/UsbSerial. How to add this to Xamarin is something I don't understand, yet.
UWP uses the Device.Serial class, not System.IO.Serial class. So in the end this level of code will be in a platform dependent layer of your code, one for each platform.
You should review the source of the Monkey.Robotics project as it has examples of using USB, Wifi, Bluetooth for commucations with .NET MF micro controllers and non-.Net MF controllers like Arduino.
Monkey.Robotics
The Mobile stack consists of three different parts:
Low-level Bluetooth LE (BLE) API - A cross-platform API (iOS and Android only right now) that supports communicating with BLE devices.
Low-Level Wifi API - A cross-platform API (iOS and Android only right now) that supports connecting to WiFi enabled devices. Note that the WiFi API is still in progress.
Messaging Framework - A high-level cross-platform protocol for messaging peripherals via WiFi or BLE.
Peripheral Libraries - Strongly typed libraries for communicating with various vendor-specific peripherals such as health monitoring devices, smart watches, and the like.
Ref: https://github.com/xamarin/Monkey.Robotics
I want to try to develop system software, drivers for devices. I know that C is low level programming language and it is very popular in this scope.
What compiler is better to use (only C, not C++)? and what libraries are used for system related stuff?
OS Windows.
If you wan to do Windows driver development, then you should look at the WDK - Windows Driver Kit. It should have most of what you need including tools, headers and libraries (and documentation).
For Windows look at the WDK and related MSDN documentation. The WDK includes Microsoft's compiler. http://www.microsoft.com/whdc/devtools/WDK/default.mspx
There is a lot to absorb there. If you're new to programming you should get some experience with C at the user application level and then try out Kernel development once you are comfortable with the language.
i know c and I want to develop applications with GUI for Mac OS. Where do I start?
Learn Objective-C.
Then pick up Cocoa (and all of the Frameworks that go with it)
Buy Apple computer
Install XCode from supplied DVD
Run Software Update from system menu
Run XCode
Select Help menu, select "Developer Documentation"
Click on any of the many things that say things like "Quick Start" or "Getting Started with XCode".
Read
Program
GoTo 7.
Downloading xcode would be your first step. It's the main development environment for mac development and it's free. Then you'd want to get a book on Cocoa w/ Objective-C or Carbon w/ C. Apple is pushing Cocoa more.
The Simple DirectMedia Layer (SDL) library is yet another option. It is a cross-platform development library that can be used to write GUI-based applications for Mac OS in C.
While there is Carbon, it's a framework that's not first-class going forward. If you want to make sure that you can access all of the features of Mac OS X, you'll want to learn Objective-C and use Cocoa.
I believe all Macs nowadays come with a complete set of development tools. They're not pre-loaded on the Mac, but are in the CD-ROM or DVD-ROM package. Alternately, you can go to Apple's site and poke around until you find the development section, and download Xcode. (It'll be the same thing, but possibly a newer version.)
Mac OSX uses a language called Objective-C, which is C extended with OO abilities that are more like Smalltalk than the more usual Simula type (in C++, say). While you don't actually have to use it much, it is how you'll be writing interface code.
Further, it uses the Cocoa framework. There was a framework called Carbon, which was a cleanup and redesign of the pre-Mac OSX Macintosh system facilities, but it's being left behind.
You can find free information on either if you look, or you can buy books on them. Books are probably a better resource to learn from.
You can also try with QT and C++. Try here:
http://qt.nokia.com/products/platform/qt-for-mac
I am interested in porting a C library that depends on glib to Symbian.
After some research, I found that there is a Symbian port of glib. However I can't seem to find much documentation about it. Can anyone point me to the right direction as to whether this can be even done or not? If yes, how.
Forum Nokia has a lot of resources for developing for Nokia/S60 devices.
The glib port is part of the Open C/C++ plug-ins. Download and install them on top of your SDK to get started.
Is there a bluetooth API and tutorial for ANSI C in Linux?
It obviously wouldn't be ANSI C but in Linux there is a great Bluetooth stack that in junction with D-BUS let's you do great things with ease.
You can find tutorials on their wiki.
I hope you enjoy programming Bluetooth on Linux as much as I did.