Re: [Discuss-gnuradio] 'module' object has no attribute
Dave and Andrej, Thanks for your help ! I'll try your suggestions as soon as possible. Best regards. -- GD. Guy Durrieu ONERA - Département Traitement de l'Information et Systèmes CEntRe de Toulouse, 2, avenue Edouard Belin BP 74025 31055 TOULOUSE CEDEX 4 Tél. +33 5 62 25 26 59 avertissement http://www.onera.fr/onera-en/emails-terms ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk
On 12/17/18 5:56 AM, Horký Petr wrote: > Hello, > We are trying to take control over drone. > > The drone starts for example at 2,4 GHz and has some pulse width, and > pulse repetition frequency we know. > > Pulse1: at start of pulse there is 2,4GHz carrier to synchronize and > then BSPK data (two numbers in binary) > Pulse2: carrier 2,4GHz + BPSK > Pulse3: carrier 2,45GHz + BPSK > Pulse4: carrier 2,45GHz+BPSK > Pulse 5: carrier 2,5Ghz +BPSK and so on > After 12 pulses it starts again at 2,4GHz. Just a drive by comment. If the drone is new it may be using WIFI, in which case it has an AP (access point) onboard the drone. To control the drone remotely you need to access the AP on the drone with WIFI. 2.4 GHz analog is outdated - so it depends upon how old the drone is. 2.4 GHz digital (WIFI FPV) is the most popular - all you need is a cell phone to control it. The only thing I know about drones is one of my neighbors has one and he uses his cell phone and WIFI FPV to control the drone, And I know next to nothing about WIFI. > > So I have pulse width, pulse repetition frequency, carrier frequency > (which hops after 2 pulses), and BPSK (16 bits I think). > I hope that now it is a little bit more understandable. :) In case it is > not a will do my best to describe it better. > Thank you for help, > > > Regards, > > Petr > > > > > *Od:* Müller, Marcus (CEL) > *Odesláno:* pondělí 17. prosince 2018 12:51:10 > *Komu:* discuss-gnuradio@gnu.org; Horký Petr > *Předmět:* Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk > > Hi Horký, > > could you give us a bit more context? The signal you're describing > sounds like a single-carrier system, but (modern) WiFi is an OFDM > system, so I'm not sure what you really want to achieve? > Maybe paint the bigger picture of why you need this! > > Best regards, > Marcus > > On Mon, 2018-12-17 at 10:12 +, Horký Petr wrote: >> Hello guys, >> my task is to create pulses with half period carrier/ half >> period bpsk in it. After two pulses I hop to another frequency. Is it >> possible to create this with only blocks, or I have to write the code >> myself. >> Can you give me your ideas how would you do that? Is using stream >> tags the best idea here? >> thank you. >> ___ >> Discuss-gnuradio mailing list >> Discuss-gnuradio@gnu.org >> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > ___ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] Project Call this Thursday
Hi all, we're having our last project call of the year this Thursday, at 10:00 AM Pacific time, 19:00 CET, 1800 UTC. To join the call go here: https://meet.jit.si/gr-call Also, join us on IRC or Slack. There should also be a YouTube stream available, but let us figure that out. All this new-fangled computery internet stuff... The agenda is still being decided (see here: https://wiki.gnuradio.org/index.php/Call20181220), but this call will be exciting. We'll talk about 3.8 (there *will* be a major release in 2019, no two ways about it!), and maybe even some stats. Cheers, Martin ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Sinewave signal source with phase variation
On Mon, Dec 17, 2018 at 5:36 AM xavier yvars wrote: > x(t) = a*sin(w1t + deltaphi*sin(w2t)) > > With the "source block" it is not possible, you can just set a fixed > frequency. > This is phase modulation of a carrier. You can implement it by multiplying (multiply block) the carrier (signal source) with the output of a phase modulator fed by the modulation signal which in this case is a sinusoid. Example flow graph in GRC (numbers not particularly sensible, just demonstrating it works): [image: image.png] Notes: - Your "deltaphi" parameter can be put into either the Amplitude of the signal source or the Sensitivity of the phase modulator; it's equivalent. - For maximum computational efficiency, replace the carrier source and Multiply block with a Rotator block. However, it requires the frequency to be expressed in radians per sample and so is not as convenient for casual use. - The output is complex (analytic). If you want real output, just use a complex to float block *after the multiplication.* ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk
Hello Marcus, yes I have been reading gnuradio tutorials all day long maybe 14 days, but it is really hard to get into it. I am now trying to combine: signal_source + stream_to_tagged_stream and constant source (const = 0) + stream_to_tagged_stream If i put that into tagged stream mux I have something like pulse train. Maybe this could be the way? About the frequencies. Don't worry I just wrote random numbers. I would have to look into my papers for the real values. I have to create the signal first and then set the real values. PS: I was just reading about constelletion encoder 5 minutes ago. Now I will learn the patterned interleaver, thank you for advices. Regards, Petr Od: Müller, Marcus (CEL) Odesláno: pondělí 17. prosince 2018 15:51:17 Komu: discuss-gnuradio@gnu.org; Horký Petr Předmět: Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk Hello Petr! Well, OK, so what's that got to do with the Wifi in your subject? In any case, we do have Constellation Encoder, and Patterned Interleaver. These two blocks might make the center of your application. Have you already been pointed towards the Guided GNU Radio tutorials? https://tutorials.gnuradio.org They actually build a digital transmitter, so they might be helpful. Also, are you sure about the carrier frequencies? 2.4 GHz and 2.5 GHz are *exactly* the edges of the ISM band, and operating there with anything but a pure carrier would be illegal, as there would be energy out of the ISM band. Also, 50 MHz frequency hops seem very wide in a 100 MHz wide band. Best regards, Marcus On Mon, 2018-12-17 at 13:56 +, Horký Petr wrote: > Hello, > We are trying to take control over drone. > The drone starts for example at 2,4 GHz and has some pulse width, and pulse > repetition frequency we know. > Pulse1: at start of pulse there is 2,4GHz carrier to synchronize and then > BSPK data (two numbers in binary) > Pulse2: carrier 2,4GHz + BPSK > Pulse3: carrier 2,45GHz + BPSK > Pulse4: carrier 2,45GHz+BPSK > Pulse 5: carrier 2,5Ghz +BPSK and so on > After 12 pulses it starts again at 2,4GHz. > > So I have pulse width, pulse repetition frequency, carrier frequency (which > hops after 2 pulses), and BPSK (16 bits I think). > I hope that now it is a little bit more understandable. :) In case it is not > a will do my best to describe it better. > Thank you for help, > > Regards, > Petr > > > Od: Müller, Marcus (CEL) > Odesláno: pondělí 17. prosince 2018 12:51:10 > Komu: discuss-gnuradio@gnu.org; Horký Petr > Předmět: Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk > > Hi Horký, > > could you give us a bit more context? The signal you're describing > sounds like a single-carrier system, but (modern) WiFi is an OFDM > system, so I'm not sure what you really want to achieve? > Maybe paint the bigger picture of why you need this! > > Best regards, > Marcus > > On Mon, 2018-12-17 at 10:12 +, Horký Petr wrote: > > Hello guys, > > my task is to create pulses with half period carrier/ half > > period bpsk in it. After two pulses I hop to another frequency. Is it > > possible to create this with only blocks, or I have to write the code > > myself. > > Can you give me your ideas how would you do that? Is using stream > > tags the best idea here? > > thank you. > > ___ > > Discuss-gnuradio mailing list > > Discuss-gnuradio@gnu.org > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] 'module' object has no attribute
Hi Guy, I've had these issues when linking to libraries. Go to the CMakeLists.txt in the root of your OOT module, and look for the line find_package(Boost.. Make sure you include chrono in your components list, i.e.: find_package(Boost "1.35" COMPONENTS filesystem system *chrono*) After compile/install run ldconfig. Good luck, Andriy On Mon, 17 Dec 2018 at 09:39, Andrej Rode wrote: > Hi Guy, > > --- > > AttributeError: 'module' object has no attribute 'mac' > > --- > > That usually happens if python can't import the created module. > It can have several reasons why it can't: > 1. the installed module is not in your (custom) PYTHONPATH > 2. The python module tries to import the C++ code wrapped with SWIG and > errors out (Usually because some linking problems) > > That's the two usual suspects if working with GNU Radio. You should > check the directory you installed the python module in. E.g. > `/usr/local/lib64/python2.7/site-packages` if there is a `mac` folder. > If there is you should check if it is in your pythonpath (e.g. python -c > 'import sys;print(sys.path);'). If it is you can go into the `mac` > folder and check with `ldd _mac_swig.so` (or similar) if the dynamic > linker can locate all libraries required to run the code. > > Cheers > Andrej > > -- > Andrej Rode > GPG Key: 750B CBBB 4A75 811A 4D5F 03ED 5C23 7FB8 9A7D A2AA > ___ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk
Hello Petr! Well, OK, so what's that got to do with the Wifi in your subject? In any case, we do have Constellation Encoder, and Patterned Interleaver. These two blocks might make the center of your application. Have you already been pointed towards the Guided GNU Radio tutorials? https://tutorials.gnuradio.org They actually build a digital transmitter, so they might be helpful. Also, are you sure about the carrier frequencies? 2.4 GHz and 2.5 GHz are *exactly* the edges of the ISM band, and operating there with anything but a pure carrier would be illegal, as there would be energy out of the ISM band. Also, 50 MHz frequency hops seem very wide in a 100 MHz wide band. Best regards, Marcus On Mon, 2018-12-17 at 13:56 +, Horký Petr wrote: > Hello, > We are trying to take control over drone. > The drone starts for example at 2,4 GHz and has some pulse width, and pulse > repetition frequency we know. > Pulse1: at start of pulse there is 2,4GHz carrier to synchronize and then > BSPK data (two numbers in binary) > Pulse2: carrier 2,4GHz + BPSK > Pulse3: carrier 2,45GHz + BPSK > Pulse4: carrier 2,45GHz+BPSK > Pulse 5: carrier 2,5Ghz +BPSK and so on > After 12 pulses it starts again at 2,4GHz. > > So I have pulse width, pulse repetition frequency, carrier frequency (which > hops after 2 pulses), and BPSK (16 bits I think). > I hope that now it is a little bit more understandable. :) In case it is not > a will do my best to describe it better. > Thank you for help, > > Regards, > Petr > > > Od: Müller, Marcus (CEL) > Odesláno: pondělí 17. prosince 2018 12:51:10 > Komu: discuss-gnuradio@gnu.org; Horký Petr > Předmět: Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk > > Hi Horký, > > could you give us a bit more context? The signal you're describing > sounds like a single-carrier system, but (modern) WiFi is an OFDM > system, so I'm not sure what you really want to achieve? > Maybe paint the bigger picture of why you need this! > > Best regards, > Marcus > > On Mon, 2018-12-17 at 10:12 +, Horký Petr wrote: > > Hello guys, > > my task is to create pulses with half period carrier/ half > > period bpsk in it. After two pulses I hop to another frequency. Is it > > possible to create this with only blocks, or I have to write the code > > myself. > > Can you give me your ideas how would you do that? Is using stream > > tags the best idea here? > > thank you. > > ___ > > Discuss-gnuradio mailing list > > Discuss-gnuradio@gnu.org > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] 'module' object has no attribute
Hi Guy, > --- > AttributeError: 'module' object has no attribute 'mac' > --- That usually happens if python can't import the created module. It can have several reasons why it can't: 1. the installed module is not in your (custom) PYTHONPATH 2. The python module tries to import the C++ code wrapped with SWIG and errors out (Usually because some linking problems) That's the two usual suspects if working with GNU Radio. You should check the directory you installed the python module in. E.g. `/usr/local/lib64/python2.7/site-packages` if there is a `mac` folder. If there is you should check if it is in your pythonpath (e.g. python -c 'import sys;print(sys.path);'). If it is you can go into the `mac` folder and check with `ldd _mac_swig.so` (or similar) if the dynamic linker can locate all libraries required to run the code. Cheers Andrej -- Andrej Rode GPG Key: 750B CBBB 4A75 811A 4D5F 03ED 5C23 7FB8 9A7D A2AA signature.asc Description: Digital signature ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] 'module' object has no attribute
Guy, I assume that error is coming from Python. If that's the case, then it might be that your Swig build messed up somewhere or the lib and Swig are not agreeing. When I get those kinds of errors I will edit the __init__.py file for the Python module (likely in /usr/local/lib/python2.7/dist-packages/your_module_name/) and remove the `pass` for the ImportError and replace with `import traceback; traceback.print_exc()` to see what's wrong. It might be that your .so file isn't being imported properly to Python. Making that __init__ change and then running `python -c 'import your_module_name'` should result in seeing a better error. If no error happens, then you can also try running `python -c 'import my_module_name; print dir(your_module_name)` to see if your module actually has any contents at all. Hope that helps! -Dave On Mon, Dec 17, 2018 at 5:16 AM Guy Durrieu wrote: > Hi, > > I am developing some kind of MAC layer within a GNUradio model. Until > now, my C++ mac module works. > > Now I need to add time functionnalities to my module. I include the > following declarations: > > --- > boost::chrono::system_clock::time_point now = > boost::chrono::system_clock::now() ; > boost::chrono::system_clock::time_point nextperiod = now + > boost::chrono::milliseconds{d_period} ; > --- > > The "make" runs successfully (no compile time errors) but after > launching gnuradio-companion, when trying to execute the model, I get > the error > > --- > AttributeError: 'module' object has no attribute 'mac' > --- > > Did somebody experience this kind of error with boost/chrono ? I read in > the list that it could result from a library access problem, but > libboost-chrono.so is present in the standard directory > /usr/lib/x86_64-linux-gnu, so I really don't understand what happens in > my model... > > Thanks in advance for your help ! > > -- GD. > > Guy Durrieu > ONERA - Département Traitement de l'Information et Systèmes > CEntRe de Toulouse, 2, avenue Edouard Belin BP 74025 31055 TOULOUSE CEDEX 4 > Tél. +33 5 62 25 26 59 > avertissement http://www.onera.fr/onera-en/emails-terms > > > > > > ___ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk
Hello, We are trying to take control over drone. The drone starts for example at 2,4 GHz and has some pulse width, and pulse repetition frequency we know. Pulse1: at start of pulse there is 2,4GHz carrier to synchronize and then BSPK data (two numbers in binary) Pulse2: carrier 2,4GHz + BPSK Pulse3: carrier 2,45GHz + BPSK Pulse4: carrier 2,45GHz+BPSK Pulse 5: carrier 2,5Ghz +BPSK and so on After 12 pulses it starts again at 2,4GHz. So I have pulse width, pulse repetition frequency, carrier frequency (which hops after 2 pulses), and BPSK (16 bits I think). I hope that now it is a little bit more understandable. :) In case it is not a will do my best to describe it better. Thank you for help, Regards, Petr Od: Müller, Marcus (CEL) Odesláno: pondělí 17. prosince 2018 12:51:10 Komu: discuss-gnuradio@gnu.org; Horký Petr Předmět: Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk Hi Horký, could you give us a bit more context? The signal you're describing sounds like a single-carrier system, but (modern) WiFi is an OFDM system, so I'm not sure what you really want to achieve? Maybe paint the bigger picture of why you need this! Best regards, Marcus On Mon, 2018-12-17 at 10:12 +, Horký Petr wrote: > Hello guys, > my task is to create pulses with half period carrier/ half > period bpsk in it. After two pulses I hop to another frequency. Is it > possible to create this with only blocks, or I have to write the code > myself. > Can you give me your ideas how would you do that? Is using stream > tags the best idea here? > thank you. > ___ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] Sinewave signal source with phase variation
Hello, The purpose of my study is the effect of (mechanical) vibrations of an antenna on the signal. So let begin easy and let's say that a signal without antenna vibration is x(t) = a*sin(w1t) Now if the antenna is vibrating, the signal becomes x(t) = a*sin(w1t + deltaphi*sin(w2t)) With the "source block" it is not possible, you can just set a fixed frequency. I tried also with "delay" block but without success. Maybe I am blind and another block makes the job but I can't find it. So I am trying to implement my own source block for this. In the different code examples that I have seen, I can't see anything related about "time" in the code. How can I add this kind of signal in GNU Radio ? Any tips for this ? Thanks, Xavier ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] Wifi signal -pulse train+bspk
Hi Horký, could you give us a bit more context? The signal you're describing sounds like a single-carrier system, but (modern) WiFi is an OFDM system, so I'm not sure what you really want to achieve? Maybe paint the bigger picture of why you need this! Best regards, Marcus On Mon, 2018-12-17 at 10:12 +, Horký Petr wrote: > Hello guys, > my task is to create pulses with half period carrier/ half > period bpsk in it. After two pulses I hop to another frequency. Is it > possible to create this with only blocks, or I have to write the code > myself. > Can you give me your ideas how would you do that? Is using stream > tags the best idea here? > thank you. > ___ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio smime.p7s Description: S/MIME cryptographic signature ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] 'module' object has no attribute
Hi, I am developing some kind of MAC layer within a GNUradio model. Until now, my C++ mac module works. Now I need to add time functionnalities to my module. I include the following declarations: --- boost::chrono::system_clock::time_point now = boost::chrono::system_clock::now() ; boost::chrono::system_clock::time_point nextperiod = now + boost::chrono::milliseconds{d_period} ; --- The "make" runs successfully (no compile time errors) but after launching gnuradio-companion, when trying to execute the model, I get the error --- AttributeError: 'module' object has no attribute 'mac' --- Did somebody experience this kind of error with boost/chrono ? I read in the list that it could result from a library access problem, but libboost-chrono.so is present in the standard directory /usr/lib/x86_64-linux-gnu, so I really don't understand what happens in my model... Thanks in advance for your help ! -- GD. Guy Durrieu ONERA - Département Traitement de l'Information et Systèmes CEntRe de Toulouse, 2, avenue Edouard Belin BP 74025 31055 TOULOUSE CEDEX 4 Tél. +33 5 62 25 26 59 avertissement http://www.onera.fr/onera-en/emails-terms ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] Wifi signal -pulse train+bspk
Hello guys, my task is to create pulses with half period carrier/ half period bpsk in it. After two pulses I hop to another frequency. Is it possible to create this with only blocks, or I have to write the code myself. Can you give me your ideas how would you do that? Is using stream tags the best idea here? thank you. ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] Attribute Error and Linking shared libs against to OOT
Hello everyone, I created an OOT block,decoder, using gr-modtool but I get the following Attribute error when I run my flowgraph. I guess there is a problem with the external libraries linking against to the implementation. File "/home/bugratulay/workarea-gnuradio/TRC_WORK/gr-ieee802-11/examples/wifi_loopback.py", line 191, in __init__ self.asn_decoder_0 = asn.decoder() AttributeError: 'module' object has no attribute 'decoder' My decoder_imp.cc includes 'J2735_2016.h' and some other headers related to external libs. I put the headers and 'J2735_2016.cpp' in the lib folder and I changed the following lines of CMakeLists.txt (the one in the lib folder) to find the external libs. list(APPEND asn_sources decoder_impl.cc J2735_2016.cpp ) list(APPEND asn_libs cppsoed cpptoed osscpp ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES} ${LOG4CPP_LIBRARIES} ) add_library(gnuradio-asn SHARED ${asn_sources}) target_link_libraries(gnuradio-asn ${Boost_LIBRARIES} ${asn_libs}) set_target_properties(gnuradio-asn PROPERTIES DEFINE_SYMBOL "gnuradio_asn_EXPORTS") Inside /usr/local/lib, I run ldd command and I saw that the external libs are linked against to the .so file. -ldd libgnuradio-asn.so libcppsoed.so => /usr/local/lib/libcppsoed.so (0x7fe0229af000) libcpptoed.so => /usr/local/lib/libcpptoed.so (0x7fe0226b5000) libosscpp.so => /usr/local/lib/libosscpp.so (0x7fe02247c000) I've never done such linking before. Am I doing something wrong ? or what might be the other possibilities for this Attribute Error? Best, -Bugra ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio