Login  Register

Re: Having trouble with code upload... XCode

Posted by sbt on Dec 28, 2016; 5:09am
URL: http://bluesaab-forum.90.s1.nabble.com/Having-trouble-with-code-upload-XCode-tp879p889.html

Edit: Karlis posted above while I was composing this reply. Please follow his advice first.

saabstutz wrote
Working through the solutions - no luck so far. I've been able to communicate on the serial monitor in the Arduino IDE so I've tried to force it into discoverable, to reset, etc. No luck so far. Thinking I may re-run all of the RN52 initial config tomorrow. Where is the RN52-BT-PRG code?
The RN52-BT-PRG code is in Karlis's github profile, at https://github.com/kveilands/RN52-BT-PRG. I have assumed so far that as Karlis made your BlueSaab, it was working with a previous version of the software and the RN52 configuration was already correct. Was it working OK? What prompted you to upgrade the software?

Anyway, there's no harm in checking. Please post the results of the "D" command once you've uploaded the RN52-BT-PRG sketch. I'd be surprised if that wasn't configured already, unless you forced a factory reset at some point.

saabstutz wrote
Also should I take those revisions for PR #21 and put them into my local copy?
If you've already fixed the Xcode project's release configuration for the board (still not clear if you have done), then this patch won't help you. The other change I mentioned doesn't apply to your modules' hardware revision. Sorry for any confusion, the PR was intended to assist others past the issue you've had (and I understood you'd resolved).

For the RN52 configuration, you might find the guide at https://github.com/sambthompson/SAAB-CDC/wiki/Configuration-and-code-upload#rn52-configuration helpful. It's part of a draft wiki I've been working on, but it's still under revision and review.

Please provide as much information as possible about the module's responses, and the steps you try. If you can post logs from the serial monitor, so much the better. After you check the RN52 configuration but before re-uploading the SAAB-CDC sketch, try enabling the debug mode in the RN52 code for more information via the serial monitor. You will need to change the

#define DEBUGMODE 0

to

#define DEBUGMODE 1

in the following files (note: you MUST change them in all these files otherwise bad things will happen; or at least, no good things will happen):

* SAAB-CDC.ino
* RN52driver.cpp
* RN52handler.cpp
* RN52impl.cpp

Don't change them in CDC.cpp or CAN.cpp. Not worried about this for the moment and it will add noise to the log if you enable all the debugging code.

Cheers,
Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods