# Simulate bad cell phone reception in the lab

I'm currently developing an internet of things device that utilizes a uBlox SARA-U260 gsm/3G modem.

In field testing, we have had significant software/firmware issues due to poor cell phone reception in our deployments in sub-saharan Africa.

I'm having a hard time duplicating the problems in the lab because the cell reception here is too good. Even if there is no antenna plugged into the modem, it is still able to connect to the cell network internet!

So, I'm looking for the best way to thwart my modem into thinking it has bad reception.

One thought I had was to cut the coax cable of the antenna and solder a resistor between the gnd shroud and the center conductor. Would this work? What size resistor would make sense? Probably a fairly low-value resistor (say 50 ohm?)

I'm confused about why the modem can still connect even without an antenna. I thought that during normal operation the modem must short the ground and center conductor when it is transmitting (hence the high current associated with a transmission burst).

Under normal circumstances, is the short locate inside the antenna? If so, wouldn't the center conductor of the coax always be at ground potential (i.e. during reception)?

EDIT:

Thanks for the replies. I have a big metal box sitting on my desk ready to mount the DUT (thanks for that acronym @Ali Chen ) tomorrow!

• Big metal cage.
– kva
May 29 '17 at 15:13
• Or cover a small room in tin foil. en.wikipedia.org/wiki/Faraday_cage May 29 '17 at 15:21
• Put it in a metal box with a lid. Open and close the lid for different signal strengths. May 29 '17 at 15:23
• Put it inside a microwave oven :D No seriously, if I put my phone inside a microwave and close the door, it drops to one bar May 29 '17 at 17:03
• @AndroidDev Just don't turn it on! May 29 '17 at 20:35

To "simulate" a poorer cell reception you can use RF attenuators between your board and the antenna. They are composed of multiples resistances building a network that will attenuate RF power very predictably, both in RX and TX, while maintaining the proposer RF impedance as seen from the modem and antenna. They have a limited power rating.

Do not run your modem with its RF output open or short-circuited. The RF amplifier won't like that, at all.

