Can't select LimeSDR by serial number
I'm trying to set LimeSDR for using with osmo-trx. I have 2 devices plugged. I set serial number in osmo-trx.cfg, however osmo-trx-lms always get the first one.
My config looks like:
log stderr logging filter all 1 logging color 1 logging print category 1 logging timestamp 1 logging print file basename logging level set-all info ! line vty no login ! trx bind-ip 127.0.0.1 remote-ip 127.0.0.1 base-port 5700 egprs disable dev-args serial=0009070105C6170B // I also tried to add just serial but no changes tx-sps 4 rx-sps 4 rt-prio 18 chan 0 tx-path BAND1 rx-path LNAW
Check LMSDevice::open in ./Transceiver52M/device/lms/LMSDevice.cpp, "args" is passed there as a string.
What I would do: accept in VTY same format as we use for osmo-trx-uhd, for instance: "LimeSDR-USB,addr=1d50:6108,serial=0009060B00471827"
Then, create a function which splits each token into an vector of strings (comma is the separator).
Then, for each lms_info_str_t returned in LMS_GetDeviceList(info_list), check if all strings coming from the generated vector can be found as substrings of that lms_info_str_t. If that's the case, return that one.
Modify the call to LMS_Open() to use the returned lms_info_str_t instead of info_list0.
- % Done changed from 10 to 90
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
Patch submitted in https://gerrit.osmocom.org/#/c/osmo-gsm-tester/+/13150/ uses it in osmo-gsm-tester.