RF calibration

2017-03-11 Thread Mychaela Falconia
Hello again everyone,

Thanks to a recent donation of 3 non-sellable Openmoko GTA02 units
(supposedly defective, although I haven't really noticed the presumed
defects) from Openmoko seller Christoph Pulster, I now have a total of
4 GTA02s including my original one, and I have read Calypso flash
dumps from all of them.  As a side note, if you are performing
low-level operations on the GTA02's Calypso block where you don't need
the internal UART or audio channels, you can do these operations from
the always-present NOR U-Boot without depending on any higher-level
software in the phone's NAND flash: just get into the NOR U-Boot,
connect USB, run your favourite terminal program on /dev/ttyACM0 that
should appear on your host while the FR is in U-Boot, give it a
'setenv boot_menu_timeout 3600' command to keep it from powering off
on its own, and then use the 'neo gsm on' and 'neo gsm off' U-Boot
commands to turn the modem on and off.  These commands also enable the
secondary Calypso serial channel on the headset jack, hence you can
use that channel to poke at the modem.  Om's factory must have used
this method for their initial fw loading and RF calibration, but if
you load one of the newer (post-leo2moko) FC fw versions that have the
AT-over-RVTMUX extension, you can also issue AT commands this way -
just not CSD or GPRS, and there is no way to get to the voice audio
channel in this arrangement.

Anyways, so I have used this NOR U-Boot trick to read Calypso flash
dumps from the 3 new GTA02s I just acquired, and now we have a total
of 6 examples of per-unit RF calibration values: 4 samples from the 4
GTA02 units in my hands, plus the ones which community members David
and Giacomo sent me back in 2014.

The RF calibration values are stored in the modem's flash file system
in binary form, but I recently wrote a utility that converts them from
binary into an ASCII text representation that is both human- and
machine-readable; the ASCII-based format emitted by this converter is
the same as that which I implemented in fc-tmsh for sending RF tables
to or reading such tables from live firmwares in Test Mode operation
with rftw, rftr, ttw and ttr commands.

I have just put out a tarball containing all 6 GTA02 RF calibration
samples plus the firmware's compiled-in defaults in the readable ASCII
text form:

ftp://ftp.freecalypso.org/pub/GSM/GTA02/rfcal-examples.tar.gz

If you are curious about per-unit RF calibration on Calypso phones and
modems, i.e., curious as to exactly what varies from one unit to the
next and the magnitude of these differences, I encourage you to
download the above tarball and look inside - it's all readable ASCII
text files (mostly tables of numbers) inside, no binary files.

I am still waiting for that CMU200 from ebay before we can do our own
RF calibration - at this point it is uncertain what will arrive first,
this CMU200 or our own FCDEV3B boards.  If I receive the CMU200 before
we have the FCDEV3B, I'll try connecting the CMU200 to the RF test port
on the Openmoko-made GTA02s I have (accessible with the back cover off,
just like the battery and the SIM and uSD slots), and see if I can
recreate any of the factory calibration steps.

Hasta la Victoria, Siempre!
___
Community mailing list
Community@freecalypso.org
https://www.freecalypso.org/mailman/listinfo/community


FreeCalypso RF calibration revisited

2017-08-13 Thread Mychaela Falconia
Hello FreeCalypso community,

Earlier this week I gave the go-ahead to Technotronix to assemble the
next batch of FCDEV3B boards.  They told me that the assembly price
would be the same whether we do all 12 remaining boards at once or
just another 8 at first and then the remaining 4, so I told them to do
another 8 boards for now.

These new boards are expected to be done some time in late August or
early September, and I have been working on the automated production
test, batch programming and calibration software for our FreeCalypso
device production line: when the boards first arrive from Technotronix,
they are naturally untested, and we absolutely need an automated and
efficient way to program them with the current production firmware
image, verify that they boot correctly, initialize their FFS and run
the RF calibration procedure with the CMU200 that exercises the RF
tract in both directions for each band.  For the first batch of our
boards I did all of these steps manually as I reconstructed the lost
theory and developed new tools for each calibration step, but it is
now time for proper production line automation.

