public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* file-transfer-over-soundcard
@ 2015-05-20 19:50 Spet
  2015-05-20 20:11 ` file-transfer-over-soundcard Warren Young
  0 siblings, 1 reply; 10+ messages in thread
From: Spet @ 2015-05-20 19:50 UTC (permalink / raw)
  To: cygwin

Do it is possible to port this console code to win32 with cygwin?
https://github.com/vlofgren/file-transfer-over-soundcard/


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-20 19:50 file-transfer-over-soundcard Spet
@ 2015-05-20 20:11 ` Warren Young
  2015-05-20 22:14   ` file-transfer-over-soundcard Spet
  2015-05-21  7:05   ` file-transfer-over-soundcard Spet
  0 siblings, 2 replies; 10+ messages in thread
From: Warren Young @ 2015-05-20 20:11 UTC (permalink / raw)
  To: The Cygwin Mailing List

On May 20, 2015, at 12:36 PM, Spet <spora@email.it> wrote:
> 
> Do it is possible to port this console code to win32 with cygwin?
> https://github.com/vlofgren/file-transfer-over-soundcard/

I was able to get its record.c program to compile without complaints by changing the third line from

    #include <linux/soundcard.h>

to

    #include <sys/soundcard.h>

I don’t get any output when recording in my Windows 10 test VM.  Perhaps that would change if I had a real sound source hooked up to it.

Anyway, you’re the one with the itch.  Scratch it. :)
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-20 20:11 ` file-transfer-over-soundcard Warren Young
@ 2015-05-20 22:14   ` Spet
  2015-05-20 22:25     ` file-transfer-over-soundcard Ken Brown
  2015-05-21  7:05   ` file-transfer-over-soundcard Spet
  1 sibling, 1 reply; 10+ messages in thread
From: Spet @ 2015-05-20 22:14 UTC (permalink / raw)
  To: cygwin

