FiPy, LTE: Regression error - no band 8 support #338
Description
With the change of firmware 1.20.0.rc12.1 to 1.20.0.rc13 I get the following error, when attaching the modem:
>>> from network import LTE
>>> lte = LTE()
>>> lte.attach(band=8, apn="iot.1nce.net")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: band 8 not supported by this board hardware!
Edit: The error is caused by the calls to
lteppp_send_at_command(&cmd, &modlte_rsp);
The Command is copied in, but the command length is not set, and then the AT command fails. So after line 622, the following line must be added:
cmd.dataLen = strlen("AT+SMDD");
At two other places, where lteppp_send_at_command() is called, similar changes have to be made. Then attach works with specifying a band.
Edit: looking at the revision history, it looks like the error was introduced between v1.20.0.rc11 and v1.20.0.rc12, even if the length setting was missing before.
Edit 2: Attached is the modified modlte.c file. I would make a PR if I had the impression that someone cares.
modlte.zip