Raspberry Pi VoIP with usb phone - raspberry-pi

Are there any USB devices that can be connected with a Linux Softphone?

These USB phones are enumerating as USB composite device: sound device and some control device, usually custom HID.
Audio part should work with virtually any softphone (e.g. command line baresip or pjsua). One I have (EX-03) has not the best sound quality as it supports only 8kHz sampling, but in general they should be fine for telephone calls.
Control part (receiving events from keybord, using ring speaker or display if present) may be tricky to handle as it may be impossible to find any documentation. If you are lucky you may find other software (e.g. skype control software included on CD) that works with this particular USB phone and then use USB sniffer to analyze packets / protocol.

Related

How to make Raspberry Pi to be a VoIP ATA Device

I want to make a VoIP ATA (Analog Telephone Adapter) Device using Raspberry Pi, furthermore, I also want to add FXS ports to the Raspberry Pi. Kindly, tell me whether it is possible or not. If Yes, then how?
Here is the
Reference Link
This is probably possible, but not with the Pi alone.
You will need to design and build some external circuitry to convert between telephone line audio (which apparently runs at 48 volts) and audio signals which the Pi can produce. Also it looks like the Pi has no audio input, so you might need to either add a USB audio device or use an analog to digital converter that the Pi has to read the audio signal coming in from the phone line, if it can be polled fast enough.
You might have better luck with a board that has a real microphone jack on it already, instead of the Pi.
Then on the software side you need to attach the audio out, whatever you are using to get audio in, and any circuitry you need to open/close the circuit or send special ring voltages to your VoIP software of choice. Working out how to write that driver code is going to depend heavily on what physical circuit you actually build and what VoIP software you want to have talk to it.
That link above has a design for a line-level audio to phone audio conversion circuit which may help you get started. You could also take the circuitry part of the project over to the Electrical Engineering StackExchange site.

Named-pipe/ FIFO on USB Mass Storage Gadget to Stream Audio for Car, Docks etc.