-------- Original Message --------
> On May 20, 2015, at 12:36 PM, Spet <spora@email.it> wrote:
>>
>> Do it is possible to port this console code to win32 with cygwin?
>> https://github.com/vlofgren/file-transfer-over-soundcard/
>
> I was able to get its record.c program to compile without complaints by changing the third line from
>
>      #include <linux/soundcard.h>
>
> to
>
>      #include <sys/soundcard.h>
>
> I don’t get any output when recording in my Windows 10 test VM.  Perhaps that would change if I had a real sound source hooked up to it.
>
> Anyway, you’re the one with the itch.  Scratch it. :)
>
"file-transfer-over-soundcard-master" is based on OSS, which is a Linux 
sound interface.
Do CygWin support OSS?


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-20 22:14   ` file-transfer-over-soundcard Spet
@ 2015-05-20 22:25     ` Ken Brown
  2015-05-20 22:38       ` file-transfer-over-soundcard Warren Young
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Brown @ 2015-05-20 22:25 UTC (permalink / raw)
  To: cygwin

On 5/20/2015 5:31 PM, Spet wrote:
> -------- Original Message --------
>> On May 20, 2015, at 12:36 PM, Spet <spora@email.it> wrote:
>>>
>>> Do it is possible to port this console code to win32 with cygwin?
>>> https://github.com/vlofgren/file-transfer-over-soundcard/
>>
>> I was able to get its record.c program to compile without complaints
>> by changing the third line from
>>
>>      #include <linux/soundcard.h>
>>
>> to
>>
>>      #include <sys/soundcard.h>
>>
>> I don’t get any output when recording in my Windows 10 test VM.
>> Perhaps that would change if I had a real sound source hooked up to it.
>>
>> Anyway, you’re the one with the itch.  Scratch it. :)
>>
> "file-transfer-over-soundcard-master" is based on OSS, which is a Linux
> sound interface.
> Do CygWin support OSS?

Yes.  The OSS interface is in /usr/include/sys/soundcard.h.

Ken


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-20 22:25     ` file-transfer-over-soundcard Ken Brown
@ 2015-05-20 22:38       ` Warren Young
  0 siblings, 0 replies; 10+ messages in thread
From: Warren Young @ 2015-05-20 22:38 UTC (permalink / raw)
  To: The Cygwin Mailing List

On May 20, 2015, at 4:14 PM, Ken Brown <kbrown@cornell.edu> wrote:
> 
> On 5/20/2015 5:31 PM, Spet wrote:
>> Do CygWin support OSS?
> 
> Yes.  The OSS interface is in /usr/include/sys/soundcard.h.

…and /dev/dsp exists:  http://goo.gl/dxN4je
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-20 20:11 ` file-transfer-over-soundcard Warren Young
  2015-05-20 22:14   ` file-transfer-over-soundcard Spet
@ 2015-05-21  7:05   ` Spet
  2015-05-21 19:22     ` file-transfer-over-soundcard Warren Young
  1 sibling, 1 reply; 10+ messages in thread
From: Spet @ 2015-05-21  7:05 UTC (permalink / raw)
  To: cygwin

-------- Original Message --------
> On May 20, 2015, at 12:36 PM, Spet <spora@email.it> wrote:
>>
>> Do it is possible to port this console code to win32 with cygwin?
>> https://github.com/vlofgren/file-transfer-over-soundcard/
>
> I was able to get its record.c program to compile without complaints by changing the third line from
>
>      #include <linux/soundcard.h>
>
> to
>
>      #include <sys/soundcard.h>
>
> I don’t get any output when recording in my Windows 10 test VM.  Perhaps that would change if I had a real sound source hooked up to it.
>
> Anyway, you’re the one with the itch.  Scratch it. :)
>
I have compiled. I did not think it was that easy.  Is my first time.
When i execute from dos console:
./generate.exe -b 25 -r 48000 -o out.data /etc/fstab
i obtain:
/etc/fstab: No such file or directory
if is use:
generate.exe -b 25 -r 48000 -o "k:\TEMP\a.txt" c:\cygwin\etc\fstab
It work but not generate sound.
How to use?


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-21  7:05   ` file-transfer-over-soundcard Spet
@ 2015-05-21 19:22     ` Warren Young
  2015-05-22  7:52       ` file-transfer-over-soundcard Spet
  0 siblings, 1 reply; 10+ messages in thread
From: Warren Young @ 2015-05-21 19:22 UTC (permalink / raw)
  To: The Cygwin Mailing List

On May 21, 2015, at 1:03 AM, Spet <spora@email.it> wrote:
> 
> When i execute from dos console:

Why aren’t you using Cygwin Terminal instead?

The Cygwin Terminal has a huge number of features missing from the Windows console, some of which allow it to work better with Cygwin programs.  (UTF-8 support, for example.)

Meanwhile, the DOS console offers zero advantage over the Cygwin Terminal when it comes to running Cygwin executables.

> ./generate.exe -b 25 -r 48000 -o out.data /etc/fstab

You’re trying to send *Cygwin’s* /etc/fstab to another box?  Why?  Typically the contents of that file are so trivial that it’s faster to just transcribe any changes in it when setting up a new box.

Does "cat /etc/fstab" show something from the Cygwin Terminal?

Anyway, it works here.  I get a 25 MiB sound output file for a 531 byte /etc/fstab.

> generate.exe -b 25 -r 48000 -o "k:\TEMP\a.txt" c:\cygwin\etc\fstab

Are you sure you built it with the Cygwin C compiler, and not something else, like the MinGW or Visual Studio compilers?  That’s the only explanation I can think of for why the POSIX path (/etc/fstab) would fail, but a DOS path would succeed.

I have to ask: Why do you even want this software?  It’s a neat hack, but I’m having trouble imagining a situation where you have two computers that each have Internet access in order to fetch Cygwin and this file transfer software, but they have no way to mutually communicate other than via a highly inefficient [*] communication link.

I’ve run into real-world situations where one box doesn’t have Internet access and no way to attach an external storage device, so you’re left with hacks like uudecode and serial cables, but that doesn’t seem to be what’s going on here.



