discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] RTTY receiver


From: CEL
Subject: Re: [Discuss-gnuradio] RTTY receiver
Date: Tue, 11 Jun 2019 07:21:22 +0000

Yeah, char signedness is compiler-dependent (and can be configured with
-f[un]signed-char in GCC). Neither C nor C++ specify a "default"
signedness in the standard.

So, if you want to do arithmetic on chars, you need to specify which
data type you'd want – signed char or unsigned char. 
That's what Kyeong's change does. 

If it works without, it's by luck.

If you look into embedded software, you'll often find that C developers
prefer to use `int8_t` instead of `signed char` and `uint8_t` instead
of `unsigned char` if they're using these datatypes to (logically)
transport bytes of data or actually numbers, as opposed to dealing with
character data ("text" in the human sense, not the ld sense).

Here it's kind of a hybrid, so explicity saying you want unsigned char
is probably the most intuitive :)

Thanks for this discussion!

Best regards,
Marcus

On Mon, 2019-06-10 at 23:27 -0700, Cinaed Simson wrote:
> On 6/10/19 9:05 PM, Kyeong Su Shin wrote:
> > Hello Barry,
> > 
> > 
> > Apparantly, the module has portability issues (will build on x86
> > but
> > won't build on ARM) due to data type issues.
> 
> It builds find on my ARM 64 Odroid running jessie. Maybe it just
> doesn't
> build on the raspberry pi 3. I'm running a slightly dated version of
> gnuradio - 3.7.12git-295-ga0adcd33.
> 
> -- Cinaed
> 
>  To build the package, you
> > will have to edit lib/baudot_encode_bb_impl.h:
> > 
> > 
> > "static const char ascii_to_letters[128]" should become
> > 
> > 
> > "static const *signed* char ascii_to_letters[128]",  and
> > 
> > 
> > "static const char ascii_to_figures[128]" should become
> > 
> > 
> > "static const *signed* char ascii_to_figures[128]".
> > 
> > 
> > That will allow the module to build, although you may have to make
> > further changes to get "Boudot Encode" block working correctly (I
> > didn't
> > test that; maybe I should make a pull request after that).
> > 
> > 
> > Regards,
> > 
> > Kyeong Su Shin
> > 
> > 
> > -----------------------------------------------------------------
> > -------
> > *보낸 사람:* address@hidden <address@hidden>
> > *보낸 날짜:* 2019년 6월 11일 화요일 오전 2:56:02
> > *받는 사람:* Kyeong Su Shin
> > *참조:* address@hidden
> > *제목:* Re: [Discuss-gnuradio] RTTY receiver
> >  
> > Thank you for your response. Since this is my first issue on
> > 'discuss-gnuradio', I am not sure how to get my reply to you posted
> > in
> > the thread. This looks like it might work. If not, please let me
> > know
> > what to do.
> > 
> > I did the "sudo ldconfig" and it got rid of the "include could not
> > find
> > load file: GrPython", but not the other problem, so I decided to
> > start
> > from scratch.
> > 
> > I have
> > Raspberry Pi 3 B+
> > Rasbian Linux (v2)
> > 
> > I deleted the folder 'gr-radioteletype'
> > download zip from https://github.com/bitglue/gr-radioteletype
> > <https://github.com/bitglue/gr-radioteletype>
> >     
> > GitHub - bitglue/gr-radioteletype: GNU Radio blocks for RTTY and
> > PSK31
> > <https://github.com/bitglue/gr-radioteletype>
> > github.com
> > GNU Radio blocks for RTTY and PSK31. Contribute to
> > bitglue/gr-radioteletype development by creating an account on
> > GitHub.
> > 
> > 
> > extract zip to /home/pi
> > cd ~/gr-radioteletype-master
> > mkdir build
> > cd build
> > cmake ../
> > make
> > [  5%] Building CXX object
> > lib/CMakeFiles/gnuradio-
> > radioteletype.dir/async_word_extractor_bb_impl.cc.o
> > [ 10%] Building CXX object
> > lib/CMakeFiles/gnuradio-
> > radioteletype.dir/baudot_decode_bb_impl.cc.o
> > [ 15%] Building CXX object
> > lib/CMakeFiles/gnuradio-
> > radioteletype.dir/baudot_encode_bb_impl.cc.o
> > In file included from
> > /home/pi/gr-radioteletype-master/lib/baudot_encode_bb_impl.cc:26:0:
> > /home/pi/gr-radioteletype-master/lib/baudot_encode_bb_impl.h:65:5:
> > error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ inside { }
> > [-Wnarrowing]
> >       };
> >       ^
> > /home/pi/gr-radioteletype-master/lib/baudot_encode_bb_impl.h:100:5:
> > error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ inside { }
> > [-Wnarrowing]
> >       };
> >       ^
> > /home/pi/gr-radioteletype-master/lib/baudot_encode_bb_impl.h:100:5:
> > error: narrowing conversion of ‘-1’ from ‘int’ to ‘char’ inside { }
> > [-Wnarrowing]
> > lib/CMakeFiles/gnuradio-radioteletype.dir/build.make:110: recipe
> > for
> > target
> > 'lib/CMakeFiles/gnuradio-
> > radioteletype.dir/baudot_encode_bb_impl.cc.o'
> > failed
> > make[2]: ***
> > [lib/CMakeFiles/gnuradio-
> > radioteletype.dir/baudot_encode_bb_impl.cc.o]
> > Error 1
> > CMakeFiles/Makefile2:137: recipe for target
> > 'lib/CMakeFiles/gnuradio-radioteletype.dir/all' failed
> > make[1]: *** [lib/CMakeFiles/gnuradio-radioteletype.dir/all] Error
> > 2
> > Makefile:138: recipe for target 'all' failed
> > make: *** [all] Error 2
> > 
> > Both of the error messages were repeated *many* times. I looked at
> > the
> > code for baudot_encode_bb_impl.h, but could not see any problems
> > with
> > it.
> > 
> > I appreciate any help you can give.
> > 
> > Best wishes,
> > 
> > Barry
> > 
> > On 2019-06-10 00:29, Kyeong Su Shin wrote:
> > > Hello Barry:
> > > 
> > > Did you try "sudo ldconfig"?
> > > 
> > > If so, could you provide us the relevant software versions (GNU
> > > Radio
> > > version, Linux distro type, etc) and the full steps that you took
> > > to
> > > build the module? gr-radioteletype from "
> > > https://github.com/bitglue/gr-radioteletype/ " builds and runs
> > > fine on
> > > my machine (tm).
> > > 
> > > 
> > > Regards,
> > > 
> > > Kyeong Su Shin
> > > 
> > > 
> > > ________________________________
> > > 보낸 사람: address@hidden <address@hidden> 대신 Discuss-gnuradio
> > > <discuss-gnuradio-bounces+ksshin=address@hidden>
> > > 보낸 날짜: 2019년 6월 10일 월요일 오전 5:08:32
> > > 받는 사람: address@hidden
> > > 제목: [Discuss-gnuradio] RTTY receiver
> > > 
> > > I have been a real-time programmer for over 50 years, and a ham
> > > for 66
> > > years, but am new to Gnu Radio. My project is to build a complete
> > > RTTY
> > > receiver with SDR. In looking about for any applicable code, I
> > > found
> > > gr-radioteletype, but seem to be missing some of the pieces.
> > > Using the
> > > cmake, make, and make install steps I was able to get the flow
> > > graph to
> > > work, but when I try to execute it I get:
> > > 
> > > "from radioteletype.demodulators import rtty_demod_cb
> > >     No module named radioteletype.demodulators"
> > > and
> > > "include could not find load file: GrPython"
> > > 
> > > What am I missing? I have searched for GrPython and not found any
> > > mention of it.
> > > 
> > > As an alternative, I have the RTTY signal demodulated into a bit 
> > > stream,
> > > and I have Python code to extract RTTY characters from a bit
> > > stream, 
> > > but
> > > haven't figured out how to plug the two together.
> > > 
> > > Any help on either issue would be appreciated greatly.
> > > 
> > > Thanks, Barry KV4FV
> > > 
> > > _______________________________________________
> > > Discuss-gnuradio mailing list
> > > address@hidden
> > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> > 
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> > 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]