GithubHelp home page GithubHelp logo

Compile error about fossa-comms HOT 20 CLOSED

fossasystems avatar fossasystems commented on June 25, 2024
Compile error

from fossa-comms.

Comments (20)

kylix34 avatar kylix34 commented on June 25, 2024 1

It all went smooth once I changed the AES library to tiny-AES-c
I have one error in the serial window: Initializing.......failed, code -705. I have to see what this -705 initializing code means

from fossa-comms.

jgromes avatar jgromes commented on June 25, 2024

You seem to have loads of conflicting libraries - including core Arduino libraries like SoftwareSerial and SPI. I suggest you reinstall your Arduino IDE and only install each library once.

Also, which AES library are you using?

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

I got the AES library from here: https://github.com/DavyLandman/AESLib
Strange, I searched my HDD for Fossa-Comms.h and it didn't find another copy...
Anyway, it's using the libraries from he correct folder.

from fossa-comms.

K4KDR avatar K4KDR commented on June 25, 2024

I was getting similar errors (even though library setup 'looked' fine) and can confirm that removing Arduino IDE app + delete "Sketchbook location" folder (which includes /libraries folder) and reinstalling allowed me to compile without errors.

Library installation after IDE reinstall on linux was:

cd ~/Arduino/libraries/
git clone https://github.com/DavyLandman/AESLib.git
git clone https://github.com/jgromes/RadioLib.git
git clone https://github.com/FOSSASystems/FOSSA-Comms.git
git clone https://github.com/FOSSASystems/tiny-AES-c.git

-Scott, K4KDR

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

Thanks Jan/Scott! I'll try on another PC and update this topic.

from fossa-comms.

jgromes avatar jgromes commented on June 25, 2024

@kylix34 I updated this library a few hours ago, to use tiny-AES-c instead of AESLib, since AESLib only works on AVR microcontrollers and some people are using ESP32 boards for their ground stations. You basically have two options:

  1. Using FOSSA-Comms release 1.0.0, which uses AESLib. This will only work on AVR Arduino boards.
  2. Using the latest FOSSA-Comms from the repository, which uses our fork of tiny-AES-c. this will work on almost all platforms.

-Jan

from fossa-comms.

jgromes avatar jgromes commented on June 25, 2024

-705 is ERR_SPI_CMD_TIMEOUT - it means that there was a timeout during SPI communication with the SX126x module. I suggest you check the wiring and module type.

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

I have the DRF1268T module and this shield: https://www.tindie.com/products/dorji_com/sx1268-sx1262-testing-kit-for-arduino-st-nucleo/
It could be that the pins are routed differently than set in the sketch.

PS: I changed the pins in the sketch:

// SX1268 has the following connections:
// NSS pin: 7
// DIO1 pin: 5
// DIO2 pin: 4
// BUSY pin: 3
SX1268 radio = new Module(7, 5, 4, 3);

but now I get error code -20 (ERR_WRONG_MODEM) and the second time I try, the code is -707 (ERR_SPI_CMD_FAILED)

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

The pin definitions are correct now but I get those error codes :(

from fossa-comms.

jgromes avatar jgromes commented on June 25, 2024

That could suggest a damaged module. You could try few things:

  1. Remove the while(true); loop that stops further program execution if radio.begin() returns an error. It will force the program to continue despite the error code - not sure what will happen there.
  2. If the shield has NRESET connection, you could try to manually reset the module before radio.begin() using the following code:
pinMode(NRESET, OUTPUT);
digitalWrite(NRESET, LOW);
delayMicroseconds(100);
digitalWrite(NRESET, HIGH);

EDIT: also, I noticed the shield you're using has DIO1 and DIO2 connected to Arduino pins 5 and 4, which do not support external interrupts - because of that, you won't be able to use interrupt-driven reception.

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

I tried option 2 and now I only get error code -707 ... Arghhhhh

from fossa-comms.

jgromes avatar jgromes commented on June 25, 2024

What happens when yo try option 1 - ignoring the error code? Alternatively, you could try with a different module, be it SX127x or SX126x.

-707 is ERR_SPI_CMD_FAILED - anything from -705 to -707 suggests the SPI communication is not working correctly.

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

I removed the shield and connected it through dupont wires, using the correct pins on Arduino. It still doesn't recognize the module.
I also tried removing the while (true); statement and I get this:
"Transmitting packet ...
0x46 F
0x4F O
0x53 S
0x53 S
0x41 A
0x53 S
0x41 A
0x54 T
0x2D -
0x31 1
0x3 �
Waiting for response ...
"
This doesn't mean anything (I'm using the GetSystemInfo sketch)

from fossa-comms.

jgromes avatar jgromes commented on June 25, 2024

I've seen this problem pop up from time to time on one of my SX1268 modules - initially, the module returned -707 but subsequent commands were OK. I still don't know what's causing this, as it's only happening sometimes on one of the modules and only after power cycle. I asked Semtech about it, no response yet.

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

from fossa-comms.

jgromes avatar jgromes commented on June 25, 2024

I don't think the module is broken completely, it seems to transmit just fine - I think you will be able to use it. You could try running one of RadioLib SX126x examples with debug mode enabled to get some more information about the issue.

The one module that was giving me a similar problem was SX1268 too, but since I don't know what is the actual issue, I can't say if SX1262 will work better. On a side note, resetting a few times or unplugging the Arduino and connecting it back has solved the issue for me.

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

from fossa-comms.

jgromes avatar jgromes commented on June 25, 2024

Did you try it in debug mode? Open RadioLib/src/TypeDef.h, uncommentd #define RADIOLIB_DEBUG and #define RADIOLIB_VERBOSE and upload.

This seems to be unrelated to this library. Could you please open a new issue in RadioLib?

from fossa-comms.

kylix34 avatar kylix34 commented on June 25, 2024

from fossa-comms.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.