Yate Community Forum

OpenLTE => YateBTS => Topic started by: Jambo on November 12, 2015, 03:09:28 AM

Title: Problems with libusb!!
Post by: Jambo on November 12, 2015, 03:09:28 AM
Hello everybody! I thank you in advance for all your help previously on your IRC channel.
I'm currently having issues with bladeRF to work with YateBTS already.
I'm running Ubuntu 15.04 on ARM (raspberry pi 2) and I have builded bladeRF with your yate.ro repo (link that I found on a forum). BladeRF itself actually works with bladeRF-cli -i command but when I try to load yate in -sd mode I get a lot of LIBUSB errors. I tried to change libusb version but still get the same error. I tried versions: 1.0.18 - 1.0.19 - 1.0.20 (actually installed) but with no results. What do you suggest me to do?
Jambo.

Here's the yate.log output:
http://pastebin.ca/3248939 (http://pastebin.ca/3248939)
Title: Re: Problems with libusb!!
Post by: Jambo on November 18, 2015, 03:41:16 AM
Nobody here that can help me? Any tip?
Title: Re: Problems with libusb!!
Post by: marian on November 18, 2015, 03:47:00 AM
You may try to use libusb 1.0.17 if available
Title: Re: Problems with libusb!!
Post by: Jambo on November 19, 2015, 10:49:00 AM
You may try to use libusb 1.0.17 if available

Tried with libusb 1.0.16rc-10 with no success. I guess now that libusb is not the problem. Should it be?
Title: Re: Problems with libusb!!
Post by: Jambo on November 24, 2015, 10:01:52 AM
Update

I moved to Ubuntu MATE 15.10 (always on raspberry). Installed yate, yate-bts and bladerf with no problems.
This is my status:
https://www.filepicker.io/api/file/bqEKwGkUSuK2pXg0Aw8Q (https://www.filepicker.io/api/file/bqEKwGkUSuK2pXg0Aw8Q)
https://www.filepicker.io/api/file/EGn0DqveRE6FMiIrIJ8S  (https://www.filepicker.io/api/file/EGn0DqveRE6FMiIrIJ8S)
these are my settings..
and i get this output on yate.log
https://www.filepicker.io/api/file/yMOGsyiVQtqgxSCmFr2Y  (https://www.filepicker.io/api/file/yMOGsyiVQtqgxSCmFr2Y)

Any tips?
Title: Re: Problems with libusb!!
Post by: marian on November 25, 2015, 03:42:15 AM
Try using your board on an non ARM computer.
If it works this would mean there might be an ARM related issue.
If it doesn't: you might have a faulty board.
Title: Re: Problems with libusb!!
Post by: Jambo on December 03, 2015, 07:35:00 AM
Try using your board on an non ARM computer.
If it works this would mean there might be an ARM related issue.
If it doesn't: you might have a faulty board.


Actually i didn't try yet to test the bladerf on non ARM architecture but i see here in the bladerf site that they have tutorials for ARM... They actually give support for ARM so i think it's not an issue related to the rasp.
Any other tips?
Title: Re: Problems with libusb!!
Post by: marian on December 04, 2015, 01:50:19 AM
Try anyway.
It may be the board, libusb, yate itself
Title: Re: Problems with libusb!!
Post by: Jambo on December 17, 2015, 10:41:28 AM
Update
I'm still under Ubuntu server 15.10.
I've installed yate and yatebts through subversion.
I've followed this guide: https://github.com/Nuand/bladeRF/wiki/Setting-up-Yate-and-YateBTS-with-the-bladeRF (https://github.com/Nuand/bladeRF/wiki/Setting-up-Yate-and-YateBTS-with-the-bladeRF)
This is my output: http://pastebin.com/qDUg0V3e (http://pastebin.com/qDUg0V3e)
libusb seems installed but I've followed the guide and nothing more.
Any help please?
Title: Re: Problems with libusb!!
Post by: marian on December 21, 2015, 02:11:51 AM
bladerf module is not loaded.
Check if compiled/installed.
Location: modules/radio/ybladerf.yate
Title: Re: Problems with libusb!!
Post by: Jambo on January 15, 2016, 05:26:33 AM
No, it's not compiled.
In radio folder i have:  dummyradio.cpp dummyradio.yate and ybladerf.cpp only.
What should I do to compile it?
Title: Re: Problems with libusb!!
Post by: marian on January 15, 2016, 05:41:23 AM
Run configure script.
Check for a line:
Checking for libusb ...
If libusb is not found then libusb devel is not installed or installed in unknown directory.
Try running configure with --with-libusb=DIR
If libusb is found check for compile time errors.
Title: Re: Problems with libusb!!
Post by: Jambo on January 18, 2016, 07:35:08 AM
Update
First, I have to thank you for all your help you're giving to my project; i really appriciate it.

