hi,
finally the TBF acknowledge mode works in up- and downlink. i have tested it with attachment/detachment and routing area update. changes are commited to jolly branch.
don't be shocked, but there great changes to previous gprs_rlcmac.cpp code. it is split into three sources: - gprs_rlcmac.cpp: general functions to handle TBF instances, hand-hacked codings - gprs_rlcmac_data.cpp: handling of uplink and downlink TBF - gprs_rlcmac_sched.cpp: scheduler to handle ready-to-send requests.
during packet idle mode, assignment of up- or downlink TBF is performed using IMMEDIATE ASSIGMENT on AGCH. during TBF uplink, downlink assignment is performed using PACKET DOWNLINK ASSIGNMENT on PACCH. after TBF downlink, further downlink assignment is performed using PACKET DOWNLINK ASSIGNMENT. during TBF downlink, uplink assignment is performed using PACKET UPLINK assignment. this way an attachment / RA update / detach will complete while staying in packet transfer mode, so no further assignment must be done on AGCH.
the acknowledged mode keeps states about transmitted and received blocks, so unreceived or unacknowledged block are retransmitted as defined in TS 04.60. downlink RLC/MAC data and control blocks are not queued, but generated at ready-to-send request from layer 1.
a scheduler is used to schedule next RLC/MAC block. it uses round-robin scheduling, if more than two flows are active in one direction. in downlink direction, control blocks are prioized. in uplink direction, polling of mobile is priorized. (USF is set to apply uplink ressource to MS.) only one timeslot (first PDCH) is used to share the ressources, currently.
there is a short description (tbf.txt) about states and the process of current code.
in order to detect missing responses on polling MS, a gprs_rlcmac_poll_timeout() function is called. layer 1 interface must implement detection of missed polled uplink control blocks. there are two ways to perform this: - The received frame is bad (BFI). - The GSM indicates that the block should have been already received. currently pcu_l1_if.c is broken, because none of the detection above is performed.
best regards,
andreas
Hi, Andreas!
I reviewed your implementation of TBF acknowledged mode and it is a great work! I modified implementation of L1 interface for OpenBTS and we have done some tests.
Can you explain, what is the reason of using Time Indication message? As I understand, we use only frame number from this message and call gprs_rlcmac_poll_timeout() function. But when we receive Ready To Send message, we also receive frame number, so why we couldn't use that FN for our purpose and call gprs_rlcmac_poll_timeout() in function, which handling ReadyToSend message? I think for maintain compatibility with different BTS implementations, it is better to use only L1 primitives, which specified in 03.64 Chapter 6.5.3 and Time Indication primitive is not described there.
Now I think, it makes sense to merge your branch with master, but we should coordinate this process. When it is better to merge it? Do you plan to make some more fixes, modifications and cleaning of the code at this stage? I believe, for better understanding of further development of the project we should coordinate our efforts and discuss, what should be implemented in the next steps. What plans of development do you have now?
2012/7/3 jolly andreas@eversberg.eu
hi,
finally the TBF acknowledge mode works in up- and downlink. i have tested it with attachment/detachment and routing area update. changes are commited to jolly branch.
don't be shocked, but there great changes to previous gprs_rlcmac.cpp code. it is split into three sources:
- gprs_rlcmac.cpp: general functions to handle TBF instances,
hand-hacked codings
- gprs_rlcmac_data.cpp: handling of uplink and downlink TBF
- gprs_rlcmac_sched.cpp: scheduler to handle ready-to-send requests.
during packet idle mode, assignment of up- or downlink TBF is performed using IMMEDIATE ASSIGMENT on AGCH. during TBF uplink, downlink assignment is performed using PACKET DOWNLINK ASSIGNMENT on PACCH. after TBF downlink, further downlink assignment is performed using PACKET DOWNLINK ASSIGNMENT. during TBF downlink, uplink assignment is performed using PACKET UPLINK assignment. this way an attachment / RA update / detach will complete while staying in packet transfer mode, so no further assignment must be done on AGCH.
the acknowledged mode keeps states about transmitted and received blocks, so unreceived or unacknowledged block are retransmitted as defined in TS 04.60. downlink RLC/MAC data and control blocks are not queued, but generated at ready-to-send request from layer 1.
a scheduler is used to schedule next RLC/MAC block. it uses round-robin scheduling, if more than two flows are active in one direction. in downlink direction, control blocks are prioized. in uplink direction, polling of mobile is priorized. (USF is set to apply uplink ressource to MS.) only one timeslot (first PDCH) is used to share the ressources, currently.
there is a short description (tbf.txt) about states and the process of current code.
in order to detect missing responses on polling MS, a gprs_rlcmac_poll_timeout() function is called. layer 1 interface must implement detection of missed polled uplink control blocks. there are two ways to perform this:
- The received frame is bad (BFI).
- The GSM indicates that the block should have been already received.
currently pcu_l1_if.c is broken, because none of the detection above is performed.
best regards,
andreas
Ivan Kluchnikov wrote:
Can you explain, what is the reason of using Time Indication message? As I understand, we use only frame number from this message and call gprs_rlcmac_poll_timeout() function. But when we receive Ready To Send message, we also receive frame number, so why we couldn't use that FN for our purpose and call gprs_rlcmac_poll_timeout() in function, which handling ReadyToSend message?
hi ivan,
the reason is that i need to find out when an uplink control bock is not received. this is required to handle counters on dropped frames. the problem is, that i did not yet manage to get bad frame indications. in order to have a quick workarround, i use gsm time indications. these indications are sent in advance of about 10 frames. after 20 frames i can be sure that the frame has not been received. using rts message would be possible too, but since i cannot be sure how much earlier they are sent, i cannot define how many frames i have to wait until timeout. if openbts uses an exact definition of how much earlier the rts messages are sent. if you look at gprs_rlcmac_poll_timeout(), you will see that i wait 20 frames. if rts message would be sent 52 frames in advance, then you should use wait something like 60. (add 10 to avoid jitter).
Now I think, it makes sense to merge your branch with master, but we should coordinate this process. When it is better to merge it? Do you plan to make some more fixes, modifications and cleaning of the code at this stage? I believe, for better understanding of further development of the project we should coordinate our efforts and discuss, what should be implemented in the next steps. What plans of development do you have now?
yes, i agree that we should coordinate it. my current plans are:
- cleanup of debugging levels: (LOGL_DEBUG=full processing, LOGL_INFO=just infos about complete frames, LOGL_NOTICE=abnormal timeouts, invalid data and protocol errors, LOGL_ERROR=local errors, software errors. (i have already done this, but not yet committed.) - replace hand-hacked/wireshark transcoding of control blocks by generated code from encodix. (i will to try this tomorrow.) - changing from c++ back to c. (only possible after replacing the wireshark code.) - multislot support.
i also agree with alexander's comment on splitting the commits. (especially the support of cell information from socket interface.) i can do that and provide seperate patches to this list tomorrow. sometimes it is hard to implement new features without doing cleanups at the same time, since i don't know what have to be cleaned in order to make the new feature work. instead i work on the feature and clean at the same time. (like replacing all hardcoded values by the cell information from the socket interface (or maybe from config file, one day).)
regards,
andreas
i also agree with alexander's comment on splitting the commits. (especially the support of cell information from socket interface.) i can do that and provide seperate patches to this list tomorrow. sometimes it is hard to implement new features without doing cleanups at the same time, since i don't know what have to be cleaned in order to make the new feature work. instead i work on the feature and clean at the same time. (like replacing all hardcoded values by the cell information from the socket interface (or maybe from config file, one day).)
hi,
i splitted the last commit and pushed them in a new branch: jolly_new i hope it is now easier to merge. also i removed my work on using libosmogp, because it was already done by harald in the master branch.
regards,
andreas
commit 1944bd58721920cbd6235c03ff72da1c346e5423 Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 09:32:39 2012 +0200
Minor fix of MCC, MNC options
commit 3e372d57ed36e68836b14dd96f6bda595bb6fe9e Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 09:28:15 2012 +0200
Cleanup of BSSGP code.
The hack for resetting BSSGP instance is removed and now performed whenever the NS state changes to UNBLOCKED.
The BSSGP instance is now created only once, as it should be.
Received STATUS messages are ignored as they should be.
The creation and destruction of BSSGP/NS instances is now handled by layer 1 interface alone.
commit bf5a0f6e2c9d0ae564b171b210f0f97bcbdddbf3 Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 08:58:22 2012 +0200
Move BSSGP/NS instances creation and desctruction to gprs_bssgp_pcu.cpp
commit 81e895b6193530ea4b180c2118b9f40bb33de5b7 Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 08:24:53 2012 +0200
Adding MCC/MNC spoof options to pcu_main.cpp
The option added is required to change PLMN that is announced to SGSN. This allows BTS to have a different PLMN.
(Usefull for roaming in conjunction with simlock.)
commit dfa563cd3bba9b6214289bc63c84b00f1f7676cd Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 08:13:59 2012 +0200
RLC/MAC process makes use from attributes, received from PCU socket
For OpenBTS interface and BSSGP, fixed values are still used.
commit b3c6f6c716d4495b0f664b4d0da1a4708fb1d0f2 Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 07:40:08 2012 +0200
Receive cell informations via PCU socket interface
These informations provide RAI, timers, counters and other attributes to the BSSGP and RLC/MAC processes.
The attributes are stored in gprs_rlcmac_bts global structure.
Hi, Andreas!
Thank you for explanation of Time Indication and your effort in splitting commits. According to your plan, I guess it makes sense to merge in several steps: 1. After cleanup of debugging levels. At this step I plan to use your code as base, but I should add our implementation of encoding control blocks (without hand-hacked code!, but uses wireshark transcoding code). I guess that this merge will be a good point to bring to a common view master and your branch. After this merge it will be better, if you continue working on your branch from this point, in order to avoid merge problems in future. 2. After adding support of encodix and changing to c. 3. After adding multislot support.
So our current plans are: - spend time for developing OpenBTS side; - try to make some refactoring of the code for improvement of internal logic, after adding support of encodix and changing to c; - to make more test before adding multislot support.
2012/7/6 jolly andreas@eversberg.eu
i also agree with alexander's comment on splitting the commits. (especially the support of cell information from socket interface.) i can do that and provide seperate patches to this list tomorrow. sometimes it is hard to implement new features without doing cleanups at the same time, since i don't know what have to be cleaned in order to make the new feature work. instead i work on the feature and clean at the same time. (like replacing all hardcoded values by the cell information from the socket interface (or maybe from config file, one day).)
hi,
i splitted the last commit and pushed them in a new branch: jolly_new i hope it is now easier to merge. also i removed my work on using libosmogp, because it was already done by harald in the master branch.
regards,
andreas
commit 1944bd58721920cbd6235c03ff72da1c346e5423 Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 09:32:39 2012 +0200
Minor fix of MCC, MNC optionscommit 3e372d57ed36e68836b14dd96f6bda595bb6fe9e Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 09:28:15 2012 +0200
Cleanup of BSSGP code. The hack for resetting BSSGP instance is removed and now performed whenever the NS state changes to UNBLOCKED. The BSSGP instance is now created only once, as it should be. Received STATUS messages are ignored as they should be. The creation and destruction of BSSGP/NS instances is now handled by layer 1 interface alone.commit bf5a0f6e2c9d0ae564b171b210f0f97bcbdddbf3 Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 08:58:22 2012 +0200
Move BSSGP/NS instances creation and desctruction to gprs_bssgp_pcu.cppcommit 81e895b6193530ea4b180c2118b9f40bb33de5b7 Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 08:24:53 2012 +0200
Adding MCC/MNC spoof options to pcu_main.cpp The option added is required to change PLMN that is announced to SGSN. This allows BTS to have a different PLMN. (Usefull for roaming in conjunction with simlock.)commit dfa563cd3bba9b6214289bc63c84b00f1f7676cd Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 08:13:59 2012 +0200
RLC/MAC process makes use from attributes, received from PCU socket For OpenBTS interface and BSSGP, fixed values are still used.commit b3c6f6c716d4495b0f664b4d0da1a4708fb1d0f2 Author: Andreas Eversberg jolly@eversberg.eu Date: Fri Jul 6 07:40:08 2012 +0200
Receive cell informations via PCU socket interface These informations provide RAI, timers, counters and other attributesto the BSSGP and RLC/MAC processes.
The attributes are stored in gprs_rlcmac_bts global structure.
osmocom-net-gprs@lists.osmocom.org