The software used on the FreeCalypso device production line currently
consists of 3 parts:

1) The same regular FC host tools which are used by our community
firmware tinkerers and empowered end users, i.e., fc-loadtool to
program the fw image and erase any previous garbage, rvinterf to talk
to the newly made board as it boots for the first time, fc-fsio to
format and initialize its FFS and set its IMEI etc;

2) FreeCalypso RF calibration tools (fc-rfcal-tools) to perform all of
the RF calibration steps that require the CMU200, also serving as a
pass/fail test for the RF tract;

3) An in-house FC production shell (fc-prod-shell) that does little
more than invoke all of the previously listed programs in the right
order; this fc-prod-shell produces a sufficiently high-level operator
interface so that the duties of the FC production line operator can be
performed by someone who does not necessary know FreeCalypso innards
and does not even need any real Unix/Linux command line skills.

Part 3 (the streamlined shell for minimally-skilled production line
operators) will remain internal to my family company for the time
being, as there is absolutely nothing that anyone could possibly do
with this software except set up a competing production factory, and
it does not do anything which you couldn't trivially do by simply
invoking the right tools from the fc-host-tools and fc-rfcal-tools
suites.  However, part 2 (fc-rfcal-tools) is now public:

https://bitbucket.org/falconian/fc-rfcal-tools

While I am not too happy about the possibility that our Iranian
"friends" (the ones who made their own bastardized derivative of
Openmoko's GTA02 while constantly striving to bypass and undercut the
FreeCalypso core team at every step instead of working with us) may
take this software and use it toward their purely self-serving ends
without contributing anything back to our community, I feel that we
have reached the point where the value of having the community review
this code and possibly help the FC production team with our needs
outweighs the negative of making it easier for the Iranians to screw
us.  Hence the public release I just made.

The primary purpose of fc-rfcal-tools software is to be used on the
FreeCalypso device production line to test and calibrate the devices
we make and sell, and it absolutely requires a R&S CMU200 RF test
machine to do anything useful - if you don't have a CMU200, all you
can do with this sw is stare at the source code and adore its beauty. :)

However, if someone does have the needed R&S CMU200, there are, at
least hypothetically, some potential legitimate use cases for the
fc-rfcal-tools software besides setting up a competing device
production factory:

