Bluetooth communications with C# - c#

I want to write 2 programs with C# one work on PC, the other work on a windows mobile phone.
So I want the PC program to send a signal via Bluetooth ( 1 byte maybe) to the windows mobile phone. and the mobile program (which work on background) handles and accepts this byte without the need of pairing.
how to code this?
please I need any kind of help.

My library 32feet.NET should be useful...
Device Discovery can be done with BluetoothClient.DiscoverDevices, and sending data should be done with classes BluetoothClient and BluetoothListener, see the User Guide for more info.

If your phone can use Serial Bluetooth adapters (RFCOMM), you could send it using the serial class.

Related

Is there a way to send data over computers other than UDP and Bluetooth?

I want to make a simple desktop app that receives data from my phone and does certain stuff accordingly. I don't need to send any more than 1 byte. I tried UDP but it requires firewall bypassing which is a spooky popup to click on. I also tried Bluetooth but I couldn't get it to work because most of the documentation is about BLE not Bluetooth Classic. Is there any other way I can communicate with another device from a short distance even if I'm just limited to sending 1 byte? I would like topics to research but code samples are also welcome, preferably in C#.

Send Bar code from android app to C# desktop application via usb cable

Is it Possible that I can send bar code value from android application to my C# desktop application via Usb Cable.
I just want to link my two applications via usb cable .. I have searched a lot but still failed..
You should try to use those libraries:
SharpUSBLib
LibUsbDotNet
They allow to communicate with USB port via C#, and you will be able to read data from USB port in your C# application. Then you need to implement the sending part in your Android application. There is a package android.hardware.usb on Android side which contains functionalities for communicating with USB ports. You can use classes from this package to handle the communication.

How to set an incoming phone call listener in c# application with phone connected to pc via bluetooth?

I am using 32feet.net library to achieve bluetooth connectivity of my c# application to a mobile phone. Up until now i have achieved Discovery, Pairing, and Dialing a phone call. Dialing is being done by using AT command to the phone.
Some useful links about above mentioned activities are
Pair bluetooth devices to a computer with 32feet .NET Bluetooth library
Bluetooth dial with 32feet.net and c#
I am looking for help in receiving incoming phone call through my application.
Now from different forums all i have come to know that we can accept an incoming phone call by using "ATA" command.
https://burakalakusen.wordpress.com/2011/07/27/to-control-your-mobile-phone-by-at-commands-via-bluetooth/
An incoming call will send a "RING" notification to the application, but i dont know how to be able to read the RING notification or make my phone send a RING Notification to my application.
Appreciate your help.

Sending sms using C# over bluetooth

Can I send sms messages to an android device from .net C# application via bluetooth if it is yes then please guide me how to do it?
regards
Gammu/Wammu is one of the most popular libraries there, that support communicationg to lots of different phones over various protocols including Bluetooth.
You can use it to transmit SMS over bluetooth to your phone (depending on the model - see http://wammu.eu/phones/), to send the SMS.
You can also read SMS from your phone using it if required.
libGammu has C library (http://wammu.eu/docs/manual/c/), but I am not sure you can execute C code directly from C#
Hopefully it gives you at least a nod in the right direction.

sending sms through mobile connected with pc

I am trying to develop the application which, any mobile is connected with PC and needs to send SMS through the mobile one by one, software is used only to connect the mobile and type the message.
When the send button is clicked the message should send through mobile not through any modems.
I have tried to search everywhere, but I couldn't find anything.
Can anybody guide me on how to proceed?
Thanks in advance.
If you want to do it on your own without using a sms-library you can open the modem in handset through a serial port and send out hayes at-commands for sms-operation.
Before you program you can try it using a terminal program.
Example
; Send message to "0170 00000" (Ctrl+Z to finish and send the message)
AT+CMGS="017000000"
> This is a SMS Test!!^Z
+CMGS: 3 ; OK, message gone
Note: these at-commands are not supported on every handset. Maybe the handset needs additional configuration through extra at commands (set textmode, set sms-gateway, ...)
Several sms hayes related commands are described in http://www.cellular.co.za/at_etsi.htm .
Yes, absolutely you can send sms through your pc connected with your cell phones. "Nokia PC Suite" is the only software; after installing software in your computer, connect your Nokia handset by usb cable with computer and select pc suite option. After then launch Nokia PC Suite. Now there u go.
What you are trying to do is difficult. It is difficult not because the programming is difficult, but because there are restrictions (security!) from the carrier side and from the mobile manufacturer side.
To be able to send messages from a mobile device connected to a PC, the mobile device must provide access to the internal functions its OS uses to deliver those SMSs. They could be low level modem commands, or a high level API; but in any case it will depend on the device manufacturer SDK.
If you want to type more efficiently, then maybe a mobile device with support for a bluetooth keyboard is a good idea.
I guess that depends strongly on the used mobile phone. I don't think there's a generic solution for all manufacturers. And such feature is probably hardly documented.
However, I'm not sure, if this is worth the effort at all, because e.g. Nokia provides the software "Ovi Suite" (or older PC Suite), which already supports sending SMS via connected phone. I think there are similar programs from other manufacturers.
It is possible to send SMS from a computer via a connected phone, but the phone itself will be the modem (I assume you don't want to connect another device for SMS). You can see this question, this question and (possibly) GSMComm for more info

Categories

Resources