Small attenuators with SMA plugs typically cost around 10-20€ (https://www.minicircuits.com/WebStore/dashboard.html?model=VAT-3%2B). The SARA-U260 can radiate a maximum of 33dBm (2W) peak, less on average. Start to dissipate the bulk of the power with a 2 or 3dB attenuator (rated for 1W) connected on the modem side and then you can add more attenuators to decrease power even more and finally plug you antenna. Systems without antennas can behave erratically, and attenuators are not a great substitute for antennas.

For large attenuations (>40 dB of attenuation, I would say) stacking attenuators is not a solution as some RF power always leak in and out of a modem by ways other than the antenna port (small sections of RF trace on your PCB, power supply, etc). Then, you need an RF shielded box (such as http://www.jretest.com/jre-0709-P.htm) with some attenuators inside the box, and some attenuators outside the box. Your modem is put inside the box, your antenna stays outside, and the box is equipped with RF connectors to bring signals in and out of the box in a controlled manner.

If you have a budget for it, half a dozen of fixed attenuators, a shielded box, and a variable attenuator (eg. https://www.aliexpress.com/item/2Watt-0-90dB-Coaxial-Adjustable-Key-Press-N-K-K-RF-step-Attenuator-Stepping-DC-to/32779942411.html) can be very convenient to simulate dynamic RF conditions in a controlled manner.

If the poor reception is due to nearby sources of interference, you will need a RF signal generator (plus an RF "tee" and maybe an isolation box) to emulate that issue. This is not cheap.

• If the poor reception is due to nearby sources of interference, you will need a RF signal generator.... I wonder if you could fake something using attenuated signal reflections: Tee--attenuator--unterminated cable. You could always double it May 30 '17 at 8:57
• You can create signal reflection to simulate bad reception due to multipath. A weak signal, foreign interference or reflections of your own signal tend to be processed/filtered in very different ways by your modem. Trying to emulate the effects of one with a different one is far from trivial, if achievable at all. May 30 '17 at 18:00
• @Sylvain "Do not run your modem with its RF output open or short-circuited. The RF amplifier won't like that, at all." Why will my RF amplifier not like the RF output open? May 31 '17 at 18:17

Normally, the WWLAN testing and debug is done in electromagnetically shielded cages in labs when external tower signals (or local 3G-4G repeaters/re-translators) are too strong. The tests are usually done with special instruments like Agilent LTE tester, which has all abilities to change signal levels and simulate weak reception. In normal operation the LTE tester is connected in place of antenna on the Device Under Test (DUT), bypassing the DUT's own antennas. Alternatively, you can connect a simple onmidirectional antenna right to the LTE Tester output, and use the DUT natve antenna, but then you will need to control the distance and do re-calibration of the RF channel.

Keep in mind that the issue might be not in your software/firmware, but in HARDWARE. Wireless devices are normally using Automated Gain Control not only in receiver channel, but also in transmitter channel. When the reception is weak, the DUT rightfully will assume that it is far away from cell tower, and therefore MUST use higher transmit power. The power of transmission bursts can be up to 1-5 W, which will interfere with board layout, and if the PCB design is done poorly, it can disrupt all other DUT functionality, all other sensors, etc.

• This is a really good point! It's easy to forget there are strong RF sources within centimeters of unshielded electronics when experimenting/prototyping. But is there really no information coming back from the cell tower saying "I can hear you fine, you don't need to use so much power!" That may not always happen but since battery life is such an issue with portable devices, it seems that this could be a reasonable option in a protocol, and much better than the mobile device just having to guess what power to use.
– uhoh
May 30 '17 at 1:09
• Yes it is a point -- but an attenuator in between the DUT and the antenna will simulate the path loss of the longer path, no? May 30 '17 at 3:53
• @ThreePhaseEel Yes, it will. As attenuation increases, the GPRS modem (following commands of the cell tower) will increase power, until the maximum power is reached. After that, increasing attenuation will worsen the link quality, slowly first, then the quality will drop significantly until the link drops completely. May 30 '17 at 18:08
• Hey @Sylvain, are you sure that the increase in transmit power is done by commands from cell tower, and not by internal S/W algorithm? May 30 '17 at 18:22
• @AliChen I'm not sure at all. My lectures on the topic were too long ago, I may be wrong on who's in charge of the power control loop. That said, increasing attenuation will trigger an increase in TX power. May 31 '17 at 16:06

RF is tricky.

I wouldn't mess with the antenna, I think the product should be tested in its final configuration. The reason for this is simple: when reception is really bad, your transmitter will increase its power to its maximum value, and you WILL be interested in knowing if the (rather enormous) amounts of RF it will crank out will crash your micro, corrupt your analog sensors, or whatever other black magic RF can do on innocent bystander circuits.

From the point of view of the chips on your PCB, your GSM module cranking out a few watts of RF is like a mini nuke... way more than enough to any opamp go bonkers.

You really, really want to test for that, and modding the antenna for lower efficiency will NOT achieve it!

I suggest putting the whole product inside a Faraday cage, like a microwave oven, a pressure cooker, or something like that:

Also available in see-through...

Now, if you run wires through your Faraday cage, then the RF will ride on them, and you'll need to use proper feedthrough filters, and basically Do It Right, which I guess isn't the point.

As an alternate solution: do the test in your building's basement.

Bad reception can not only stem from low signal, but also from the distance to the cell tower.

Especially GSM is only designed to go over about 35km. Otherwise the "timing advance" between sender and receiver of the RF signal would be too large for the protocol in use.

This is hard to simulate without proper equipment. You should probably hire a lab for this. Large telecoms companies have such testing capabilities.

• EMC testing companies have these labs, which are basically a large faraday cage lined with EM absorber tiles. You can have full control over interference, signal levels etc.
– kva
May 30 '17 at 20:54

Some possibilities:

1. Connect the antenna to a dummy load
2. Use a step attenuator between the antenna and the radio using double shielded coax
3. Conduct your experiments in a shielded room / enclosure

Note that a proper attenuator is not a simple resistor. It consists of a resistive pad that has impedance matched inputs and outputs. Look up T pad resistive attenuator. Most are specified as dBs of attenuation. Stepped versions with >100 dB of attenuation are readily available as lab accessories. Use them with double or quad shielded coax to reduce leakage paths.

• +1 for do it the right way!
– uhoh
May 30 '17 at 1:11

In field testing, your device is affected by environmental (technically geographical ?) issues, not issues with the device itself. So why not just isolate the device with some physical blockage such as walls or metal boxes( from the replies above).

Some buildings have built in telephone antennas (whatever you call them.) so maybe try out your device somewhere else?