[*] The Nyquist limit for 48 kHz sampling is 24,000 bps, but the article is recommending 25 bps, three orders of magnitude lower.  Even if you could approach the Nyquist limit with better encoding, you’re still going to be transferring slower than a good RS-232 serial link.
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-21 19:22     ` file-transfer-over-soundcard Warren Young
@ 2015-05-22  7:52       ` Spet
  2015-05-22 13:50         ` file-transfer-over-soundcard Brian Inglis
  2015-05-27 19:31         ` file-transfer-over-soundcard Warren Young
  0 siblings, 2 replies; 10+ messages in thread
From: Spet @ 2015-05-22  7:52 UTC (permalink / raw)
  To: cygwin

-------- Original Message --------
> On May 21, 2015, at 1:03 AM, Spet <spora@email.it> wrote:
>>
>> When i execute from dos console:
>
> Why aren’t you using Cygwin Terminal instead?
This is my first time.
However I have to use it in windows console.

>
> The Cygwin Terminal has a huge number of features missing from the Windows console, some of which allow it to work better with Cygwin programs.  (UTF-8 support, for example.)
>
> Meanwhile, the DOS console offers zero advantage over the Cygwin Terminal when it comes to running Cygwin executables.
Ok
>
>> ./generate.exe -b 25 -r 48000 -o out.data /etc/fstab
>
> You’re trying to send *Cygwin’s* /etc/fstab to another box?
*Cygwin’s* ???
another box???

> Why?  Typically the contents of that file are so trivial that it’s faster to just transcribe any changes in it when setting up a new box.
>
> Does "cat /etc/fstab" show something from the Cygwin Terminal?
Yes, text file
>
> Anyway, it works here.  I get a 25 MiB sound output file for a 531 byte /etc/fstab.
Now here, I understood better how it works.
>
>> generate.exe -b 25 -r 48000 -o "k:\TEMP\a.txt" c:\cygwin\etc\fstab
>
> Are you sure you built it with the Cygwin C compiler, and not something else, like the MinGW or Visual Studio compilers?  That’s the only explanation I can think of for why the POSIX path (/etc/fstab) would fail, but a DOS path would succeed.
I've only done "makefile" in terminal.
>
> I have to ask: Why do you even want this software?
Just a curiosity to transmit files via audio and compile a C source 
Linux in Windows.

Finally, the compilation work.  The sound file is recorded and the audio 
capture works.
But the transmission of the file fails because I get a bit sequence 
completely different from the original.