Many devices (cars, TVs, iPod Docks, AVR receivers etc) have the facility to access class compliant USB Mass Storage Devices and play wav files etc. stored upon them.
I understand I can use a small linux system with appropriate bi-mode USB host/ receiver ports (e.g. a Beagleboard black) to emulate a FAT32 mass storage device (a linux 'gadget') that can be plugged into a car and used as if it were a dumb memory stick - 'g_mass_storage'
http://www.linux-usb.org/gadget/file_storage.html
For static files this works fine. However, I would like to have the beagle board run a bluetooth receiver, decode the stream into PCM and then pipe this into a dummy.wav file that could be read (indefinitely) by the car (ipod Dock etc.)
E.g.
[Android or iPhone] --> [bluetooth a2dp] --> [beagleboard/ small linux system] --> [PCM audio]* --> [ g_mass_storage].'dummy.wav' --> [car's USB host]
The steps up to the * are trivial, but I can't work-out how to pipe data into a dummy.wav file as FAT32 doesn't support pipes and yet this is typically the only format supported by cars etc.
It seems something like this is at least conceptually possible:
http://www.dension.com/products/dbu
and 'cubund' on indigogo seems to be following the same principle (sorry can't paste second link as stackexchange won't let me)
I would have bought one if it had got-off the ground!
Any ideas?
Thanks,
Thomas
P.S. the first part of the chain (i.e. the phone via bluetooth) could be any mechanism and isn't particularly interesting. The challenge is to provide a virtual file that would enable 'streaming' of Google Music/ web radio etc. to devices only capable of reading files from a mass storage device.
It is already on the market for bluetooth. Check on ebay for bluetooth audio receiver. Is a little dongle that you can put in usb port and you may use it like regular usb drive.
Best regards,
Romeo

Is it possible to create a iPhone / iPad usb video input cable

Is it feasibly (by feasible, I mean would apple allow) To create a piece of hardware that would allow the USB cable to act as a video input. I have not been able to find anything like this on the market. I know that it's possible to stream video through WIFI locally, but from what I have read it's quite laggy. I also know that in order to create hardware you need a MFi membership, but I'm note even sure if apple would allow this sort of functionality.
Technically, yes it is possible, but in this case for Apple iPhone and iPad is not. USB protocol has a master/slave architecture, for example a Windows PC is the host, while the USB device is the slave. When the USB device is plugged in, the host is informed about the capabilities of the device through the USB descriptor, later the host will request/send abstract USB packets that may be audio, video, files, whatever.
In your case, for iPhone and iPad the host feature is disabled, they may be only clients for other hosts - a PC for instance. It's a marketing decision, because people would be able to buy cheap external storage, instead of more expensive devices or cloud storage. As a consequence your video streaming device which would be a client will not work.
There are two workarounds: one would be to crack Apple iPhone, iPad software, so you cannot build a business on top of it. The second one, would be that your USB video cable to be smart enough (through an embedded controller) to act as a host with the iPhone, iPad, and would a second software on the Apple device to talk with your hardware. It's not so easy, but maybe it worth the effort, who knows...
I know it is the old thread but my answer can be usefull for someone to make further investigation...eventually to provide some schematic, etc. Definitely IT IS POSSIBLE and I have already tried it. The DJI Lightbridge device used mainly for the UAV cameras and video transmission has an USB port and their own aplication for Android/iOS (iPhone) that can transmit the video and to view/record pictures from camera on tablets or phones. The phone acts as FPV monitor in that case. I have used it with the Android tablet and also with the iPhone 5s and it works great!

Is it possible to make a (non jailbroken) iPhone emit i2c commands?

I want to control a string of LEDs directly from my iPhone. The LED controller chips talk the i2c serial protocol.
Can I do this with Apple-supported APIs on a non-jailbroken iPhone? Which frameworks do I need to use?
Yes, but you will need an external hardware to do that. iOS does not give you access directly to I2C in the docking connector.
KissBos has a OEM board to do that, with a special firmware. You can connect to their board via WiFi, using a TCP based protocol, or via a RTP-MIDI based protocol (RTP-MIDI is implemented in iOS, you don't have to deal with the protocol details, it's just a MIDI port for your application).
If you want to go through the dock connector, you will need their USB interface (it will transform the USB into RTP-MIDI, which goes in the OEM board)
I'm quite sure that you can't do that. Apple is very strict about what you are allowed to and not. I spent days trying to find a way to get access to the iphone's bluetooth layer and ended up with my head against the wall (only a limited game api is public, else you have to go with the Made For Iphone program). However, you are able to do some stuff using the usb cable, but I guess that the possibilities are limited with that too.

Sockets (or Other Communication) Over USB with iOS Device

I am having trouble with my Google Fu today and I can't seem to find anything about this. How can I use TCP sockets -- or any other relevant way to send bytes -- to talk between an iOS device and a host via USB instead of Wifi?
Without applying for Apple's MFI Program (and perhaps signing NDAs), information on communicating via the dock connector's USB interface isn't available for devices running Apple's stock iOS.
It is possible to use PeerTalk without Apple's MFI Program.
Source: https://stackoverflow.com/a/28715653/710069
Newer answer:
An Ethernet-Lightning connector, such as this one (but other MiFi certified ones are supposedly being developed, or use a chain of dongles involving Apple's Lightning to USB Camera kit + USB Ethernet), will allow connecting an iOS device, via Ethernet (TCP sockets, et.al.), to a small "coat pocket-able" computer, such as a Raspberry Pi 3B+, which supports standard USB ports.
Call the Raspberry Pi, with appropriate software, a USB to Ethernet/TCP converter for iOS.
I am currently using just this mechanism to develop iOS apps supporting various USB SDR radios, such as RTL-SDRs, by streaming rtl_tcp from a Raspberry Pi to an iPad.