* There exists a slight possibility (unknown to me if such a thing
ever happened in reality, but it is at least hypothetically possible)
that some hapless Openmoko FreeRunner (or even GTA01) user may have
ruined their FFS through careless playing with modem flashing software,
especially in pre-FreeCalypso days when this modem was treated as a
"thou shalt not enter" forbidden zone and modem flashing software
(TI's FLUID, running under Windows) was only available on a hush-hush,
whisper-whisper basis.  Any FC community member (not just me) should
be empowered to open a repair service bureau that can recalibrate
Openmoko devices among other services.

* Back in the days when non-smart cellphones were repaired rather than
discarded, it appears that some of those repair service centers had
CMU200 stations for recalibration.  It is conceivable that some of the
RF calibration parameters may drift over time, thus once again a
repair service bureau offering recalibration may be a perfectly
legitimate offering.

* There are some alien Calypso devices (not made by us or by our
pred

Re: FreeCalypso RF calibration revisited

2017-08-18 Thread Das Signal
Hi Mychaela,

Thank you for this update, and for sharing the calibration tools with
the community.

I have a question regarding the RF power readings: is it possible that
a 0.5 dB difference would not be a problem, that is, provide calibration
values still within spec? I was looking at the following TS
http://www.etsi.org/deliver/etsi_gts/05/0505/05.00.00_60/gsmts_0505v05p.pdf

In section 4 (Transmitter characteristics) / 4.1 (Output power) /
4.1.1 (Mobile station) a table lists the tolerance in dB which is 2 dB
in normal conditions and 2.5 db in extreme conditions for the maximum
power level. Then tolerance goes up, to 5 dB (normal) / 5 dB (extreme)
for the minimum power level (19, 5 dBm for GSM900 / 15, 0 dBm for 1800).

--DS
___
Community mailing list
Community@freecalypso.org
https://www.freecalypso.org/mailman/listinfo/community


Re: FreeCalypso RF calibration revisited

2017-08-18 Thread Mychaela Falconia
Hi DS!

Thank you for your observation regarding Tx power level tolerances.  I
am of course aware of the GSM 05.05 spec and of the quite generous
tolerances it gives.  However, take a look at the table on page 26 of
this ancient TI document:

ftp://ftp.freecalypso.org/pub/GSM/Calypso/rf_calibration.pdf

And at Table 4.8 on page 44 of this more recent TI document:

https://www.freecalypso.org/LoCosto-docs/Production%20test%20and%20calibration/i_sample_rf_test_and_calibration_13_03_04_01991%20-%20v026.pdf

Notice how in both cases TI had set the calibration target for the
highest power level in each band to less than the spec value.  For the
low frequency bands the top power level per the spec is 33 dBm, but TI
had their target set to 31.8 dBm in the earlier days and to 32.2 dBm
on the I-Sample (LoCosto).  For the high frequency bands, the
respective numbers are 30 dBm per the spec, 28.8 dBm in TI's old stuff
and 29.2 dBm on LoCosto.

When I was developing the Tx calibration code in fc-rfcal-tools, I
quickly saw why this reduction in the top calibration target number is
necessary.  There is a limit to how much output power the DUT can
produce, and once this limit is reached, one cannot get any more dBm
out no matter how high the APC DAC is set.  If the automated Tx
calibration program is given a calibration target number that is
higher than what the DUT can produce (whether it be a true DUT hw
limitation or a result of errors in the measurement setup), the
process will go haywire, hence the automated calibration program needs
to be given attainable target numbers, even if they have to be shifted
down a little from the ideal numbers given in the spec.

But the question for FreeCalypso device production is: what target
numbers should we use on *our* production line?  Should we use the
1.2 dB reduction in the top power level with 0.5 dB reduction in the
next one down like the ancient Sara document says and like FIC
(Openmoko's factory) appear to have done, or can we get a little
closer to the ideal and only reduce the top calibration target by
0.8 dB like TI did for LoCosto?

Whatever numbers I eventually decide on, I will need to be able to
justify them, and I would really like to be able to give a better
justification than "my CMU200 is out of calibration, I don't know if
the numbers it gives me are the real truth or not, I don't have the
money to get it properly calibrated, so I just set my txlevels targets
so that fc-rfcal-txband gives the appearance of passing in my setup".

The good news is that getting my CMU200 properly calibrated may be
more affordable than I previously thought.  I was told earlier by some
suit that it could cost somewhere around 15 kUSD, but then a different
person who appears to be quite a bit more knowledgeable about CMU200
instruments in particular as opposed to "general test & measurement
industry" told me that:

a) the cost was about $1600 the last time he checked, and

b) the only trustworthy shop to do this calibration would be R&S
themselves; for people like me who are based in USA-occupied Incalia,
R&S have a service facility on the East Coast of this continent.
Because I am on the opposite coast, careful packing and shipping of
the instrument will be required.

I have not yet tried calling R&S USA and asking them if the ~$1600
price to fully recalibrate a CMU200 is accurate - instead I figured
that I should save up the $1600 first, and when I have that much
money, start making more serious inquiries.  Because of some upcoming
family expenses, I probably won't start making those serious inquiries
into getting my CMU200 calibrated until the spring of 2018, and until
then I will have to ship FCDEV3B boards with Tx calibration that
merely *appears* to be spot-on in my setup - but like DS pointed out,
the GSM 05.05 spec tolerances are so generous that my current lousy
calibration is almost certainly within those tolerances.

M~
___
Community mailing list
Community@freecalypso.org
https://www.freecalypso.org/mailman/listinfo/community