I managed to compile the file that was missing. Now yate runs well but I still get the same LIBUSB_TRANSFER_ERROR yet again.
Now. I tried the card on a linux notebook and it works all well.
Leds are flashing and I can see my network on the phone. I have now an issue: I cannot register my phone. I setted regexp=^* but my phone fails to register.

Before trying to solve the last problem I need to know the answer to this question that is, for me, the most important over all.
According to these informations, could it be an ARM (raspberry) related issue?
I.e. : will I ever be able to run yatebts on raspberry or not?

In addition, I have to solve this issue also, though.

Thanks in advance.
Title: Re: Problems with libusb!!
Post by: marian on January 18, 2016, 07:45:31 AM
I don't know if it's an ARM related issue.
I also don't know if bladerf module will be tested on ARM.

For registering:
Try setting the regexp to .*
Please attach a log if not working.
Title: Re: Problems with libusb!!
Post by: Jambo on January 18, 2016, 08:31:11 AM
Hi marian, thanks for your fast reply.
Ok, I cannot register atm even if regexp is set to .* but that's not my problem for now...
I only have a lot of timestamp jumps... is it normal?
I have followed the guide on nuand wiki to set yatebts minimal configuration.
I'm connected on usb 2.0 and I changed the radio_read_priority to highest and radio_send_priority to high in the transceiver section on ybts.conf and increased priority on limits.conf to my actual user by setting
@admin hard nice -20
@admin hard rtprio 99

Anyway I have a phone that doesn't show me my IMSI so I'm not able to register it. Can I see my phone IMSI's without registering it?
Title: Re: Problems with libusb!!
Post by: marian on January 18, 2016, 09:13:13 AM
When registering to a new network the phone should do it with IMSI.

If ybts print_msg is enabled and debug at level 9 received GSM messages should be printed in console/log.
Location update should contain IMSI identity (I mean the phone should try to register using IMSI).

Other solution:
Check the [tapping] section in ybts.conf (if missing check ybts.conf.sample in source directory).
Set
[tapping]
GSM=yes
TargetIP=your_ip_to_run_wireshark_or_other_sniffer

This will enable GSM message tap on port 4729.
All messages will be sent there.
You can use Wireshark or other network sniffer to see sent/received GSM messages.
Title: Re: Problems with libusb!!
Post by: Jambo on January 20, 2016, 03:21:56 PM
I guess for now it's better not to use the wireshark solution...
I have both print_msg enabled and debug at level 9 (for mbts, ybts and transceiver modules) but no gsm messages seem to arrive neither on the console nor the log.

I can see my network from my phone but when I try to register to the network nothing happens..
I cannot see any messages from yate (connecting to localhost via telnet) about gsm connections (registration tries or something..).

