FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_app/ffs/board/pcmdata.c @ 636:57e67ca2e1cb
pcmdata.c: default +CGMI to "FreeCalypso" and +CGMM to model
The present change has no effect whatsoever on Falconia-made and Openmoko-made
devices on which /pcm/CGMI and /pcm/CGMM files have been programmed in FFS
with sensible ID strings by the respective factories, but what should AT+CGMI
and AT+CGMM queries return when the device is a Huawei GTM900 or Tango modem
that has been converted to FreeCalypso with a firmware change? Before the
present change they would return compiled-in defaults of "<manufacturer>" and
"<model>", respectively; with the present change the firmware will self-identify
as "FreeCalypso GTM900-FC" or "FreeCalypso Tango" on the two respective targets.
This firmware identification will become important if someone incorporates an
FC-converted GTM900 or Tango modem into a ZeroPhone-style smartphone where some
high-level software like ofono will be talking to the modem and will need to
properly identify this modem as FreeCalypso, as opposed to some other AT command
modem flavor with different quirks.
In technical terms, the compiled-in default for the AT+CGMI query (which will
always be overridden by the /pcm/CGMI file in FFS if one is present) is now
"FreeCalypso" in all configs on all targets; the compiled-in default for the
AT+CGMM query (likewise always overridden by /pcm/CGMM if present) is
"GTM900-FC" if CONFIG_TARGET_GTM900 or "Tango" if CONFIG_TARGET_TANGO or the
original default of "<model>" otherwise.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 19 Jan 2020 20:14:58 +0000 |
parents | 945cf7f506b2 |
children |
comparison
equal
deleted
inserted
replaced
635:baa0a02bc676 | 636:57e67ca2e1cb |
---|---|
24 | 24 |
25 #if (TARGET == 1) | 25 #if (TARGET == 1) |
26 #include "rv/general.h" | 26 #include "rv/general.h" |
27 #include "swconfig.cfg" | 27 #include "swconfig.cfg" |
28 #include "sys.cfg" | 28 #include "sys.cfg" |
29 #include "fc-target.h" | |
29 #endif | 30 #endif |
30 | 31 |
31 #include "ffs/pcm.h" | 32 #include "ffs/pcm.h" |
32 | 33 |
33 | 34 |
485 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | 486 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
486 | 487 |
487 /******************************************************************** | 488 /******************************************************************** |
488 * Field MANUFACTURER - CGMI | 489 * Field MANUFACTURER - CGMI |
489 ********************************************************************/ | 490 ********************************************************************/ |
490 #if (OP_WCP == 1) | 491 #if 1 |
491 'T', 'e', 'x', 'a', 's', ' ', 'I', 'n', | 492 'F', 'r', 'e', 'e', 'C', 'a', 'l', 'y', |
492 's', 't', 'r', 'u', 'm', 'e', 'n', 't', | 493 'p', 's', 'o', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
493 's', 0xFF, 0xFF, 0xFF, | 494 0xFF, 0xFF, 0xFF, 0xFF, |
494 #else | 495 #else |
495 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | 496 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', |
496 't', 'u', 'r', 'e', 'r', '>', 0xFF, 0xFF, | 497 't', 'u', 'r', 'e', 'r', '>', 0xFF, 0xFF, |
497 0xFF, 0xFF, 0xFF, 0xFF, | 498 0xFF, 0xFF, 0xFF, 0xFF, |
498 #endif | 499 #endif |
500 | |
499 /******************************************************************** | 501 /******************************************************************** |
500 * Field IDENTIFICATION INFORMATION - INF0 | 502 * Field IDENTIFICATION INFORMATION - INF0 |
501 ********************************************************************/ | 503 ********************************************************************/ |
502 // Record 1 | 504 // Record 1 |
503 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', | 505 '<', 'm', 'a', 'n', 'u', 'f', 'a', 'c', |
510 0xFF, 0xFF, 0xFF, 0xFF, | 512 0xFF, 0xFF, 0xFF, 0xFF, |
511 | 513 |
512 /******************************************************************** | 514 /******************************************************************** |
513 * Field MODEL - CGMM | 515 * Field MODEL - CGMM |
514 ********************************************************************/ | 516 ********************************************************************/ |
515 #if (OP_WCP == 1) | 517 #ifdef CONFIG_TARGET_GTM900 |
516 'O', 'M', 'A', 'P', '7', '1', '0', 0xFF, | 518 'G', 'T', 'M', '9', '0', '0', '-', 'F', |
519 'C', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
520 0xFF, 0xFF, 0xFF, 0xFF, | |
521 #elif defined(CONFIG_TARGET_TANGO) | |
522 'T', 'a', 'n', 'g', 'o', 0xFF, 0xFF, 0xFF, | |
517 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | 523 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
518 0xFF, 0xFF, 0xFF, 0xFF, | 524 0xFF, 0xFF, 0xFF, 0xFF, |
519 #else | 525 #else |
520 '<', 'm', 'o', 'd', 'e', 'l', '>', 0xFF, | 526 '<', 'm', 'o', 'd', 'e', 'l', '>', 0xFF, |
521 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | 527 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
523 #endif | 529 #endif |
524 | 530 |
525 /******************************************************************** | 531 /******************************************************************** |
526 * Field REVISION - CGMR | 532 * Field REVISION - CGMR |
527 ********************************************************************/ | 533 ********************************************************************/ |
528 #if (OP_WCP == 1) | |
529 '1', '4', '0', '.', '5', '4', '2', '.', | |
530 '8', '2', '7', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
531 0xFF, 0xFF, 0xFF, 0xFF, | |
532 #else | |
533 '<', 'r', 'e', 'v', 'i', 's', 'i', 'o', | 534 '<', 'r', 'e', 'v', 'i', 's', 'i', 'o', |
534 'n', '>', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | 535 'n', '>', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, |
535 0xFF, 0xFF, 0xFF, 0xFF, | 536 0xFF, 0xFF, 0xFF, 0xFF, |
536 #endif | 537 |
537 /******************************************************************** | 538 /******************************************************************** |
538 * Field PRODUCT SERIAL NUMBER - CGSN | 539 * Field PRODUCT SERIAL NUMBER - CGSN |
539 ********************************************************************/ | 540 ********************************************************************/ |
540 '<', 's', 'e', 'r', 'i', 'a', 'l', ' ', | 541 '<', 's', 'e', 'r', 'i', 'a', 'l', ' ', |
541 'n', 'u', 'm', 'b', 'e', 'r', '>', 0xFF, | 542 'n', 'u', 'm', 'b', 'e', 'r', '>', 0xFF, |