Thanks Leif.
I do not really know what max and min DMA values mean. I have 30-300 by default. Not sure what I should type there.
I am out home, I will try it on sunday night.
Many thanks
Ramiro
Thanks so much Leif for the tips. I use only Linux.
After Increasing dma rate to 5000-5000 I get a very good result now. Oscillation is near imperceptible. Reducing dma leads to bigger image amplitude oscillation. I also notice that I have A/D underruns at 1500kHz sample rate. At 1000kHz everything runs smoothly. I do not know if underruns cause sudden image displacements. Do not understand really what they mean.
Tonight I will try everything again to confirm the good behaviour and post an image here.
1500 KHz is the maximum sample rate that I can set for the afedri net now. I believed that in the past I set 2 Mhz sample rate, but do not remember.
Many thanks.
Ramiro.EA4NZ
--
--
Thanks Leif for the effort. Tonight I will try the new version.
Now I go work.... :-(
73, Ramiro. EA4NZ
If you can give me the command to read the actual sampling rate
in an easy to understand format (Like RFSpace specifies commands)
I will use it to inform the user what sampling speed he is really
getting.
On my system it is different. I can set a non standard like 50kHz, but
if I try a higher rate like 185kHz ALSA fails. (It also fails at 192 kHz)
As it turns out I can run 185 or 192 kHz on the USB3 ports. This is another
observation saying "Do not trust your USB system!!"
> 3. When I try to choose Portaudio for input soud card I have sound card
> list for short time - after that - linrad crash.
????????
More details please.
> 4. When I logged in as linux user and try to configure AFEDRI USB interface
> (key D), linrad find SDR control interface, I can choose correct VGA =
> AD8369, press OK, but after Linrad boot and choose SSB mode - linrad gives
> error message...configuration file fail.
The way Afedri reports its identity is beyond my understanding.
After you have selected to use Afedri USB as your radio hardware you
must use the function D in the U menu to set the Afedri parameters
(VGA and freq offset)
Today Linrad can efficiently process the entire HF spectrum from DC
to 30 MHz. That is a first step towards an interesting web server.
I have to choose between two projects: The web server with an
appropriate client or a Linrad Tx for things like Softrock
Ensamble and IQ+. I do not know which way to go...
.
My unit reports 2 MHz, but now since I have put the 24 bit data
format back it will not be correct to set the maximum speed
to 2MHz/1MHz for one or two channels.
If the 24 bit format is selected, then I can only use 1.3333/0.66666
for one or two channels. This is the same is in SDR-IP. Will it
be ok to set the limit like this:
limit=16X/(chans*bits) ?
Here X would be the reported max speed or 1333333 in case only ACK
was received.
No, it does not - not on the USB2 ports of my system. they do not allow
higher rates than 96 kHz or so. Arbitrary lower rates are OK. The USB3
ports on the same computer allow much higher rates.
The USB2 ports allow 5MHz or more with the Mirics dongle. It is a
compatibility problem between ALSA and the USB sub-system.
> So may be it can be good idea to allow user ignore serial number by default
> and use it - if he wants.
Maybe, but that would make the set-up logics different from how it is done
everywhere else in Linrad. To change everywhere is a lot of code-writing.
I suggest you place some "files" on the mass storage device.
Then list those file names in adwav.txt with a name for parameter files
following on the same line.
Linrad would expect the data stream to begin with the standard .wav file header
specifying the sampling rate, number of bits etc. Linrad will accept
infinite file sizes, it ignores the file size information in the header.
I have not provided ways for the user to implement routines to receive
a data stream. In most cases that would involve loading libraries.
There is a problem with NetAfedri in Linrad. Originally One would set
the frequency as the number by which to divide the ADC clock. You
asked me to change that and just set a frequency. That is not really
acceptable. When I type in 96000 on my system I get about 96154
which is not what for example MAP65 users would expect. They should
type in 95237 instead.
Can you give me the command th get the
sampling clock of the ADC so I could make Linrad display the correct
frequency. (Or alternatively the command to read the sampling frequency
that has been set so I could display that and store as the desired
sampling rate.)
73
Leif
Hello Leif .
It would be a nice feature that Linrad will show the available and right sampling rates for the afedri. I mean, not needing a calculator to find the right ones depending on the clock speed. After cheking the AFEDRI clock speed of the unit, Linrad would show a list of the available sampling speeds for the user to choose.
Thanks.
Ramiro, EA4NZ
You are the hardware designer. I want to apply sensible limitations
but I do not want to do something that limits the performance a
user can get. You wrote you will supply 24 bit in the future (probably)
so I put this format back.
My question whether limit=16X/(chans*bits) will be OK is a question
about your system design strategy.
Is the maximum speed I get from
the Afedri the maximum speed of the Ethernet link with 16 bit data
or is it the highest sampling rate for which you have supplied
code in the unit?
When a system in the future will tell Linrad that the maximum speed
is 3 MHz - does it mean that the maximum is 3 MHz for 16 bit data or
2 MHz for 24 bit data or does it mean that the maximum rate is
3 MHz regardless of whether the format is 16 or 24?
I have tested and it is not possible on my system. It IS actual to me since
I try to write future-safe code:-)
> work with higher sample rates with AFEDRi *SDR-USB-HS* receiver, I tested
> up to 768khz.
Well, I hereby (again) inform you that I have a modern computer that
can not even do 192 kHz when using the Net Afedri as a 4 channel USB
soundcard. It is a Supermicro X9DAi.
I have tested the very latest
Debian unstable (Sid) as well as Debian stable (Wheezy), Fedora 20
as well as Fedora 17. They all behave the same:
Afedri USB works fine at 48 kHz on both USB2 and USB3 ports.
It does NOT work on any USB port at 185kHz. Perseus works
fine at 2 MHz on all USB ports.
Testing with my old Afedri, one channel, 192 kHz, works fine
on the USB3 ports, but only one of the four USB2 ports works.
There is something very wrong with my system. It works fine
on both USB2 and USB3 at 8MHz/35 MHz if I remember correctly.
(I can not verify, my bladeRF is broken.)
> So according my practical experience AFEDRi SDR-USB-HS when working in USB
> Audio Class 1 mode provides up to 768khz sample rate with USB3 and USB2
USB Audio" I have never upgraded its firmware. Something is very wrong.
> Only root have no limitations.
> I have not much Linux knowledge to help you in this case. Only reporting
> the problem.
Hmmm, I do not understand the problem.
You could easily change init_wavread to return 0 if open was sucessful.
it is in modesub.c.
Excellent:-) Now users will get the proper sampling frequency displayed:-)
> By the way you can take all this information from the available sources for
> sdr_commander (easier to read).
I have tried, but I am not clever enough:-(
There is one more problem for me: How do I set the mode? Channel1,
channel2 or both channels? (Linrad can not support two channels on different
frequencies.)
Hello Leif .
It would be a nice feature that Linrad will show the available and right sampling rates for the afedri. I mean, not needing a calculator to find the right ones depending on the clock speed. After cheking the AFEDRI clock speed of the unit, Linrad would show a list of the available sampling speeds for the user to choose.
There is one more problem for me: How do I set the mode? Channel1,
channel2 or both channels? (Linrad can not support two channels on different
frequencies.)
#define DIVERSITY_MODE 1
#define DUAL_CHANNEL_MODE 2
#define DIVERSITY_INTERNAL_ADD_MODE 3 //there SDR sends summary signal added for two channels , with possible phase shift between channels regulated
#define QUAD_DIVERSITY_MODE 4
#define QUAD_CHANNEL_MODE 5
Leif, if you are planning to support only Diversity mode so you can simply send DIVERSITY_MODE = 1.
73! Alex
--
OK, I will leave it like this. When you introduce gigabit Ethernet
I will have to change;-)
> Leif - at first you do not have AFEDRI SDR on your hands that is able to
> get this throughput - all *AFEDRI SDR *and *AFEDRI SDR-Net *are USB Full
> Speed evice so you cannot get from them more than 250kHz sample rate
Oooh!! Let us drop this...
That is an error in the message. The problem is caused by these
statements:
fe_handle=hid_open_path(cur_dev->path);
if(fe_handle == NULL)lirerr(1390);
I have now added a separate error message for this error (1393)
If you know how a normal user can get permission, please tell
me and I will put that into the error message.
Change in modesub.c here:
file = fopen("adwav", "rb");
if (file == NULL)
{
file = fopen("adwav.txt", "rb");
if (file == NULL)
{
empty_error:;
help_message(313);
return 1;
}
}
Then add return 0 here:
// Read the WAV file header.
Hi Alex,
Besides listing all acceptable standard rates Linrad
will also list the highest and the lowest rate that was
detected. If I set my Afedri to e.g. 185 kHz there is only
one option on the list:-)
That was read access by
devs = hid_enumerate(afedriusb.vid, afedriusb.pid);
This is permitted for a regular user.
The "D" function does not try to get a handle.
...I just verified that I can set 50000 for my NetAfedri.
Did you really try the latest on the repo?
svn checkout https://sm5...@svn.code.sf.net/p/linrad/code/trunk linrad
This will become the released linrad-04.02 some day.
Now Linrad shows the name of the device it can not open.
In my case /dev/hidraw1 sometimes, other times /dev/hidraw0
After I used chmod to change permissions I can now run Afedri USB
as a regular user with Linrad.
As a regular user I can select Afedri as the soundcard and
and run a first instance of Linrad. I can start a second instance
of Linrad telling it to use the Intel souncard with Afedri USB
as the soundcard hardware. When both instances of Linrad are
running simultaneously I can control the frequency in one or the
other instance of Linrad so I see no reason why it should not be
possible to use sdr_commander. Probably one has to run all
programs as the same user however.
One problem remains however. How to get the device created
with the proper permissions after a reboot. Maybe udev rules
or something.
Maybe. I know nothing about this. M. J. Keehan provided the HID
interface for Linrad as part of his code for the Funcube PRO+
I just used the same for Afedri.....
> > One problem remains however. How to get the device created
> > with the proper permissions after a reboot. Maybe udev rules
> > or something.
> >
> For example I put in Fedora 17 Linux: /etc/udev/rules.d/ folder next
> file (91-afedriusb.rules), that contains next text:
>
> SUBSYSTEM=="usb", ATTRS{idVendor}=="255d", ATTRS{idProduct}=="0006",
> MODE="0666"
> SUBSYSTEM=="usb", ATTRS{idVendor}=="255d", ATTRS{idProduct}=="0002",
> MODE="0666"
I thrid this in Debian in /lib/udev/rules.d/ but this did not give
a regular user access to hidraw device files. Modprobe as root after
every reboot solves the problem. There must be another way.....
Please think about use of HIDAPI (from signal11) - I provided the link to you and forget about thinking how to rename /dev/hidraw
It is very easy to use/add HIDAPI to any project.
If FunCube uses HID device it will be good for FunCube too
73!
Alex
Mike.Hi Alex,The Funcube code in Linrad _is_ the Signal 11 Software hidapi!
Hi Alex and Mike,
I have done some experimenting and found something that works.
The error message when a user does not have permissions now
looks like this:
I have two Afedri units as you know:-)
When unplugging one and then plugging in the other I would
get errors that are non-trivial to detect.
I do not understand why you think the serial number is a problem.
It is auto-selected if there is only a single Afedri device.
.. The serial number message will now only appear when there
are Afedri devices but with non-matching serial numbers.