Should I post something to you (configs or logs)?
Title: Re: Problems with libusb!!
Post by: marian on January 21, 2016, 01:37:39 AM
A yate log might help.
You should make some Wireshark capture of gsm. It shows gsm layer 2 stuff also. This might help also.
Title: Re: Problems with libusb!!
Post by: Jambo on January 25, 2016, 06:21:35 AM
I broke my nuand board!!  :( :( :(
As soon as I get a bladerf back I will try to do some capture with wireshark..
Anyway I knew there was a command for openbts that was like 'tmsi' or something for doing that instead of using wireshark ('cause I don't want to do illegal stuff by mistake)
I was guessing if there is an equivalent in yatebts..
Title: Re: Problems with libusb!!
Post by: Jambo on February 12, 2016, 03:09:52 AM
Ok so now that I got my nuand board back I tried yet again to get my phone connected to the network but it still doesn't work.
I tried to do the GSM tapping with wireshark but no messages seem to arrive on port 4729 neither tcp nor udp.
In addition I've got  a lot of timestamps jumps and adjustments.
A log can help maybe:
http://pastebin.com/5bNdxdiD (http://pastebin.com/5bNdxdiD)
Title: Re: Problems with libusb!!
Post by: marian on February 12, 2016, 03:29:06 AM
Try using a single ARFCN (your computer might not be fast enough to handle 4 ARFCNs).
Title: Re: Problems with libusb!!
Post by: Jambo on February 12, 2016, 03:37:42 AM
If you mean
Radio.ARFCNs=1
I setted this param on ybts.conf but same result.
Title: Re: Problems with libusb!!
Post by: marian on February 12, 2016, 03:40:24 AM
Don't use 4 ARFCNs for now.

Is the phone seeing the network?
Try using another frequency.
Title: Re: Problems with libusb!!
Post by: Jambo on February 12, 2016, 03:46:19 AM
Yes, the phone is seeing the network but I when i try to connect nothing happens and I have 'no network' on the phone.
How do I set a different frequency?
Title: Re: Problems with libusb!!
Post by: marian on February 12, 2016, 03:48:40 AM
see
Radio.Band
Radio.C0
Title: Re: Problems with libusb!!
Post by: Jambo on February 12, 2016, 04:22:56 AM
Tried with all GSM bands and much C0s..
I think anyway that I'm tied to GSM900 or, atmost, 1800.
Still gettin' nothing :(
Title: Re: Problems with libusb!!
Post by: Jambo on February 15, 2016, 05:58:28 AM
Still stuck here....
I don't know what to do more than this.
Title: Re: Problems with libusb!!
Post by: marian on February 15, 2016, 06:36:30 AM
Some more hints:
- Try connecting the board using USB 3 if possible. You should get rid of timestamp jumps)
- Try using another phone (it doesn't matter if location update succeeds: all you want to see if some message arriving from phone)
- Try to put some distance between phone and board (let's say about 5m)
- Make sure the angle between TX and RX antennas is about 90 degrees
Title: Re: Problems with libusb!!
Post by: Jambo on February 15, 2016, 07:27:13 AM
Some more hints:
- Try connecting the board using USB 3 if possible. You should get rid of timestamp jumps)
- Try using another phone (it doesn't matter if location update succeeds: all you want to see if some message arriving from phone)
- Try to put some distance between phone and board (let's say about 5m)
- Make sure the angle between TX and RX antennas is about 90 degrees

Tried:
- No USB 3.0 ports at the moment, so it's not possible
- Using another phone doesn't appear to grant anything
- Distance seems not to matter in this case
- Put TX and RX antennas in the right position

Nothing happens, as usual.
I'm starting to guess if the rx module of the antenna isn't broken, 'cause it seems like the only problem.
In second place I've already tried using bladeRF-cli and receiving samples and it actually does work with this configuration.
Really weird.... :/
Title: Re: Problems with libusb!!
Post by: Jambo on February 16, 2016, 08:29:10 AM
I don't know if this matters, but I've followed this page:
http://wiki.yatebts.com/index.php/Calibrate_the_radio_board (http://wiki.yatebts.com/index.php/Calibrate_the_radio_board)

and I've noticed that my board (with the mbts rxgain command) cannot go above 30 dB.
I mean, if I run:
Code: [Select]
mbts rxgain 45I get:
Code: [Select]
current rxgain is 0 dB
new RX gain is 30 dB

I've also tried to follow this link:
https://github.com/Nuand/bladeRF/wiki/DC-offset-and-IQ-Imbalance-Correction (https://github.com/Nuand/bladeRF/wiki/DC-offset-and-IQ-Imbalance-Correction)
with an error when I try
Code: [Select]
cal lmsonce loaded FPGA and I get
Code: [Select]
[WARNING @ lms.c:2997] DC Calibration (module=3) failed to converge.
I've also noticed that if I try to set
Code: [Select]
set rxvga2 8it doesn't allow me to set values higher than 6 dB.

Can this help with my problem?

Thanks in advance.
Title: Re: Problems with libusb!!
Post by: marian on February 17, 2016, 01:54:14 AM
Properly calibrating the board would help to have a cleaner signal.
It won't help with your issue.
On earlier log I noticed the transceiver dropped almost all bursts due to low SNR (signal to noise ratio):
ARFCN[0]: Radio power off. RX: bursts=820604 passed=2 (0.00%) dropped=820602 (100.00%) (LowSNR=820500 LowPeakMin=19 LowPower=82 NullRMS=1) ellapsed=473sec avg=1734.89 bursts/sec

Try setting in ybts.conf
[transceiver]
snr_threshold=4

If not working try a greater value.
Most probably the bursts are not ok, but let see what happens...
Title: Re: Problems with libusb!!
Post by: Jambo on February 18, 2016, 09:49:25 AM
I tried to reconfigure ybts.conf in the proper way and I've managed to gsmtap packets to wireshark.
Actually this does work but I'm not able to understand what happens with GSMTAP packets on localhost.
Should I give you a sample of it?

I've set snr_threshold to 4, 10, 100, 400 but nothing changes.
Anyway what do you specifically mean by 'bursts' and why they're 'not ok'?
Why does this antenna seem to drop them all?
The last try I made I got this:
Code: [Select]
2016-02-18_16:45:28.829099 <gsmtrx:NOTE> ARFCN[0]: Radio power off. RX: bursts=16754 passed=0 (0.00%) dropped=16754 (100.00%) (LowSNR=16754) ellapsed=9sec avg=1861.56 bursts/sec [0xb670ad08]
Title: Re: Problems with libusb!!
Post by: marian on February 19, 2016, 02:02:22 AM
Can you dump some raw data received from the board?
Just to take a look at it.

Start YateBTS.
Wait a minute.

In telnet console type:
output on
control <device_name> bufoutput tx=false count=20

Type control and then <tab> to let the module complete the device name (usually bladerf/1).
Wait for another minute and repeat the command.

This will output the raw buffer data read from device.
Please post it here.
Title: Re: Problems with libusb!!
Post by: Jambo on February 29, 2016, 10:44:17 AM
Thanks marian for the reply.
Here's the output of the command with bladerf/1 as device.

http://pastebin.ca/3384950 (http://pastebin.ca/3384950)

I think raw data can be seen. What now?
Title: Re: Problems with libusb!!
Post by: marian on March 01, 2016, 02:11:03 AM
Something is wrong with the data.
I'm not a radio engineer but:
The values are 'linear'.
As you can see the samples have almost the same value.
Something is wrong with the board.
Title: Re: Problems with libusb!!
Post by: Jambo on March 24, 2016, 04:02:26 AM
Ok, thank you for the reply anyway.
I was guessing if I'm wrong though because I'm trying to connect my phone but my sim's not unlocked.
Could this be the problem?
And if so, is there a way to see my phone's Location Update routine anyway?
(I mean, is there a way to find my phone's IMSI even if I cannot accept it/the phone cannot register to the network?)
Title: Re: Problems with libusb!!
Post by: marian on March 24, 2016, 04:08:02 AM
In a working scenario you may enable debug on ybts module.
ybts.conf, section [ybts]
print_msg=yes

This will show received messages.
You may see the IMSI in Location Update or Identity Response messages.
Title: Re: Problems with libusb!!
Post by: andrew77 on April 25, 2016, 01:50:08 PM
Ciao Jambo,

ho visto solo ora il tuo messaggio
puoi scrivermi al mio indirizzo di posta personale:
ag001@inwind.it

Andrea


Title: Re: Problems with libusb!!
Post by: afk on November 28, 2017, 03:43:35 AM
Hello Jambo,

Please try from rmanager (telnet 0 5037) to set 'debug ybts level 9'
It will give you information about the subscriber that wants to attach to the BTS. (There you will have an <imsi> </imsi> field containing the IMSI)

Title: Re: Problems with libusb!!
Post by: david.burgess on November 29, 2017, 06:50:59 AM
The timestamp jumps usually mean that the CPU is not keeping up with the radio signal. If they are not too severe, YateBTS will still work. If your phone sees the beacon, then it might be OK. You say "a lot" of timestamp jumps? How often do they happen?