Skip to content

AT Command Failure #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jerryneedell opened this issue Feb 27, 2020 · 2 comments · Fixed by #14
Closed

AT Command Failure #13

jerryneedell opened this issue Feb 27, 2020 · 2 comments · Fixed by #14

Comments

@jerryneedell
Copy link
Contributor

I'm trying to run ghe bluefruitspi_simpletest with a feather_m4_express and Bluefruit SPI Friend and get this error

Adafruit CircuitPython 5.0.0-rc.0 on 2020-02-26; Adafruit Feather M4 Express with samd51j19
>>> import bluefruitspi_simpletest
Initializing the Bluefruit LE SPI Friend module
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bluefruitspi_simpletest.py", line 19, in <module>
  File "adafruit_bluefruitspi.py", line 253, in command_check_OK
  File "adafruit_bluefruitspi.py", line 248, in command
  File "adafruit_bluefruitspi.py", line 248, in command
RuntimeError: AT command failure: RuntimeError('buffer size must match format',)
>>> 

the BlueFruit SPI Friend is running firmware 0.8.1 with latest CP 5.0 rc0 and libraries.

@jerryneedell
Copy link
Contributor Author

this is apparently an issue with CP 5.0 -- it works with CP 4.x
comes from here https://github.com/adafruit/circuitpython/blame/master/shared-module/struct/__init__.c#L179

@jerryneedell
Copy link
Contributor Author

looks like a simple ix -- I'll put in a PR

diff adafruit_bluefruitspi.py ~/projects/adafruit_github/Adafruit_CircuitPython_BluefruitSPI/adafruit_bluefruitspi.py 
182c182
<             msgtype, rspid, rsplen = struct.unpack('>BHB', self._buf_rx[0:4])
---
>             msgtype, rspid, rsplen = struct.unpack('>BHB', self._buf_rx)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant