I have been looking at the Legato Modem Radio Control API reference, various parameters can be obtained but I don’t see the working radio bit rate. Is there a Legato call for this or an AT command I can call programmatically? Thanks.
How about le_mdc_GetBytesCounters()?
You can also see here on how to send AT command in program
Or you can directly open /dev/ttyAT port in your program
Thanks for the response, there is a lot of useful info returned from the le_mdc* calls and AT!LTEINFO, however I don’t see the data rate specifically, le_mdc_GetBytesCounters() actually returns the count of bytes sent, not the data rate. Is there are call or command to get it or is it not available?
Didn’t you can calculate the average rate once you have the number of bytes?
I was interested in getting the modem data rate before any transmission. There doesn’t seem to be a way to get this directly, although it looks like an estimate can be obtained using bandwidth, SNR etc. and comparing to previous benchmarks.
Hello @piinst,
Could you please first confirm that your underlying need is to enable/disable some services implemented by your Legato Apps, depending on the current mobile data throughput.
KR.
Thanks for the response. No it’s not about enabling or disabling services, it’s just getting an estimate of what the data throughput will be (before any transmission) for the benefit of the originating application.
At this point it appears I can execute AT!LTEINFO and try to use the returned parameters to obtain an estimate. This would require running tests with varying cellular quantity, measuring the throughput, and then fitting the LTEINFO returned parameters into some function returning throughput.
Hello @piinst,
I understand that your intention is to: perform several data rate measurements, collect the results into a dataset, find out the formula that can predict the data rate from AT!LTEINFO outputs. (BTW, I would recommend using AT!GSTATUS instead of AT!LTEINFO to support the different RATs.)
For this measurements phase, you could also rely on Legato DataHub and Octave to:
- perform N periodic measurements of such device data: {current date/time; current RAT; current cell identity; other radio parameters; current data rate}
- forward the resulting dataset to Octave
- run an Octave Cloud Action that would post this dataset to a 3rd-party cloud service
then, have this 3rd-party service:
- doing machine learning, i.e. learn {data rate} from {current date/time; current RAT; current cell identity}
- returning a fitted model/estimator to your Octave cloud action
- have your Octave cloud action sending the model down to your device(s)
Then, your device(s) would:
- run the model before starting any mobile data connection, to predict the {estimated data rate} from {current date/time; current RAT; current cell identity}
- repeat the measurement phase every N weeks, to be aware and benefit from potential throughput improvements on cellular network(s) side
KR.
Thanks for your detailed reply, that will be very helpful.