@jtarrio/webrtlsdr 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +69 -0
  3. package/dist/audio/player.d.ts +24 -0
  4. package/dist/audio/player.d.ts.map +1 -0
  5. package/dist/audio/player.js +68 -0
  6. package/dist/audio/player.js.map +1 -0
  7. package/dist/demod/demodulator.d.ts +59 -0
  8. package/dist/demod/demodulator.d.ts.map +1 -0
  9. package/dist/demod/demodulator.js +150 -0
  10. package/dist/demod/demodulator.js.map +1 -0
  11. package/dist/demod/sample-counter.d.ts +18 -0
  12. package/dist/demod/sample-counter.d.ts.map +1 -0
  13. package/dist/demod/sample-counter.js +43 -0
  14. package/dist/demod/sample-counter.js.map +1 -0
  15. package/dist/demod/scheme-am.d.ts +32 -0
  16. package/dist/demod/scheme-am.d.ts.map +1 -0
  17. package/dist/demod/scheme-am.js +75 -0
  18. package/dist/demod/scheme-am.js.map +1 -0
  19. package/dist/demod/scheme-cw.d.ts +22 -0
  20. package/dist/demod/scheme-cw.d.ts.map +1 -0
  21. package/dist/demod/scheme-cw.js +68 -0
  22. package/dist/demod/scheme-cw.js.map +1 -0
  23. package/dist/demod/scheme-nbfm.d.ts +32 -0
  24. package/dist/demod/scheme-nbfm.d.ts.map +1 -0
  25. package/dist/demod/scheme-nbfm.js +76 -0
  26. package/dist/demod/scheme-nbfm.js.map +1 -0
  27. package/dist/demod/scheme-ssb.d.ts +33 -0
  28. package/dist/demod/scheme-ssb.d.ts.map +1 -0
  29. package/dist/demod/scheme-ssb.js +75 -0
  30. package/dist/demod/scheme-ssb.js.map +1 -0
  31. package/dist/demod/scheme-wbfm.d.ts +38 -0
  32. package/dist/demod/scheme-wbfm.d.ts.map +1 -0
  33. package/dist/demod/scheme-wbfm.js +106 -0
  34. package/dist/demod/scheme-wbfm.js.map +1 -0
  35. package/dist/demod/scheme.d.ts +78 -0
  36. package/dist/demod/scheme.d.ts.map +1 -0
  37. package/dist/demod/scheme.js +96 -0
  38. package/dist/demod/scheme.js.map +1 -0
  39. package/dist/demod/spectrum.d.ts +18 -0
  40. package/dist/demod/spectrum.d.ts.map +1 -0
  41. package/dist/demod/spectrum.js +76 -0
  42. package/dist/demod/spectrum.js.map +1 -0
  43. package/dist/dsp/buffers.d.ts +72 -0
  44. package/dist/dsp/buffers.d.ts.map +1 -0
  45. package/dist/dsp/buffers.js +109 -0
  46. package/dist/dsp/buffers.js.map +1 -0
  47. package/dist/dsp/coefficients.d.ts +22 -0
  48. package/dist/dsp/coefficients.d.ts.map +1 -0
  49. package/dist/dsp/coefficients.js +77 -0
  50. package/dist/dsp/coefficients.js.map +1 -0
  51. package/dist/dsp/converters.d.ts +15 -0
  52. package/dist/dsp/converters.d.ts.map +1 -0
  53. package/dist/dsp/converters.js +43 -0
  54. package/dist/dsp/converters.js.map +1 -0
  55. package/dist/dsp/demodulators.d.ts +72 -0
  56. package/dist/dsp/demodulators.d.ts.map +1 -0
  57. package/dist/dsp/demodulators.js +245 -0
  58. package/dist/dsp/demodulators.js.map +1 -0
  59. package/dist/dsp/fft.d.ts +53 -0
  60. package/dist/dsp/fft.d.ts.map +1 -0
  61. package/dist/dsp/fft.js +175 -0
  62. package/dist/dsp/fft.js.map +1 -0
  63. package/dist/dsp/filters.d.ts +91 -0
  64. package/dist/dsp/filters.d.ts.map +1 -0
  65. package/dist/dsp/filters.js +250 -0
  66. package/dist/dsp/filters.js.map +1 -0
  67. package/dist/dsp/power.d.ts +2 -0
  68. package/dist/dsp/power.d.ts.map +1 -0
  69. package/dist/dsp/power.js +10 -0
  70. package/dist/dsp/power.js.map +1 -0
  71. package/dist/dsp/resamplers.d.ts +33 -0
  72. package/dist/dsp/resamplers.d.ts.map +1 -0
  73. package/dist/dsp/resamplers.js +91 -0
  74. package/dist/dsp/resamplers.js.map +1 -0
  75. package/dist/errors.d.ts +19 -0
  76. package/dist/errors.d.ts.map +1 -0
  77. package/dist/errors.js +37 -0
  78. package/dist/errors.js.map +1 -0
  79. package/dist/radio/msgqueue.d.ts +23 -0
  80. package/dist/radio/msgqueue.d.ts.map +1 -0
  81. package/dist/radio/msgqueue.js +52 -0
  82. package/dist/radio/msgqueue.js.map +1 -0
  83. package/dist/radio/radio.d.ts +81 -0
  84. package/dist/radio/radio.d.ts.map +1 -0
  85. package/dist/radio/radio.js +305 -0
  86. package/dist/radio/radio.js.map +1 -0
  87. package/dist/radio/sample_receiver.d.ts +11 -0
  88. package/dist/radio/sample_receiver.d.ts.map +1 -0
  89. package/dist/radio/sample_receiver.js +49 -0
  90. package/dist/radio/sample_receiver.js.map +1 -0
  91. package/dist/rtlsdr/r820t.d.ts +18 -0
  92. package/dist/rtlsdr/r820t.d.ts.map +1 -0
  93. package/dist/rtlsdr/r820t.js +39 -0
  94. package/dist/rtlsdr/r820t.js.map +1 -0
  95. package/dist/rtlsdr/r828d.d.ts +28 -0
  96. package/dist/rtlsdr/r828d.d.ts.map +1 -0
  97. package/dist/rtlsdr/r828d.js +120 -0
  98. package/dist/rtlsdr/r828d.js.map +1 -0
  99. package/dist/rtlsdr/r8xx.d.ts +90 -0
  100. package/dist/rtlsdr/r8xx.d.ts.map +1 -0
  101. package/dist/rtlsdr/r8xx.js +468 -0
  102. package/dist/rtlsdr/r8xx.js.map +1 -0
  103. package/dist/rtlsdr/rtl2832u.d.ts +74 -0
  104. package/dist/rtlsdr/rtl2832u.d.ts.map +1 -0
  105. package/dist/rtlsdr/rtl2832u.js +342 -0
  106. package/dist/rtlsdr/rtl2832u.js.map +1 -0
  107. package/dist/rtlsdr/rtlcom.d.ts +144 -0
  108. package/dist/rtlsdr/rtlcom.d.ts.map +1 -0
  109. package/dist/rtlsdr/rtlcom.js +299 -0
  110. package/dist/rtlsdr/rtlcom.js.map +1 -0
  111. package/dist/rtlsdr/rtldevice.d.ts +53 -0
  112. package/dist/rtlsdr/rtldevice.d.ts.map +1 -0
  113. package/dist/rtlsdr/rtldevice.js +24 -0
  114. package/dist/rtlsdr/rtldevice.js.map +1 -0
  115. package/dist/rtlsdr/tuner.d.ts +20 -0
  116. package/dist/rtlsdr/tuner.d.ts.map +1 -0
  117. package/dist/rtlsdr/tuner.js +15 -0
  118. package/dist/rtlsdr/tuner.js.map +1 -0
  119. package/package.json +20 -0
