Hi all, I am trying to have some OsmocomBB communication and my procedure is following : 1) I start osmocon with layer1 sw : ./osmocon -p /dev/ttyUSB1 -m c123xor ../../target/firmware/board/compal_e88/layer1.compalram.bin It now waits for power on button from the phone 2) In the other terminal I start mobile application :
./mobile -i 127.0.0.1 Copyright (C) 2008-2010 ... Contributions by ...
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
VTY available on port 4247. No Mobile Station defined, creating: MS '1' <000e> sim.c:1206 init SIM client <0005> gsm48_cc.c:61 init Call Control <0001> gsm48_rr.c:4944 init Radio Ressource process <0004> gsm48_mm.c:1220 init Mobility Management process <0004> gsm48_mm.c:971 Selecting PLMN SEARCH state, because no SIM. <0002> gsm322.c:3472 init PLMN process <0003> gsm322.c:3473 init Cell Selection process Mobile '1' initialized, please start phone now!
3) Now I press a "power-on" button on the phone and I have logs comming out on the both terminals. I guess that MS is doing various cell power measurements and trying to discass with near-by cells over controle channels.
However, in ./osmocon terminal it finishes like this : $ ./osmocon -p /dev/ttyUSB1 -m c123xor ../../target/firmware/board/compal_e88/layer1.compalram.bin got 1 bytes from modem, data looks like: 00 . got 1 bytes from modem, data looks like: 00 . got 1 bytes from modem, data looks like: 81 . got 4 bytes from modem, data looks like: 1b f6 02 00 .... got 1 bytes from modem, data looks like: 41 A got 1 bytes from modem, data looks like: 01 . got 1 bytes from modem, data looks like: 40 @ Received PROMPT1 from phone, responding with CMD read_file(../../target/firmware/board/compal_e88/layer1.compalram.bin): file_size=47700, hdr_len=4, dnload_len=47707 got 1 bytes from modem, data looks like: 1b . got 1 bytes from modem, data looks like: f6 . got 1 bytes from modem, data looks like: 02 . got 1 bytes from modem, data looks like: 00 . got 1 bytes from modem, data looks like: 41 A got 1 bytes from modem, data looks like: 02 . got 1 bytes from modem, data looks like: 43 C Received PROMPT2 from phone, starting download handle_write(): 1023 bytes (1023/47707) handle_write(): 768 bytes (1791/47707) handle_write(): 768 bytes (2559/47707) handle_write(): 768 bytes (3327/47707) ... handle_write(): 768 bytes (44031/47707) handle_write(): 768 bytes (44799/47707) handle_write(): 768 bytes (45567/47707) handle_write(): 768 bytes (46335/47707) handle_write(): 768 bytes (47103/47707) handle_write(): 604 bytes (47707/47707) handle_write(): finished got 1 bytes from modem, data looks like: 1b . got 1 bytes from modem, data looks like: f6 . got 1 bytes from modem, data looks like: 02 . got 1 bytes from modem, data looks like: 00 . got 1 bytes from modem, data looks like: 41 A got 1 bytes from modem, data looks like: 03 . got 1 bytes from modem, data looks like: 42 B Received DOWNLOAD ACK from phone, your code is running now!
OSMOCOM Layer 1 (revision osmocon_v0.0.0-884-gd76345a) ====================================================================== Device ID code: 0xb4fb Device Version code: 0x0000 ARM ID code: 0xfff3 cDSP ID code: 0x0128 Die ID code: 2c903414df039b3f ====================================================================== REG_DPLL=0x2413 CNTL_ARM_CLK=0xf0a1 CNTL_CLK=0xff91 CNTL_RST=0xfff3 CNTL_ARM_DIV=0xfff9 ======================================================================
THIS FIRMWARE WAS COMPILED WITHOUT TX SUPPORT!!! Assert DSP into Reset Releasing DSP from Reset Setting some dsp_api.ndb values Setting API NDB parameters DSP Download Status: 0x0001 DSP API Version: 0x0000 0x0000 Finishing download phase DSP Download Status: 0x0002 DSP API Version: 0x3606 0x0000 LOST 1201! L1CTL_RESET_REQ: FULL!L1CTL_PM_REQ start=0 end=124 PM MEAS: ARFCN=0, 32 dBm at baseband, -105 dBm at RF PM MEAS: ARFCN=0, 32 dBm at baseband, -105 dBm at RF ... PM MEAS: ARFCN=98, 36 dBm at baseband, -101 dBm at RF PM MEAS: ARFCN=99, 39 dBm at baseband, -98 dBm at RF PM MEAS: ARFCN=100, 31 dBm at baseband, -106 dBm at RF PM MEAS: ARFCN=101, 30 dBm at baseband, -107 dBm at RF PM MEAS: ARFCN=110, 36 dBm at baseband, -101 dBm at RF PM MEAS: ARFCN=111, 34 dBm at baseband, -103 dBm at RF PM MEAS: ARFCN=112, 31 dBm at baseband, -107 dBm at RF PM MEAS: ARFCN=113, 33 dBm at baseband, -104 dBm at RF ...
L1CTL_PM_REQ start=955 end=1023 PM MEAS: ARFCN=955, 26 dBm at baseband, -111 dBm at RF PM MEAS: ARFCN=955, 26 dBm at baseband, -111 dBm at RF PM MEAS: ARFCN=956, 27 dBm at baseband, -110 dBm at RF PM MEAS: ARFCN=957, 26 dBm at baseband, -111 dBm at RF PM MEAS: ARFCN=958, 27 dBm at baseband, -110 dBm at RF PM MEAS: ARFCN=959, 25 dBm at baseband, -112 dBm at RF
...
PM MEAS: ARFCN=1020, 37 dBm at baseband, -100 dBm at RF PM MEAS: ARFCN=1021, 41 dBm at baseband, -96 dBm at RF PM MEAS: ARFCN=1022, 31 dBm at baseband, -106 dBm at RF PM MEAS: ARFCN=1023, 42 dBm at baseband, -95 dBm at RF L1CTL_RESET_REQ: FULL!L1CTL_FBSB_REQ (arfcn=121, flags=0x7) Starting FCCH RecognitionFB0 (1735:8): TOA= 9600, Power= -52dBm, Angle= 1218Hz FB1 (1745:8): TOA= 9563, Power= -52dBm, Angle= 174Hz fn_offset=1744 (fn=1745 + attempt=8 + ntdma = 7)m delay=9 (fn_offset=1744 + 11 - fn=1745 - 1 scheduling next FB/SB detection task with delay 9 =>FB @ FNR 1744 fn_offset=1744 qbits=3068 Synchronize_TDMA LOST 3054!
What would this LOST 3054! say ? It does not sound good anyway, but at this point I am not skilled enough to read OsmocomBB logs.
On the other side, in the ./mobile terminal I have something like this :
<0002> gsm322.c:3099 (ms 1) Event 'EVENT_SWITCH_ON' for automatic PLMN selection in state 'A0 null' <000d> gsm322.c:1056 SIM is removed <0002> gsm322.c:1057 SIM is removed <0002> gsm322.c:512 new state 'A0 null' -> 'A6 no SIM inserted' <0003> gsm322.c:3319 (ms 1) Event 'EVENT_SWITCH_ON' for Cell selection in state 'C0 null' <0003> gsm322.c:2992 Switch on without SIM. <0003> gsm322.c:541 new state 'C0 null' -> 'C6 any cell selection' <0003> gsm322.c:2405 Getting PM for frequency 0 twice. Overwriting the first! Please fix prim_pm.c <0003> gsm322.c:2416 Found signal (frequency 2 rxlev -105 (5)) <0003> gsm322.c:2416 Found signal (frequency 3 rxlev -106 (4)) <0003> gsm322.c:2416 Found signal (frequency 4 rxlev -86 (24)) <0003> gsm322.c:2416 Found signal (frequency 5 rxlev -68 (42)) <0003> gsm322.c:2416 Found signal (frequency 6 rxlev -86 (24)) ... <0003> gsm322.c:2405 Getting PM for frequency 512 twice. Overwriting the first! Please fix prim_pm.c <0003> gsm322.c:2416 Found signal (frequency 512 rxlev -93 (17)) <0003> gsm322.c:2416 Found signal (frequency 516 rxlev -90 (20)) ... <0003> gsm322.c:2416 Found signal (frequency 1023 rxlev -95 (15)) <0003> gsm322.c:2349 Found 201 frequencies. <0003> gsm322.c:258 Sync to ARFCN=121 rxlev=-54 (No sysinfo yet, ccch mode NONE) <0002> gsm322.c:3099 (ms 1) Event 'EVENT_USER_RESEL' for automatic PLMN selection in state 'A6 no SIM inserted'
Can somebody explain me what the hell is happening here ?
I am watching all these nice Harald's presentations, like one here : http://www.youtube.com/watch?v=H7rNKZdASBE, but I am not obtaining list of cells like presented to which I can synchronize to. Actually, show cell is giving me :
OsmocomBB> show cell 1 arfcn |MCC |MNC |LAC |cell ID|forb.LA|prio |min-db |max-pwr|rx-lev -------+-------+-------+-------+-------+-------+-------+-------+-------+-------
OsmocomBB>
As you can see, I am pretty much lost here and I would highly appreciate helping hand.
Thanks and best regards, Drasko
On Mon, 2011-05-30 at 23:41 +0200, Drasko DRASKOVIC wrote: ...
OSMOCOM Layer 1 (revision osmocon_v0.0.0-884-gd76345a)
Device ID code: 0xb4fb Device Version code: 0x0000 ARM ID code: 0xfff3 cDSP ID code: 0x0128 Die ID code: 2c903414df039b3f ====================================================================== REG_DPLL=0x2413 CNTL_ARM_CLK=0xf0a1 CNTL_CLK=0xff91 CNTL_RST=0xfff3 CNTL_ARM_DIV=0xfff9 ======================================================================
THIS FIRMWARE WAS COMPILED WITHOUT TX SUPPORT!!!
You might want to compile with transmit support if you expect to be able to make calls and so forth, its explained on the wiki ;)
...
L1CTL_RESET_REQ: FULL!L1CTL_FBSB_REQ (arfcn=121, flags=0x7) Starting FCCH RecognitionFB0 (1735:8): TOA= 9600, Power= -52dBm, Angle= 1218Hz FB1 (1745:8): TOA= 9563, Power= -52dBm, Angle= 174Hz fn_offset=1744 (fn=1745 + attempt=8 + ntdma = 7)m delay=9 (fn_offset=1744 + 11 - fn=1745 - 1 scheduling next FB/SB detection task with delay 9 =>FB @ FNR 1744 fn_offset=1744 qbits=3068 Synchronize_TDMA LOST 3054!
What would this LOST 3054! say ? It does not sound good anyway, but at this point I am not skilled enough to read OsmocomBB logs.
That's fine/normal.
...
PLMN selection in state 'A6 no SIM inserted'
Can somebody explain me what the hell is happening here ?
No SIM inserted ;)
You have 3 options: 1. Check out sylvain's testing branch for a working on-phone SIM driver 2. Use the SAP interface to a PC/SC smartcard reader with SIM inserted. 3. If you want to use GSM test set instead of real network, use test sim functionality of mobile
See the 'sim' commands in mobile vty interface, and also try looking around with enable; configure terminal; ms 1
I am watching all these nice Harald's presentations, like one here : http://www.youtube.com/watch?v=H7rNKZdASBE, but I am not obtaining list of cells like presented to which I can synchronize to. Actually, show cell is giving me :
OsmocomBB> show cell 1 arfcn |MCC |MNC |LAC |cell ID|forb.LA|prio |min-db |max-pwr|rx-lev -------+-------+-------+-------+-------+-------+-------+-------+-------+-------
Should be fine after you solve the two above-mentioned problems. The cell table can be a bit laggy anyway... Sometimes even when everything works it takes a long time to register to the network and I don't get cell info until after that succeeded.
OsmocomBB>
As you can see, I am pretty much lost here and I would highly appreciate helping hand.
Hope that helps.
Gianni
On Tue, May 31, 2011 at 12:09 AM, Gianni Tedesco gianni@scaramanga.co.uk wrote:
Synchronize_TDMA LOST 3054!
What would this LOST 3054! say ? It does not sound good anyway, but at this point I am not skilled enough to read OsmocomBB logs.
That's fine/normal.
OK, good. Sounds scary, though. I would prefer FIND message when things go righth :).
...
PLMN selection in state 'A6 no SIM inserted'
Can somebody explain me what the hell is happening here ?
No SIM inserted ;)
You have 3 options:
- Check out sylvain's testing branch for a working on-phone SIM driver
- Use the SAP interface to a PC/SC smartcard reader with SIM inserted.
- If you want to use GSM test set instead of real network, use test sim
functionality of mobile
Hmm.. I was convinced that there was some kind of SIM card simulation implemented in the software and that for basic connection no physical SIM card was needed...
So, as I understood, to have a cell attachment and to have some packets exchange I will need to pull Sylvain's branch, as I have no network nor PC/SC SIM card reader...
Hope that helps.
Yes indeed. I had no idea what was happening, as I was expecting code from the master branch to be operational. I saw NO SIM warning, but as I told you, I thought that there was a SW SIM simulation implementation somewhere inside protocol stack and that no real SIM card was needed for the basic communication (I just want to see few packets coming down the stack to get idea of data flow, so I can later look at the source code and see how they are processed at each layer).
Thanks !
BR, Drasko
On Tue, 2011-05-31 at 00:24 +0200, Drasko DRASKOVIC wrote:
On Tue, May 31, 2011 at 12:09 AM, Gianni Tedesco gianni@scaramanga.co.uk wrote:
Synchronize_TDMA LOST 3054!
What would this LOST 3054! say ? It does not sound good anyway, but at this point I am not skilled enough to read OsmocomBB logs.
That's fine/normal.
OK, good. Sounds scary, though. I would prefer FIND message when things go righth :).
...
PLMN selection in state 'A6 no SIM inserted'
Can somebody explain me what the hell is happening here ?
No SIM inserted ;)
You have 3 options:
- Check out sylvain's testing branch for a working on-phone SIM driver
- Use the SAP interface to a PC/SC smartcard reader with SIM inserted.
- If you want to use GSM test set instead of real network, use test sim
functionality of mobile
Hmm.. I was convinced that there was some kind of SIM card simulation implemented in the software and that for basic connection no physical SIM card was needed...
Hrm, for cell_log I don't think you need a SIM but when mobile starts it tries to register with the network which requires a subscription.
So, as I understood, to have a cell attachment and to have some packets exchange I will need to pull Sylvain's branch, as I have no network nor PC/SC SIM card reader...
Yes, if you want to register on a network, make/receive calls, etc. For just finding cells and catching announcements on the beacon channel, you may be better off starting with cell_log
Hope that helps.
Yes indeed. I had no idea what was happening, as I was expecting code from the master branch to be operational. I saw NO SIM warning, but as I told you, I thought that there was a SW SIM simulation implementation somewhere inside protocol stack and that no real SIM card was needed for the basic communication (I just want to see few packets coming down the stack to get idea of data flow, so I can later look at the source code and see how they are processed at each layer).
It is more or less operational except for those two caveats:
1. TX disabled by default so that you have to actively *do* something yourself before you can transmit on the air, presumably making it your own legal responsibility (whatever that may mean)
2. Current SIM driver is broken, not sure why sylvains is not merged in master but I have heard reports that even his driver doesn't work for some SIM's.
Thanks !
No probs
On Tue, May 31, 2011 at 12:30 AM, Gianni Tedesco gianni@scaramanga.co.uk wrote:
On Tue, 2011-05-31 at 00:24 +0200, Drasko DRASKOVIC wrote:
On Tue, May 31, 2011 at 12:09 AM, Gianni Tedesco gianni@scaramanga.co.uk wrote:
Synchronize_TDMA LOST 3054!
What would this LOST 3054! say ? It does not sound good anyway, but at this point I am not skilled enough to read OsmocomBB logs.
That's fine/normal.
OK, good. Sounds scary, though. I would prefer FIND message when things go righth :).
...
PLMN selection in state 'A6 no SIM inserted'
Can somebody explain me what the hell is happening here ?
No SIM inserted ;)
You have 3 options:
- Check out sylvain's testing branch for a working on-phone SIM driver
- Use the SAP interface to a PC/SC smartcard reader with SIM inserted.
- If you want to use GSM test set instead of real network, use test sim
functionality of mobile
Hmm.. I was convinced that there was some kind of SIM card simulation implemented in the software and that for basic connection no physical SIM card was needed...
Hrm, for cell_log I don't think you need a SIM but when mobile starts it tries to register with the network which requires a subscription.
So, as I understood, to have a cell attachment and to have some packets exchange I will need to pull Sylvain's branch, as I have no network nor PC/SC SIM card reader...
Yes, if you want to register on a network, make/receive calls, etc.
No, no.. I can not start with that - seems too advanced for a beginning... Just a simple connection. The simplest stuff possible.
For just finding cells and catching announcements on the beacon channel, you may be better off starting with cell_log
Yes great. I'd like to start only with that. So I guess current master is able to do this, I do not need SIM... I prefer to try this for a gentle introduction.
It is more or less operational except for those two caveats:
- TX disabled by default so that you have to actively *do* something
yourself before you can transmit on the air, presumably making it your own legal responsibility (whatever that may mean)
Yes I noticed this one. But as I said, I have no intention to TX anything. Just to receive some signals and to have packet appearing on my host running Wireshark. So, that I can slowly start changing/adding logs to layer1 and layer23 code and observe consequences in educational purposes.
- Current SIM driver is broken, not sure why sylvains is not merged in
master but I have heard reports that even his driver doesn't work for some SIM's.
OK. Great informations. Helps a lot !
BR, Drasko
On Tue, 2011-05-31 at 00:36 +0200, Drasko DRASKOVIC wrote:
On Tue, May 31, 2011 at 12:30 AM, Gianni Tedesco gianni@scaramanga.co.uk wrote:
On Tue, 2011-05-31 at 00:24 +0200, Drasko DRASKOVIC wrote:
On Tue, May 31, 2011 at 12:09 AM, Gianni Tedesco gianni@scaramanga.co.uk wrote:
Synchronize_TDMA LOST 3054!
What would this LOST 3054! say ? It does not sound good anyway, but at this point I am not skilled enough to read OsmocomBB logs.
That's fine/normal.
OK, good. Sounds scary, though. I would prefer FIND message when things go righth :).
...
PLMN selection in state 'A6 no SIM inserted'
Can somebody explain me what the hell is happening here ?
No SIM inserted ;)
You have 3 options:
- Check out sylvain's testing branch for a working on-phone SIM driver
- Use the SAP interface to a PC/SC smartcard reader with SIM inserted.
- If you want to use GSM test set instead of real network, use test sim
functionality of mobile
Hmm.. I was convinced that there was some kind of SIM card simulation implemented in the software and that for basic connection no physical SIM card was needed...
Hrm, for cell_log I don't think you need a SIM but when mobile starts it tries to register with the network which requires a subscription.
So, as I understood, to have a cell attachment and to have some packets exchange I will need to pull Sylvain's branch, as I have no network nor PC/SC SIM card reader...
Yes, if you want to register on a network, make/receive calls, etc.
No, no.. I can not start with that - seems too advanced for a beginning... Just a simple connection. The simplest stuff possible.
For just finding cells and catching announcements on the beacon channel, you may be better off starting with cell_log
Yes great. I'd like to start only with that. So I guess current master is able to do this, I do not need SIM... I prefer to try this for a gentle introduction.
Should be fine with master with no modifications afaik.
Happy hacking!
Gianni
Hi,
On Mon, May 30, 2011 at 11:41:58PM +0200, Drasko DRASKOVIC wrote:
LOST 3054!
What would this LOST 3054! say ? It does not sound good anyway, but at this point I am not skilled enough to read OsmocomBB logs.
This is the output of some code I wrote a while ago in order to detect when our CPU is too busy in the GSM L1 and thus looses one interrupt. When we enter the L1S (synchronouos part of L1) in FIQ mode, further FIQs are disabled and remain disabled until L1S returns from FIQ.
If the overall time takes longer than the 4000 quarter-bit-clocks between two TDMA interrupts, then we print that LOST message.
However, the LOST detection logic is not 100% perfect, either. So if you see the occasional message here and there it is fine. If you see a sequence of them, I would say it is an indication of a problem.
On Tue, May 31, 2011 at 8:44 AM, Harald Welte laforge@gnumonks.org wrote:
Hi,
On Mon, May 30, 2011 at 11:41:58PM +0200, Drasko DRASKOVIC wrote:
LOST 3054!
What would this LOST 3054! say ? It does not sound good anyway, but at this point I am not skilled enough to read OsmocomBB logs.
This is the output of some code I wrote a while ago in order to detect when our CPU is too busy in the GSM L1 and thus looses one interrupt. When we enter the L1S (synchronouos part of L1) in FIQ mode, further FIQs are disabled and remain disabled until L1S returns from FIQ.
If the overall time takes longer than the 4000 quarter-bit-clocks between two TDMA interrupts, then we print that LOST message.
However, the LOST detection logic is not 100% perfect, either. So if you see the occasional message here and there it is fine. If you see a sequence of them, I would say it is an indication of a problem.
Hi Harald, thanks for this explanation.
Seen that I had problems connecting, which seems to be due to missing SIM, I suspected on things. Since I do not have experience to dig into the logs yet, I asked for some explanations. This make it more clear, and I will investigate SIM problems now.
BR, Drasko
baseband-devel@lists.osmocom.org