Smelling coffee-Is a blessing of Besamim to be recited?
General law of smelling spices and bread:
Some Poskim rule that one may not say a blessing on ground pepper and ginger even if he enjoys their smell. Likewise, some Poskim rule that one is not to make a blessing upon smelling hot [baking] bread. Other Poskim, however, argue on this [and rule that one may say a blessing over them if he benefits from their smell]. Likewise, some Poskim rule that upon smelling hot [baking] bread one is to make a blessing of Hanosein Reiach Tov Bapaas. According to all, however, a blessing may be recited upon smelling cinnamon and cloves.
The final ruling: Practically, it is proper to [circumvent the above debate through] abstaining from smelling them [and certainly if one does smell them then a blessing is not to be recited]. Accordingly, one is not to smell hot [i.e. baking] bread if it has a good smell in order to be saved from a questionable blessing.
The law by coffee:
Due to the above debate regarding smelling bread and the spices of pepper and ginger, some Poskim rule that one is likewise to avoid smelling coffee, and that if he smells it a blessing is not to be recited, as its usage is similar to that of bread and pepper spices and hence should receive the same law. Other Poskim, however, rule that [coffee is not similar to bread and the above spices, and hence] a blessing is to be recited upon smelling hot freshly ground coffee. The blessing that one is to say is “Asher Nasan Reiach Tov Bapeiros.” Practically, one is to avoid intentionally smelling coffee, although those who do so and say a blessing fresh ground coffee have upon whom to rely. As a practical suggestion, one can simply leave cinnamon or cloves near his coffee and smell them each morning with the saying of Bore Minei Besamim, and have intent to be Yotzei the smell of the freshly ground coffee.
One is to avoid smelling coffee for the sake of benefiting from its smell unless one first recites a blessing of Borei Minei Besamim on a different spice, such as cloves or cinnamon.
 See Admur in Seder Birchas Hanehnin 11:9; 297:4; Kneses Hagedola 297; Olas Tamid 297:1; Elya Raba 297:1; Piskeiy Teshuvos 216:4
 1st opinion in Admur ibid; Shach Yoreh Deah 108 in Nekudos Hakesef in name of Or Yisrael and in name of Bach regarding pepper; Opinion recorded in Taz Y.D. 108:10; Elya Raba ibid regarding ginger
 The reason: As their intent of grinding and use is solely for the sake of spicing [food], and it is not so common to smell them. Accordingly, they are not considered to be designated for smelling at all. [Admur ibid; See Shaar Hatziyon 216:47 in name of Gr”a]
 2nd opinion in Rama 216:14; Beis Yosef 216
 The reason: As this is not a smell of significance that deserves a blessing. [M”B 216:55] Alternatively, it is due to that its main intent is not for smelling. [Shaar Hatziyon 216:47 in name of Gr”a]
 2nd opinion in Admur ibid; Taz O.C. 297:5; Y.D. 108:10; Mateh Moshe 505 in name of Mahariy; Kneses Hagedola regarding pepper; Olas Tamid regarding ginger; P”M 297 A”A Hakdama rules one is to say “Hanosein Reich Tov” on pepper
 1st opinion in Rama 216:14; Beis Yosef 297 in name of Orchos Chaim; Abudarham
 Admur ibid and 11:3
The reason: As it is common to smell them even not during times of eating. Additionally, even when they are placed in foods, their intent is also to cause the food to have a good fragrance. [Admur ibid]
 M”A 216:22 and M”B 216:56 and Kaf Hachaim 216:87 regarding bread; Seder ibid footnote 85 of Rav Elyashvili; See Kitzur Halachos p. 116
 Admur ibid; M”A 297:1 that it has the same law as bread
Other Opinions: Sdei Chemed Mareches Hei 13; Machazikei Bracha 297/5 rule in a time of need one may use pepper for Besamim.
 Admur ibid; Rama 216:14
 Birchas Habayis 26:39 and 42; Aruch Hashulchan 216:14; Kaf Hachaim 216:86; Me’at Mayim 7; Piskeiy Teshuvos ibid; Seder ibid footnote 82 of Rav Elyashvili;
 Perach Shushan O.C. 1:13; Yad Aaron on Hagahos Hatur 216; Sdei Haretz 3:12; Beir Heiytiv 216:7; Tefila Ledavid p. 82; Beis Meir 217; Chesed Lealafim 216:6 in gloss of son of author; Kerem Shlomo 216; M”B 216:16; Peulas Tzadik 1; Chazon Ovadia Brachos p. 329; Halichos Olam 2 Vaeschanon 5; Halacha Berurah [Yosef] 216:19 footnote 45 in name of many Poskim and that one who says a blessing has upon whom to rely
 See Halacha Berurah ibid that it is clear from all the above Poskim that it is not similar to bread, and that it is also not similar to the above spices of pepper and ginger as it is much more common to smell, and enjoy the smell, of ground coffee, as well as that the smell of coffee is an essential intent in brewing the drink, and hence it is more similar to cinnamon and cloves than it is to pepper and ginger.
 The law by cold ground coffee, instant coffee, and a cup of coffee: The Poskim ibid all emphasize in their case of discussion that it refers to hot ground coffee. This implies that only when the coffee has a strong smell that is drawn from a distance do we say that it deserves a blessing, while cold or old ground coffee, a cup of coffee, and certainly instant coffee, would not deserve a blessing. Vetzaruch Iyun. See Vezos Habracha p. 408 that whether it is hot or cold is irrelevant and the main thing is that it gives of a good scent.
 Poskim ibid; However, see Vezos Habracha p. 408 who says that today one is to say Borei Minei Besamim