From 1388bf9ef275dec07da2b62a57e0bc820226770e Mon Sep 17 00:00:00 2001 From: cheetah Date: Sun, 19 Jan 2020 03:07:47 +0100 Subject: [PATCH] dev2.0 --- .gitignore | 4 +++- main.py | 10 +++++----- output.complex | Bin 4858880 -> 4329600 bytes protocols/Nexus.py | 20 ++++++++++++++++---- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 7e99e36..040c2bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -*.pyc \ No newline at end of file +*.pyc +*.complex +*.iq \ No newline at end of file diff --git a/main.py b/main.py index 5e39dde..57f6670 100644 --- a/main.py +++ b/main.py @@ -8,11 +8,11 @@ import protocols.Nexus nexus = protocols.Nexus.Nexus_TempHumidity() data = nexus.generateData(244, 1, 0, 100) -print([int(x) for x in data]) -samples = nexus.generateSamples(244, 1, 0, 100) -f = open("test.cu8", "w") -f.write(bytearray(samples)) -f.close() +samples = nexus.generateSamples(baseband_samplerate=2e6, id=244, channel=1, temp=30, humidity=100) +with open('nexus.iq', 'wb') as f: + samples.tofile(f) + + ## Transmit Part SDR_ARGS = {'driver': 'lime'} diff --git a/output.complex b/output.complex index 00693e7e543834fb83d40da0500ad9e1214f375f..8f9c1c74711e5cebd8496210a03750f8e383f6c3 100644 GIT binary patch delta 267583 zcmeI*S5Q=08!li(R1{Ge#fT^(s33wEK&01)s34%Ipn!sbAW3o#-Mt+hbHt2UM;%2+ z6wJ`;bIf95936AUtRrI1r!UW6b8h}~G5=h=7pv%6H&k`Kz5Cm%pL+MClUocYt)F4I zu3%R!PtQ_A&9|oiKQC^zQ+{fY!}+5$qES^oJC^qrW7JwMnRrWORjKfA(=1fmZYr!4 z80j8u)N;tA3%ck|YUWE$aztznpPQL2a}v_I<&SHmgIglorXP}_S10iC`@m`&^W@PjFqJS|AYI|g^&R%xM0<(ib~a{S#a_Lw_Jo@Es9s@2iIAuviTZHG%yv@QuC-*_YvY{(=5_-nJcEN zQz&Cvu}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{F~B+5v?D zg#m>Dg#m>Dg#m>Dg#m>Dg#m>Dg#m>Dg#m>Dg#m>Dg#m>Dg#m>Dg#m>Dg#m>Dg#m>D zg#m>Dg#m>Dg_#8k0}AucQW#H9J$r#$fm?xFfm?xFfm?xFfm?xFfm?xFfm?xFfm?xF zfm?xFfm?xFfm?xFfm?xFfm?xFfm?xFfm?xFfm?xFfm?xFseoJgAGnpjm$N{!K(aux zK(auxK(auxK(auxK(auxK(auxK(auxK(auxK(auxK(auxK(auxK(auxK(auxK(aux zK(auxK(auxK(ZYDS4bAvmYS?w9(sL=Fs{g8C!_tMrV6$Nwgt8Ywgt8Ywgt8Ywgt8Y zwgt8Ywgt8Ywgt8Ywgt8Ywgt8Ywgt8Ywgt8Ywgt8Ywgt8Ywgt8Ywgt8YwgtB3-(g$O z(gMi>$pXm&$pXm&$pXm&$pXm&$pXm&$pXm&$pXm&$pXm&$pXm&$pXm&$pXm&$pXm& j$pXm&$pXm&$pXm&$pXpp4@;I>nq5t5)c^0bsLTHW)*Mbt delta 2505 zcmZoz*um6rVg=KJiQ5mnVS2#5kx|KhGgIw9VHlUOcB6nJBZ?533N$Xs8VKvB)JWRf zKzkPw_5*!XVDTyOLZ50j3iLDKOH5eILh~0Imt+lu^;2pj?QNjF3kmyyJ}R*Ilz5@h z{AFEpCmMw1(I(}{4hCq8YVHNij{LCFnp diff --git a/protocols/Nexus.py b/protocols/Nexus.py index 78a00b9..4de3e70 100644 --- a/protocols/Nexus.py +++ b/protocols/Nexus.py @@ -1,9 +1,11 @@ - +from modulators.OOKModulator import OOKModulator +import numpy as np +""" +Nexus Temperature & Humidity Protocol +""" class Nexus_TempHumidity: def __init__(self): - self.test() - def test(self): - print("Nexus Temperature & Humidity Sensor") + pass def generateData(self, id=244, channel=1, temp=30, humidity=100): nibbles = self.generatePacket(id, channel, temp, humidity) data = [] @@ -16,6 +18,16 @@ class Nexus_TempHumidity: data.append(0) mask >>= 1 return data + def generateSamples(self, baseband_samplerate=2e6, id=244, channel=1, temp=30, humidity=100, numpyType=np.complex64): + modulator = OOKModulator(baseband_samplerate=baseband_samplerate, am_frequency=22.471e3) + bits = self.generateData(id, channel, temp, humidity) + for j in bits: + modulator.addModulation(500) + modulator.addPadding(1000 * (1 + int(j))) + modulator.addModulation(500) + modulator.addPadding(4000) + return modulator.getSamplesAndReset(numpyType) + def generatePacket(self, id=244, channel=1, temp=30, humidity=100): packet = [ (id >> 4) & 0x0f,