Project Frankenskype Update
All concepts have been proven or rejected at this point, with the main telecom trunk of the system a complete success. I’m basically limited by using almost every component in the system as something for which it was not designed.
SMS retrieval from my Nokia 6300 is not supported by Gammu, which is the only reasonable means of doing such a thing via command line or Python. Maybe if I stole Kristin’s smartphone it would work, but for that hunk of standard-issue junk it just can’t happen.
Dialing out via AT commands (using Gammu) is supported, which is super, as that may be the only way to establish a link on the cell side of the system automatically (besides a call-in from the remote side, but that has its own problems as we will see).
A diagram (BT = Bluetooth):
Skype <===> Computer <==BT==> Nokia 6300
||
Remote Cell
This is pretty simple, but establishing four directions of input via the Nokia 6300 (at least going the right directions) is no simple task.
Remote Mic
||
BT Speaker ======6300====== BT Mic
||
Remote Speaker
The Bluetooth-y way to solve this four-way intersection from Hell is a relationship between two “roles” called Headset and Gateway. A cell phone serves as a gateway when it connects to a standard Bluetooth headset. This is the conventional four-way communication pattern (where BT Speaker and BT Mic above are the speaker and mic on the headset).
Normally, when you use Bluetooth audio on a computer, you’re pairing a headset with a computer. In that case, the computer becomes the gateway. Instead of a cell radio on the other side, it’s Skype or Sound Recorder or Audacity or somesuch.
But I need to keep the gateway as the cell phone to use its cell radio, so the computer actually has to become the headset. The Wicomm Bluetooth stack (which most built-ins in laptops seem to have) implements this role for the computer, so the phone looks for “audio enhancements” as usual and finds the computer, which is emulating a headset.
A computer is no dumb headset, though, even when pretending to be one. The sound card continues to do crazy things that I must exploit to get the headset to act as a fake gateway of its own, by forwarding and receiving the proper audio to and from Skype.
The first thing to take care of is to reconfigure what the sound card sees as its actual input. Normally, this would be the computer microphone, but it can’t be in this case. The “input” to the sound card will be sent to the headset, which in turn sends to the remote cell, which in turn runs it through its speakers as the other talker’s voice.
This needs to be the audio output from Skype (since that is the foreign talker in this case), so we have to switch from “Microphone” input to “Stereo Mix” input. Your “advanced” controls in the standard Volume applet in Windows likely has this option on the input side of the card. “Stereo Mix” means “Whatever should come through my speakers should also be treated as microphone input,” which is exactly what I need.
The above is the magic “aha!” moment of the project.
Getting audio to Skype actually is the easy part, because the Bluetooth headset role is essentially forwarding the remote cell caller’s talking through the sound card input. Skype easily recognizes this as a microphone and sends it right out to the Skype side of the system.
Now for the stuff that doesn’t work: I can’t make these audio setting changes automatically, let alone the Bluetooth connections, so these have to be quickly set up when the system is started. Not so bad.
Like I said, I can’t receive SMS. That sucks, because I was going to just text from the cell phone who I wanted to call and all this would kick off. I’m going to implement this via e-mail (which my work phone has), but nothing would be better than SMS if it worked.
So, on the process side, here’s what happens:
Remote cell sends an e-mail to a special e-mail box.
Python poller on computer checks e-mail once a minute.
When an e-mail is received from the box, read the message body to find out who to call on Skype (shortcuts will be possible).
Use the AT dialing capability of Gammu (via Python or command line) to call the remote phone (the one that e-mailed the request). Just having just one phone allowed to do this simplifies the picture, as you always know the number to dial.
After pausing for a moment for the remote to pick up the phone, initiate the Skype call via command line. At this point, all lines are singing and the call can proceed!
I need to buy a prepaid SIM for the Nokia, but otherwise this thing is ready to go.