I have read a lot of relevant literature, it seems that SDR equipment such as USRP, hackrf series can directly obtain the physical spectrum of the received signal.
How to use the general commercial gateway to do So? For example, how can the gateway with sx1302 module obtain the spectrum.
I’ve heard that spectrum analyzer can be used. I haven’t used it before, so I don’t know how to operate it and its feasibility
It cannot, because that’s not what it’s designed to do.
Rather, the sx130x baseband chip takes the output from the front end radios and demodulates it. The output from the radios is in a way what you are talking about, but in an odd and hard to work with format; and on most boards it would not be very physically accessible anyway.
What actual goal are you trying to accomplish here? An SDR (even a cheap dongle) will give you a sense of what a nearby node looks like, but only the more expensive sort could manage the weak signal performance of a gateway.
Not just with LoRa, but overall very, very, few end-use products have the ability to deliver raw IQ data.
It happens however that an RTL-SDR dongle can do this for nearby LoRaWAN signals if you know their frequency in advance, and at around 20% of the price of a LoRaWAN gateway…
Semtechs latest(?) concentrator card reference design includes a sx1262 for listen before talk. You should be able to use it to obtain the spectrum as well (on frequency at a time, so not a frequency range at the same time)
A slow scan wouldn’t be very interesting without a consistently present signal, which isn’t something one can typically achieve. You’d also need to set a very narrow bandwidth when trying to use the channel activity detector for that. And it would be very tricky to actual catch the chirps in the act of chirping in a way that would capture the kind of frequency-vs-time waterfall the way a cheap SDR readily does.
The front end radios of a gateway feed baseband IQ signals to the concentrator chip - that’s the information the asker wants, just in a hard to use format in terms of both electrical access and encoding.
It’s far easier to just buy a cheap RTL-SDR dongle and make a node transmit once on the frequency to which the SDR is tuned.
The RTL-SDR was of course not intended for this use - it’s actually a receiver for a particular type of digital TV broadcast, it just happens to be an example of one of the very few inexpensive COTS products that actually can output IQ samples useful for another purpose.