Ty :)


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-22  7:52       ` file-transfer-over-soundcard Spet
@ 2015-05-22 13:50         ` Brian Inglis
  2015-05-27 19:31         ` file-transfer-over-soundcard Warren Young
  1 sibling, 0 replies; 10+ messages in thread
From: Brian Inglis @ 2015-05-22 13:50 UTC (permalink / raw)
  To: cygwin

Spet <spora <at> email.it> writes:
> -------- Original Message --------
> > On May 21, 2015, at 1:03 AM, Spet <spora <at> email.it> wrote:
> >>
> >> When i execute from dos console:
> >
> > Why aren’t you using Cygwin Terminal instead?
> This is my first time.
> However I have to use it in windows console.
> >
> > The Cygwin Terminal has a huge number of features missing from the
Windows console, some of which allow it
> to work better with Cygwin programs.  (UTF-8 support, for example.)
> >
> > Meanwhile, the DOS console offers zero advantage over the Cygwin
Terminal when it comes to running Cygwin executables.
> Ok
> >
> >> ./generate.exe -b 25 -r 48000 -o out.data /etc/fstab

> > Anyway, it works here.  I get a 25 MiB sound output file for a 531 byte
/etc/fstab.
> Now here, I understood better how it works.
> >
> >> generate.exe -b 25 -r 48000 -o "k:\TEMP\a.txt" c:\cygwin\etc\fstab
> >
> > Are you sure you built it with the Cygwin C compiler, and not something
else, like the MinGW or Visual Studio
> compilers?  That’s the only explanation I can think of for why the POSIX
path (/etc/fstab) would fail,
> but a DOS path would succeed.
> I've only done "makefile" in terminal.
> >
> > I have to ask: Why do you even want this software?
> Just a curiosity to transmit files via audio and compile a C source 
> Linux in Windows.
> 
> Finally, the compilation work.  The sound file is recorded and the audio 
> capture works.
> But the transmission of the file fails because I get a bit sequence 
> completely different from the original.
> 
> Ty :)

The original article
https://github.com/vlofgren/file-transfer-over-soundcard author tried to
reinvent the wheel - badly! 
He tried to build a bit to audio converter - a modem in software, softmodem
aka soundmodem, which does in software what a modem does in hardware,
ignoring almost a century of development since the news wires started using
teleprinters. 
His hardware interface was a microphone taped to headphones rather than a
simple cable connection - no wonder he had noise problems limiting him to 25
bps, the same rate achieved by IBM with cards in 1942 - see
https://en.wikipedia.org/wiki/Modem#History - when lines used one wire, and
switching was relays, electro-mechanical, or plugboards. 

Look instead for something reasonable - search for softmodem or soundmodem
e.g. http://www.araneus.fi/audsl which gets 9.6kB/s duplex over kms of wire
pair. You can also find code to do regular V.92bis dialup modem emulation. 
Regular soundcards should be capable of 4x dialup bandwidth, allowing up to
72kB/s. 
-- 
Take care. Thanks, Brian Inglis

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: file-transfer-over-soundcard
  2015-05-22  7:52       ` file-transfer-over-soundcard Spet
  2015-05-22 13:50         ` file-transfer-over-soundcard Brian Inglis
@ 2015-05-27 19:31         ` Warren Young
  1 sibling, 0 replies; 10+ messages in thread
From: Warren Young @ 2015-05-27 19:31 UTC (permalink / raw)
  To: The Cygwin Mailing List

On May 22, 2015, at 1:18 AM, Spet <spora@email.it> wrote:
> 
>> On May 21, 2015, at 1:03 AM, Spet <spora@email.it> wrote:
>>> 
>>> When i execute from dos console:
>> 
>> Why aren’t you using Cygwin Terminal instead?
> This is my first time.
> However I have to use it in windows console.

Again, *why*?  If you can compile these programs in the Cygwin Terminal, you can run them there, too.

>> You’re trying to send *Cygwin’s* /etc/fstab to another box?
> *Cygwin’s* ???
> another box???

The asterisks (*) are a form of emphasis, created in the days before you could send italics and bold text formatting over email.

“Box” is a slang term for computer.

>>> generate.exe -b 25 -r 48000 -o "k:\TEMP\a.txt" c:\cygwin\etc\fstab
>> 
>> Are you sure you built it with the Cygwin C compiler, and not something else, like the MinGW or Visual Studio compilers?  That’s the only explanation I can think of for why the POSIX path (/etc/fstab) would fail, but a DOS path would succeed.
> I've only done "makefile" in terminal.

That explains nothing.  You can build programs with “make” using any compiler.  It is not Cygwin-specific.

> But the transmission of the file fails because I get a bit sequence completely different from the original.

I can’t help you there.  You’d need to examine the contents of the wave files and compare that to the known behavior of the algorithm.

A waveform editor like Audacity may help, but that’s way off topic here.

Brian is right: this set of programs is far from the best way to achieve your purpose.
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-27 19:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 19:50 file-transfer-over-soundcard Spet
2015-05-20 20:11 ` file-transfer-over-soundcard Warren Young
2015-05-20 22:14   ` file-transfer-over-soundcard Spet
2015-05-20 22:25     ` file-transfer-over-soundcard Ken Brown
2015-05-20 22:38       ` file-transfer-over-soundcard Warren Young
2015-05-21  7:05   ` file-transfer-over-soundcard Spet
2015-05-21 19:22     ` file-transfer-over-soundcard Warren Young
2015-05-22  7:52       ` file-transfer-over-soundcard Spet
2015-05-22 13:50         ` file-transfer-over-soundcard Brian Inglis
2015-05-27 19:31         ` file-transfer-over-soundcard Warren Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).