It sounds like you are coughing up a mucus plug from the base of the lungs. What we need to identify is whether the flakes of brown are actually blood or whether they are inhaled material.
Smoking any sort of tobacco or other product will put you at risk of obstructive airways disease and more seriously cancer.
Dull pain could be inflammatory response, if the pain is not localised then it indicates that there visceral lining of the lung is being irritated and we need to identify why.
I would suggest a visit to your doctor and either a x ray or CT scan may be necessary,
In the meantime I do recommend that you stop smoking any sort of inhaled material.
Does this help?
If this answered your question please click ACCEPT, use reply if there is something else you need to know regarding your question.Positive feedback or bonus is very much appreciated.