@@ -0,0 +1,299 @@
1
+ // Copyright 2024 Jacobo Tarrio Barreiro. All rights reserved.
2
+ // Copyright 2013 Google Inc. All rights reserved.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ import { RadioError, RadioErrorType } from "../errors";
16
+ /** Low-level communications with the RTL2832U-base dongle. */
17
+ export class RtlCom {
18
+ constructor(device) {
19
+ this.device = device;
20
+ }
21
+ device;
22
+ /** Set in the control messages' index field for write operations. */
23
+ static WRITE_FLAG = 0x10;
24
+ /** Claims the USB control interface. */
25
+ async claimInterface() {
26
+ try {
27
+ await this.device.claimInterface(0);
28
+ }
29
+ catch (e) {
30
+ throw new RadioError("Could not connect to the RTL-SDR stick. Are you using it in another application?", RadioErrorType.UsbTransferError, { cause: e });
31
+ }
32
+ }
33
+ /** Releases the USB control interface. */
34
+ async releaseInterface() {
35
+ await this.device.releaseInterface(0);
36
+ }
37
+ /** Returns branding information. */
38
+ getBranding() {
39
+ return {
40
+ manufacturer: this.device.manufacturerName,
41
+ model: this.device.productName,
42
+ };
43
+ }
44
+ /**
45
+ * Writes to a USB control register.
46
+ * @param address The register's address.
47
+ * @param value The value to write.
48
+ * @param length The number of bytes this value uses.
49
+ */
50
+ async setUsbReg(address, value, length) {
51
+ await this._setReg(0x100, address, value, length);
52
+ }
53
+ /**
54
+ * Writes to a 8051 system register.
55
+ * @param address The register's address.
56
+ * @param value The value to write.
57
+ */
58
+ async setSysReg(address, value) {
59
+ await this._setReg(0x200, address, value, 1);
60
+ }
61
+ /**
62
+ * Reads from a 8051 system register.
63
+ * @param address The register's address.
64
+ * @returns The value that was read.
65
+ */
66
+ async getSysReg(address) {
67
+ return this._getReg(0x200, address, 1);
68
+ }
69
+ /**
70
+ * Writes a value into a demodulator register.
71
+ * @param page The register page number.
72
+ * @param addr The register's address.
73
+ * @param value The value to write.
74
+ * @param len The width in bytes of this value.
75
+ * @returns a promise that resolves the value that was read back from the register.
76
+ */
77
+ async setDemodReg(page, addr, value, len) {
78
+ await this._setRegBuffer(page, (addr << 8) | 0x20, this._numberToBuffer(value, len, true));
79
+ return this._getReg(0x0a, 0x0120, 1);
80
+ }
81
+ /**
82
+ * Reads a value from an I2C register.
83
+ * @param addr The device's address.
84
+ * @param reg The register number.
85
+ * @returns a promise that resolves to the value in the register.
86
+ */
87
+ async getI2CReg(addr, reg) {
88
+ await this._setRegBuffer(0x600, addr, new Uint8Array([reg]).buffer);
89
+ return this._getReg(0x600, addr, 1);
90
+ }
91
+ /**
92
+ * Writes a value to an I2C register.
93
+ * @param addr The device's address.
94
+ * @param reg The register number.
95
+ * @param value The value to write.
96
+ */
97
+ async setI2CReg(addr, reg, value) {
98
+ await this._setRegBuffer(0x600, addr, new Uint8Array([reg, value]).buffer);
99
+ }
100
+ /**
101
+ * Reads a buffer from an I2C register.
102
+ * @param addr The device's address.
103
+ * @param reg The register number.
104
+ * @param len The number of bytes to read.
105
+ * @returns a promise that resolves to the read buffer.
106
+ */
107
+ async getI2CRegBuffer(addr, reg, len) {
108
+ await this._setRegBuffer(0x600, addr, new Uint8Array([reg]).buffer);
109
+ return this._getRegBuffer(0x600, addr, len);
110
+ }
111
+ async setGpioOutput(gpio) {
112
+ gpio = 1 << gpio;
113
+ let r = await this.getSysReg(0x3004);
114
+ await this.setSysReg(0x3004, r & ~gpio);
115
+ r = await this.getSysReg(0x3003);
116
+ await this.setSysReg(0x3003, r | gpio);
117
+ }
118
+ async setGpioBit(gpio, val) {
119
+ gpio = 1 << gpio;
120
+ let r = await this.getSysReg(0x3001);
121
+ r = val ? r | gpio : r & ~gpio;
122
+ await this.setSysReg(0x3001, r);
123
+ }
124
+ /**
125
+ * Does a bulk transfer from the device.
126
+ * @param length The number of bytes to read.
127
+ * @returns a promise that resolves to the data that was read.
128
+ */
129
+ async getSamples(length) {
130
+ let result = await this.device.transferIn(1, length);
131
+ if (result.status == "ok")
132
+ return result.data.buffer;
133
+ if (result.status == "stall") {
134
+ await this.device.clearHalt("in", 1);
135
+ return new ArrayBuffer(length);
136
+ }
137
+ throw new RadioError(`USB bulk read failed length 0x${length.toString(16)} status=${result.status}`, RadioErrorType.UsbTransferError);
138
+ }
139
+ /**
140
+ * Opens the I2C repeater.
141
+ * To avoid interference, the tuner is usually disconnected from the I2C bus.
142
+ * With the repeater open, the tuner can receive I2C messages.
143
+ */
144
+ async openI2C() {
145
+ await this.setDemodReg(1, 1, 0x18, 1);
146
+ }
147
+ /** Closes the I2C repeater. */
148
+ async closeI2C() {
149
+ await this.setDemodReg(1, 1, 0x10, 1);
150
+ }
151
+ /** Closes the connection. */
152
+ async close() {
153
+ await this.device.close();
154
+ }
155
+ /**
156
+ * Writes a value into a dongle's register.
157
+ * @param block The register's block number.
158
+ * @param reg The register number.
159
+ * @param value The value to write.
160
+ * @param length The width in bytes of this value.
161
+ */
162
+ async _setReg(block, reg, value, length) {
163
+ try {
164
+ await this._writeCtrlMsg(reg, block | RtlCom.WRITE_FLAG, this._numberToBuffer(value, length));
165
+ }
166
+ catch (e) {
167
+ throw new RadioError(`setReg failed block=0x${block.toString(16)} reg=${reg.toString(16)} value=${value.toString(16)} length=${length}`, RadioErrorType.UsbTransferError, { cause: e });
168
+ }
169
+ }
170
+ /**
171
+ * Reads a value from a dongle's register.
172
+ * @param block The register's block number.
173
+ * @param reg The register number.
174
+ * @param length The width in bytes of the value to read.
175
+ * @returns a promise that resolves to the decoded value.
176
+ */
177
+ async _getReg(block, reg, length) {
178
+ try {
179
+ return this._bufferToNumber(await this._readCtrlMsg(reg, block, length));
180
+ }
181
+ catch (e) {
182
+ throw new RadioError(`getReg failed block=0x${block.toString(16)} reg=${reg.toString(16)} length=${length}`, RadioErrorType.UsbTransferError, { cause: e });
183
+ }
184
+ }
185
+ /**
186
+ * Writes a buffer into a dongle's register.
187
+ * @param block The register's block number.
188
+ * @param reg The register number.
189
+ * @param buffer The buffer to write.
190
+ */
191
+ async _setRegBuffer(block, reg, buffer) {
192
+ try {
193
+ await this._writeCtrlMsg(reg, block | RtlCom.WRITE_FLAG, buffer);
194
+ }
195
+ catch (e) {
196
+ throw new RadioError(`setRegBuffer failed block=0x${block.toString(16)} reg=${reg.toString(16)}`, RadioErrorType.UsbTransferError, { cause: e });
197
+ }
198
+ }
199
+ /**
200
+ * Reads a buffer from a dongle's register.
201
+ * @param block The register's block number.
202
+ * @param reg The register number.
203
+ * @param length The length in bytes of the buffer to read.
204
+ * @returns a Promise that resolves to the read buffer.
205
+ */
206
+ async _getRegBuffer(block, reg, length) {
207
+ try {
208
+ return this._readCtrlMsg(reg, block, length);
209
+ }
210
+ catch (e) {
211
+ throw new RadioError(`getRegBuffer failed block=0x${block.toString(16)} reg=${reg.toString(16)} length=${length}`, RadioErrorType.UsbTransferError, { cause: e });
212
+ }
213
+ }
214
+ /**
215
+ * Decodes a buffer as a little-endian number.
216
+ * @param buffer The buffer to decode.
217
+ * @returns The decoded number.
218
+ */
219
+ _bufferToNumber(buffer) {
220
+ let len = buffer.byteLength;
221
+ let dv = new DataView(buffer);
222
+ if (len == 0) {
223
+ return 0;
224
+ }
225
+ else if (len == 1) {
226
+ return dv.getUint8(0);
227
+ }
228
+ else if (len == 2) {
229
+ return dv.getUint16(0, true);
230
+ }
231
+ else if (len == 4) {
232
+ return dv.getUint32(0, true);
233
+ }
234
+ throw new RadioError(`Cannot parse ${len}-byte number`, RadioErrorType.UsbTransferError);
235
+ }
236
+ /**
237
+ * Encodes a number into a buffer.
238
+ * @param value The number to encode.
239
+ * @param len The number of bytes to encode into.
240
+ * @param opt_bigEndian Whether to use a big-endian encoding.
241
+ */
242
+ _numberToBuffer(value, len, opt_bigEndian) {
243
+ let buffer = new ArrayBuffer(len);
244
+ let dv = new DataView(buffer);
245
+ if (len == 1) {
246
+ dv.setUint8(0, value);
247
+ }
248
+ else if (len == 2) {
249
+ dv.setUint16(0, value, !opt_bigEndian);
250
+ }
251
+ else if (len == 4) {
252
+ dv.setUint32(0, value, !opt_bigEndian);
253
+ }
254
+ else {
255
+ throw new RadioError(`Cannot write ${len}-byte number`, RadioErrorType.UsbTransferError);
256
+ }
257
+ return buffer;
258
+ }
259
+ /**
260
+ * Sends a USB control message to read from the device.
261
+ * @param value The value field of the control message.
262
+ * @param index The index field of the control message.
263
+ * @param length The number of bytes to read.
264
+ * @returns a promise that resolves to the read buffer.
265
+ */
266
+ async _readCtrlMsg(value, index, length) {
267
+ let ti = {
268
+ requestType: "vendor",
269
+ recipient: "device",
270
+ request: 0,
271
+ value: value,
272
+ index: index,
273
+ };
274
+ let result = await this.device.controlTransferIn(ti, Math.max(8, length));
275
+ if (result.status == "ok")
276
+ return result.data.buffer.slice(0, length);
277
+ throw new RadioError(`USB read failed value=0x${value.toString(16)} index=0x${index.toString(16)} status=${result.status}`, RadioErrorType.UsbTransferError);
278
+ }
279
+ /**
280
+ * Sends a USB control message to write to the device.
281
+ * @param value The value field of the control message.
282
+ * @param index The index field of the control message.
283
+ * @param buffer The buffer to write to the device.
284
+ */
285
+ async _writeCtrlMsg(value, index, buffer) {
286
+ let ti = {
287
+ requestType: "vendor",
288
+ recipient: "device",
289
+ request: 0,
290
+ value: value,
291
+ index: index,
292
+ };
293
+ let result = await this.device.controlTransferOut(ti, buffer);
294
+ if (result.status == "ok")
295
+ return;
296
+ throw new RadioError(`USB write failed value=0x${value.toString(16)} index=0x${index.toString(16)} status=${result.status}`, RadioErrorType.UsbTransferError);
297
+ }
298
+ }
299
+ //# sourceMappingURL=rtlcom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtlcom.js","sourceRoot":"","sources":["../../src/rtlsdr/rtlcom.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,kDAAkD;AAClD,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEvD,8DAA8D;AAC9D,MAAM,OAAO,MAAM;IACjB,YAAY,MAAiB;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEO,MAAM,CAAY;IAE1B,qEAAqE;IAC7D,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC;IAEjC,wCAAwC;IACxC,KAAK,CAAC,cAAc;QAClB,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,UAAU,CAClB,kFAAkF,EAClF,cAAc,CAAC,gBAAgB,EAC/B,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAED,0CAA0C;IAC1C,KAAK,CAAC,gBAAgB;QACpB,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IAED,oCAAoC;IACpC,WAAW;QACT,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB;YAC1C,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW;SAC/B,CAAC;IACJ,CAAC;IAED;;;;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OAKG;IACK,KAAK,CAAC,aAAa,CACzB,KAAa,EACb,KAAa,EACb,MAAmB;QAEnB,IAAI,EAAE,GAAiC;YACrC,WAAW,EAAE,QAAQ;YACrB,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;SACb,CAAC;QACF,IAAI,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC9D,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI;YAAE,OAAO;QAClC,MAAM,IAAI,UAAU,CAClB,4BAA4B,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,MAAM,CAAC,MAAM,EAAE,EACtG,cAAc,CAAC,gBAAgB,CAChC,CAAC;IACJ,CAAC"}
@@ -0,0 +1,53 @@
1
+ /** A block of samples returned by RtlDevice.readSamples() */
2
+ export type SampleBlock = {
3
+ /** The frequency the radio was tuned at when these samples were captured. */
4
+ frequency: number;
5
+ /** The samples as an sequence of (U8, U8) pairs, where the first U8 is the I value and the second is the Q value. */
6
+ data: ArrayBuffer;
7
+ /** Whether the radio was in direct sampling mode. */
8
+ directSampling: boolean;
9
+ };
10
+ /** Interface for an RTL-type device. */
11
+ export interface RtlDevice {
12
+ /** Sets the device's sample rate. */
13
+ setSampleRate(rate: number): Promise<number>;
14
+ /** Sets the frequency correction factor, in parts-per-million. */
15
+ setFrequencyCorrection(ppm: number): Promise<void>;
16
+ /** Returns the currently set frequency correction factor. */
17
+ getFrequencyCorrection(): number;
18
+ /** Sets the tuner's gain, or null for automatic gain control. */
19
+ setGain(gain: number | null): Promise<void>;
20
+ /** Returns the currently set tuner's gain. */
21
+ getGain(): number | null;
22
+ /** Sets the center frequency the device will be listening on. */
23
+ setCenterFrequency(freq: number): Promise<number>;
24
+ /** Sets the direct sampling method. */
25
+ setDirectSamplingMethod(method: DirectSampling): Promise<void>;
26
+ /** Returns the currently set direct sampling method. */
27
+ getDirectSamplingMethod(): DirectSampling;
28
+ /** Enables or disables the bias T, if equipped. */
29
+ enableBiasTee(enable: boolean): Promise<void>;
30
+ /** Returns whether the bias T is enabled. */
31
+ isBiasTeeEnabled(): boolean;
32
+ /** Resets the sample buffers. You must do this before you start reading samples. */
33
+ resetBuffer(): Promise<void>;
34
+ /** Reads the given number of samples. */
35
+ readSamples(length: number): Promise<SampleBlock>;
36
+ /** Shuts down the device. */
37
+ close(): Promise<void>;
38
+ }
39
+ /** Direct sampling modes. */
40
+ export declare enum DirectSampling {
41
+ /** No direct sampling. */
42
+ Off = 0,
43
+ /** I channel. */
44
+ I = 1,
45
+ /** Q channel. */
46
+ Q = 2
47
+ }
48
+ /** Interface for classes that return RtlDevice instances. */
49
+ export interface RtlDeviceProvider {
50
+ /** Returns an open device. */
51
+ get(): Promise<RtlDevice>;
52
+ }
53
+ //# sourceMappingURL=rtldevice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtldevice.d.ts","sourceRoot":"","sources":["../../src/rtlsdr/rtldevice.ts"],"names":[],"mappings":"AAcA,6DAA6D;AAC7D,MAAM,MAAM,WAAW,GAAG;IACxB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,qHAAqH;IACrH,IAAI,EAAE,WAAW,CAAC;IAClB,qDAAqD;IACrD,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,wCAAwC;AACxC,MAAM,WAAW,SAAS;IACxB,qCAAqC;IACrC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,kEAAkE;IAClE,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,6DAA6D;IAC7D,sBAAsB,IAAI,MAAM,CAAC;IACjC,iEAAiE;IACjE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,8CAA8C;IAC9C,OAAO,IAAI,MAAM,GAAG,IAAI,CAAC;IACzB,iEAAiE;IACjE,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,uCAAuC;IACvC,uBAAuB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,wDAAwD;IACxD,uBAAuB,IAAI,cAAc,CAAC;IAC1C,mDAAmD;IACnD,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,6CAA6C;IAC7C,gBAAgB,IAAI,OAAO,CAAC;IAC5B,oFAAoF;IACpF,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,yCAAyC;IACzC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAClD,6BAA6B;IAC7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,6BAA6B;AAC7B,oBAAY,cAAc;IACxB,0BAA0B;IAC1B,GAAG,IAAA;IACH,iBAAiB;IACjB,CAAC,IAAA;IACD,iBAAiB;IACjB,CAAC,IAAA;CACF;AAED,6DAA6D;AAC7D,MAAM,WAAW,iBAAiB;IAChC,8BAA8B;IAC9B,GAAG,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;CAC3B"}
@@ -0,0 +1,24 @@
1
+ // Copyright 2024 Jacobo Tarrio Barreiro. All rights reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ /** Direct sampling modes. */
15
+ export var DirectSampling;
16
+ (function (DirectSampling) {
17
+ /** No direct sampling. */
18
+ DirectSampling[DirectSampling["Off"] = 0] = "Off";
19
+ /** I channel. */
20
+ DirectSampling[DirectSampling["I"] = 1] = "I";
21
+ /** Q channel. */
22
+ DirectSampling[DirectSampling["Q"] = 2] = "Q";
23
+ })(DirectSampling || (DirectSampling = {}));
24
+ //# sourceMappingURL=rtldevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtldevice.js","sourceRoot":"","sources":["../../src/rtlsdr/rtldevice.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA0CjC,6BAA6B;AAC7B,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,0BAA0B;IAC1B,iDAAG,CAAA;IACH,iBAAiB;IACjB,6CAAC,CAAA;IACD,iBAAiB;IACjB,6CAAC,CAAA;AACH,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB"}
@@ -0,0 +1,20 @@
1
+ /** Functions common to all tuner implementations. */
2
+ export interface Tuner {
3
+ /** Sets the frequency, returning the actual frequency set. */
4
+ setFrequency(freq: number): Promise<number>;
5
+ /** Enables automatic gain. */
6
+ setAutoGain(): Promise<void>;
7
+ /** Sets manual gain to the given value in dB. */
8
+ setManualGain(gain: number): Promise<void>;
9
+ /** Sets the crystal frequency. */
10
+ setXtalFrequency(xtalFreq: number): void;
11
+ /** Returns the intermediate frequency this tuner uses. */
12
+ getIntermediateFrequency(): number;
13
+ /** Returns the minimum frequency this tuner can set. */
14
+ getMinimumFrequency(): number;
15
+ /** Closes the tuner. */
16
+ close(): Promise<void>;
17
+ /** Reopens the tuner. */
18
+ open(): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=tuner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tuner.d.ts","sourceRoot":"","sources":["../../src/rtlsdr/tuner.ts"],"names":[],"mappings":"AAcA,qDAAqD;AACrD,MAAM,WAAW,KAAK;IACpB,8DAA8D;IAC9D,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,8BAA8B;IAC9B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,iDAAiD;IACjD,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,kCAAkC;IAClC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,0DAA0D;IAC1D,wBAAwB,IAAI,MAAM,CAAC;IACnC,wDAAwD;IACxD,mBAAmB,IAAI,MAAM,CAAC;IAC9B,wBAAwB;IACxB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,yBAAyB;IACzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
@@ -0,0 +1,15 @@
1
+ // Copyright 2024 Jacobo Tarrio Barreiro. All rights reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ export {};
15
+ //# sourceMappingURL=tuner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tuner.js","sourceRoot":"","sources":["../../src/rtlsdr/tuner.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@jtarrio/webrtlsdr",
3
+ "description": "Access RTL-SDR devices and receive and demodulate radio signals from your web application",
4
+ "version": "0.0.1",
5
+ "author": "Jacobo Tarrio <jtarrio@gmail.com>",
6
+ "license": "Apache-2.0",
7
+ "exports": {
8
+ "./*": "./dist/*.js"
9
+ },
10
+ "files": ["./dist"],
11
+ "scripts": {
12
+ "build": "tsc"
13
+ },
14
+ "devDependencies": {
15
+ "typescript": "^5.6.3"
16
+ },
17
+ "dependencies": {
18
+ "@types/w3c-web-usb": "^1.0.10"
19
+ }
20
+ }