I'm looking for a way to stream audio from a phone directly to the pc. I'm not talking about music or something but every sound of the phone (voice, ringing etc). Is this possible over an USB cable and the Serial Port of the PC without using third party tools or libraries? I'm currently developing in C#.
No! Do not connect your phone line to the microphone port. The high voltage on the line (60-120V when ringing) may damage your PC.
What you need is a PHONE-to-LINE in adaptor (or sometimes PHONE-TO-MIC adapter) found in electronic stores. Here is an example from AMAZON:
http://www.amazon.com/TRX-20-Direct-Connect-Telephone-ADAPTER/dp/B000KL0XA6/ref=sr_1_1?ie=UTF8&qid=1459033666&sr=8-1&keywords=phone+recording+device (I have no ties or experience with this particular one).
Then, your plug it in to your PC's LINE-IN or MIC (see instructions of the device). From this point on you should be able to record the audio from a call using any sound recording application.
Please keep in mind that PHONE recording may be illegal in some states, if the parties involved are not informed.
If your objective is to detect if a telephone number exists, your method may be intrusive, since it will attempt a call.
In any case, a voice modem could be a better choice, assuming you can find one. Windows used to have a voice modem API & Stack, which should enable you to dial a phone number, wait for the answer or no answer, and then, capture the audio from the remote end. Under most conditions it should detect the ring, busy, or number not available.
The open source project Asterisk (asterisk.org) has "heavy duty machinery" to do this job, albeit it requires specialised programming. There is even an answering machine detection: Asterisk Answering machine detection (AMD) always detects receiver as MACHINE
Related
Good day,
As the title says.
Split a serial port device into two virtual COM's but with another app in the middle that controls data flow.
So i have this project and is my first time bumping into something like this. I have two Applications lets name them (Apple and Tomato) that have to use the same physical device, lets call this device COM1.
Now problem is that on Windows you can't have two applications using the same COM Port, so i thought ok lets split COM1 into COM10 and COM11 using a third party app.
Everything worked well until i saw that they tried to read and write information and physical device wen't crazy and could't understand what is going on and same for Apple and Tomato. So i'm stuck.
New idea and here i need some help with info and some code examples, case studies, whatever you guys can help with is appreciated.
Idea is to emulate physical device COM1 and tell Apple that he has a device and Tomato that he has another device, just like above, but only this time i would control the information sent to the real physical device over my emulator.
I'm working on troubleshooting a device that only works once it has been unplugged and plugged back into its USB port on the PC.
The application that talks to the device is written in C#. So I need a programmatic way in C# or perhaps batch files, etc. to reset a USB device.
Thus far I've tried using the devcon.exe tool, but that doesn't seem to do the same job that physically removing and adding it back does.
Is it possible to use Win32_USBController to control a USB device's power through the port somehow? MSDN Link
Perhaps in a similar fashion, I found the CIM_Controller class, which has Reset() function. MSDN Link
The tools for resetting a USB port in the Windows Driver Framework/Kit don't appear to be readily accessible via a library or otherwise without first creating an actual driver unless I'm mistaken.
Thanks
I would recommend that you navigate to the directory and find the device. Right click on it and in the short cut menu click on eject. The application and the OS should handle the device. It is a bad idea to "unplug" a USB device, especially flash drives without ejecting them. You could end up with open file errors.
If the problem is not ejecting the device then the issue is probably with the application. If the application is opening a file on the device and the device has to be unplugged in order to function properly then the application may not be closing the open file properly...
Just saying
You might look at the SO link: How to programmatically unplug & replug an arbitrary USB device?
and read through that...
it sounds to me like your scanner is completing a task then shutting it's post down. it remains plugged into the PC but the PC does not 'see' it. go to the directory and see if it is still in the directory...
unplugging once the device shuts down the port does nothing. replugging reconnects the electronics and the PC becomes aware of the device which completes one more task. then shuts down its port again.
Dr t
This is quite a general question I think but searching online I can't really find that much information. I have an embedded system with a Bluetooth chip that I often use to connect to another embedded device. This connection is very robust and never fails.
However the embedded system can also connect to windows via a virtual serial port. I've written a piece of software to handle the connection using the 32Foot inthehand bluetooth library. It works very consistently on some computers (including my own) but entirely fails or is very flakey on others. One of which is actually an identical system ( same hardware/ same version of windows)
Is there anything I should specifically be looking at in my software to improve reliability accross different computers/ versions of windows when it comes to bluetooth pairing, creation of virtual com ports etc.
Thanks
I write software that runs on Windows and connects to an embedded device via a virtual serial port using the 32Foot library. I've experienced similar issues to you, and from experience the main problems are:
Conflicts between Bluetooth radio on Windows:
Is more than one Bluetooth radio installed/attached? I find that if on a Windows machine there is both an external Bluetooth dongle plugged in, and the internal Bluetooth is switched on, it won't work.
Widcomm/Broadcom and BlueSoleil stacks:
These don't support authentication, and Widcomm/Broadcom don't support setting of a pin. You can check if BluetoothRadio.PrimaryRadio is not null, and if so find out the SoftwareManufacturer of the Bluetooth Radio. If the Manufacturer enum is Bluesoleil, Widcomm or Broadcom then just don't use authentication or SetPin when initializing the BluetoothClient.
Toshiba stack:
This isn't supported at all
Is a supported Bluetooth radio and stack even currently available?:
You can handle a PlatformNotSupportedException which will tell you if there is no currently available supported Bluetooth stack on the machine. This won't let you know if there is more than one radio attached however.
Finally, from experience, internal Bluetooth chips don't always have a good range and interference can really affect the connection. I have had better luck with an external Bluetooth dongle.
I want to write a simple program that detect USB Wifi plugged computer and unplug it. I am finding code or library help me to do that (C# or Delphi). Tell me if you know :)
Or
Code or lib that list all USB devices on computer ?
Thanks !
I can only answer part of the question. You can "eject" USB devices using this API:
CM_Request_Device_Eject (MSDN link)
I'm using it to eject USB thumb drives after I copy stuff onto them in a backup application. I'm pretty sure there are ways of enumerating available USB devices using one of the many CM_XXX routines, but I was only interested in storage devices connected via USB, so I can't comment on WiFi devices.
An other sugestion: Maybe you can solve your problem at an other layer, maybe you can detect the addition of a new network adapter and disable that. Not all USB devices can be ejected, it's probably a driver-related issue. But I guess, if you can eject it from the notification area icon, you can eject it from code.
may have a look at http://sourceforge.net/projects/libusbdotnet/ (never used it by myself)
I'd like to know if it is possible how to do it, because my client asked me if the program I'm developing could also send wallpapers to nearby cellphones(my program will be in a place with many people passing by, so it would be good to have the bluetooth feature).
Thanks!
it can send pictures as files, users then may set them as wallpapers.
Unless the phone and the computer support bluetooth and are connected, you cannot. You can send the files to mobiles over bluetooth. 32feet provides a nice library to perform bluetooh related operations. Try that.
Hope it helps.
To do this you would need to
Make sure each user's device is paired to your bluetooth "sever"
Create the ability to auto connect and send the file.
On your phone's application, receive the image file and set the phone background - this will be different for each type of phone's OS. I would assume you are aiming towards Window Mobile Devices, since you are using c#.
The first step i see as being the difficult step as each phone much "register" the bluetooth of the server to be paired with it.