Component Module for GNU radio

Post

Posted
Rating:
#1 (In Topic #1274)
Regular
GrantXTV is in the usergroup ‘Regular’
 Hi all,

I have working my software project for well over a year now, I need to find a way to add in a Software Defined Radio (SDR) into this project, at the moment I am sending out a strings as UDP to GNU Radio. Where the UDP data is modulated and demodulated using in GNU Radio as SDR blocks to be sent to my sound card. If I could edit the SDR stages within GNU Radio or maybe an editor window in Gambas, then by using this GNU Radio configuration file it could be read into a Gambas module. That way I could send strings in and out to this module, with sliders and the like, to interface directly.

I not sure what work would be involve to do this or not, but more of an idea at this stage, any feedback on this subject?

For now I will keep on using UDP with different ports, to send data out and back in, with one for more for interfacing and control.
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
I'm sorry you have not had any replies. The majority of us probably don't know our UDP from our SDR. I had a look around and found this site that may help.

If you could upload a file and explain what you want it converted, or manipulated, to, we may be able to help a little more.
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
GrantXTV is in the usergroup ‘Regular’
No problems, here is the link to GNU Radio:
GNU Radio

The project I am working on hes two parts one in written in Gambas and the other is in GNU Radio, I going from one to the other via User Datagram Protocol (UDP). The Gambas part is the user interface and the GNU Radio back end, for the radio signals (modulator / demodulator). Is it possible to have a way to use GNU Radio to work within Gambas more like what is done with the Media player Module for example? That way it could be all in one development environment, that has a more direct way to talk to radio software without the need to go in and out via UDP.

I am not sure if this is more helpful or not?
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’

GrantXTV said

 Is it possible to have a way to use GNU Radio to work within Gambas more like what is done with the Media player Module for example? That way it could be all in one development environment, that has a more direct way to talk to radio software without the need to go in and out via UDP.
If gnu radio is based on some c library it would be possible for one with know-how in connecting C libraries and Gambas to write a component to directly communicate with the gnu-radio library.
That would make working with gnu radio from gambas a lot easier I guess.

More info on connection external C libraries to Gambas: https://gambaswiki.org/wiki/howto/extern

Good luck..

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#5
Regular
GrantXTV is in the usergroup ‘Regular’
Working C libraries is not my thing, that is why I am using Gambas, as I worked with basic for many years, I guess for now I only have the UDP work around to connect into GNU Radio software.
Online now: No Back to the top

Post

Posted
Rating:
#6
Regular
vuott is in the usergroup ‘Regular’
…but, as gbWilly rightly and profitably suggested to you, Gambas gives you the opportunity to manage the resources of a possible GNU-Radio external library, written in C.

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#7
Regular
vuott is in the usergroup ‘Regular’
Uhmmm….nasty business.
The library is written in C++:
GNU Radio Manual and C++ API Reference: Usage Manual

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#8
Regular
vuott is in the usergroup ‘Regular’

GrantXTV said

Is it possible to have a way to use GNU Radio to work within Gambas more like what is done with the Mediaplayer Module for example?
I found this:
   Simple DVB with Gstreamer and GNU Radio - OZ9AEC Website
 :? I don't know if that is really consistent with what you are looking for.
Anyway, using the gb.media Component resources, I converted to Gambas the first example, shown on that page, in which a RAW format file is then created from a webcam shot.

Code (gambas)

  1. Private Enum left = 0, hcenter, right
  2. Private Enum baseline = 0, bottom, top, position, vcenter, absolute
  3.  
  4.  
  5. Public Sub Main()
  6.  
  7.  Dim pl As MediaPipeline
  8.  Dim src, cnv, tol, enc, mux, snk As MediaControl
  9.  Dim tm As Date
  10.  
  11.  pl = New MediaPipeline
  12.    
  13.  src = New MediaControl(pl, "v4l2src")
  14.  src["device"] = "/dev/video0"
  15.  cnv = New MediaControl(pl, "videoconvert")
  16.  tol = New MediaControl(pl, "textoverlay")
  17.  tol["text"] = "Test Video"
  18.  tol["halignment"] = left
  19.  tol["valignment"] = bottom
  20.  tol["shaded-background"] = True
  21.  enc = New MediaControl(pl, "x265enc")
  22.  enc["bitrate"] = 1000
  23.  mux = New MediaControl(pl, "mpegtsmux")
  24.  snk = New MediaControl(pl, "filesink")
  25.  snk["location"] = "/tmp/video.raw"         ' <--- the final RAW video file
  26.    
  27. ' Connect "GStreamer" plugins:
  28.  src.LinkTo(cnv)
  29.  cnv.LinkTo(tol)
  30.  tol.LinkTo(enc)
  31.  enc.LinkTo(mux)
  32.  mux.LinkTo(snk)
  33.  
  34. ' Starts webcam video:
  35.  pl.Play()
  36.  
  37.  tm = Now
  38.  
  39.  While Not bo
  40.    i = DateDiff(tm, Now, gb.Millisecond)
  41. ' Time elapsed from the beginning of the video shooting is shown in console/Terminal:
  42.    Write "\rTime elapsed: " & Str(Time(0, 0, 0, i))
  43.    Flush
  44.    Wait 0.01
  45.  
  46.  pl.Stop()
  47.  pl.Close()
  48.  Print "\nRecording ended !"
  49. ' Having used the "Application_Read()" Event, you must use the "Quit" statement to terminate the program and thus create the video file:
  50.  
  51.  
  52.  
  53. Public Sub Application_Read() ' Pressing the "Enter" key on the keyboard stops the video shooting and closes the program
  54.  
  55.  bo = True
  56.  

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#9
Regular
GrantXTV is in the usergroup ‘Regular’
 "Anyway, using the gb.media Component resources", not sure how this would work in with GNUradio, maybe something like gb.gnuradio is what is needed? I would not  know how to go about making this, as this is all new to me.
Online now: No Back to the top

Post

Posted
Rating:
#10
Regular
vuott is in the usergroup ‘Regular’

GrantXTV said

…. maybe something like gb.gnuradio is what is needed? I would not  know how to go about making this, as this is all new to me.
Theoretically from GNUradio resources (which now we know are written in C++) to the implementation of appropriate Gambas Component.
   

  [Gambas-user] Making a simple C++ component

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#11
Regular
GrantXTV is in the usergroup ‘Regular’
I will need time to go through the information provided, theoretically it is possible, so it is a big maybe at this stage?
Online now: No Back to the top

Post

Posted
Rating:
#12
Regular
vuott is in the usergroup ‘Regular’
I can only say that, of course, it is necessary to have a good knowledge of both the Gambas language and - in this case - the C++ language.  :|

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#13
Regular
GrantXTV is in the usergroup ‘Regular’
 "it is necessary to have a good knowledge of both the Gambas language and - in this case - the C++ language"
Well is there anyone who would like to take on this project? it is not my area knowledge.
Online now: No Back to the top
1 guest and 0 members have just viewed this.