|
Post by greginkansas on May 30, 2016 14:46:59 GMT
I am posting this on this forum also-
JimKernsJr and Papa do you want to start and compare notes on wireless programing? JimKernsJr so far I have not been able to burn a new bootloader what did you use for the miniwireless?
Greg
|
|
|
Post by papa on May 30, 2016 21:48:29 GMT
|
|
|
Post by jimkernsjr on May 30, 2016 22:57:22 GMT
Hi Greg...
As you remember from my discussion and your help on Rick's anarduino site, I actually blew up the onboard serial TX line on 2 of my miniwireless because of my misunderstanding of what the things actually were(In my head 16mwz=5v and obviously that was wrong!)
Nevertheless, I used an arduino as a programmer, with the sketch in the IDE loaded on to make it a progammer. Then I Used the 13-13,12-13,11-11 and 10 to reset lines from the programmer to the miniwiress respectivly, of course a cap on the reset on the programmer. I THINK I used the bootloader for the 16mhz promini - I thought you and Rick gave me that advice. I do remember I thought it did work - but I cant tell you for 100% sure, because on those 2, now I just use the bootloader hookup method and program them with "arduino as a programmer" - which overwrites the bootloader - since my serial in line is destroyed on those 2 anyway. On my others, I never reburned the bootloader.
Try it, and if it doesn't work let me know. I still have one of the blown up ones out, I'll hook it up again and run through it and let you know.
To your other points, I never did wireless programming, but I would like to try. Right now, I'm trying to put all my bits and pieces together to make my system work...I'm tied up with the winkhub right now. But I'd love to help with it, and when I get a moment, I'll check out your links! I do remember reading it a while back, and it looked straightforward (not easy, but straightforward), but I didnt have an immediate use for it, so I out it aside.
Good luck, and thanks always for your help.
|
|
|
Post by greginkansas on May 31, 2016 0:21:32 GMT
This is the one, I think is the working one- github.com/MrLight/DualOptibootI think using a 5V programmer is going to be bad for the miniwireless I have one now that is bricked / toast. I just ordered a 3.3V programmer so I am going to give it another shot on the boot-loader
|
|
|
Post by jimkernsjr on May 31, 2016 1:44:50 GMT
Hi Greg... Yes, a 5v serial FTDI will destroy the serial in line, and I m sure a programmer could do some damage also! For me, I used a switchable arduino (3.3v mode of course ) to program the bootloader. I accidentally bought a Sainsmart thinking it was the same as a Bruno Uno, but it didn't have enough ma on the 3.3v line, so now I keep it dedicated for my programmer. Also, Remember Rick from Anarduino suggested a resister I believe on the lines that had the radio (11,12,13 I believe) - Just to let you know it worked ok for me without it. Let me give it a shot - I'll tell you if it works. I cant test it by uploading code after the normal way, but I can at least see if it takes the bootloader. Maybe that will be a good candidate for wireless programming then since the serial in is blown up anyway! I'll let you know...you have me curious now anyway! Best Jim
|
|
|
Post by papa on May 31, 2016 13:24:52 GMT
Greg & Jim, thanks for sharing your experiences so far. Yes, Greg, I had seen that link github.com/MrLight/DualOptiboot but failed to show it in what I posted earlier. I have a switchable FTDI from Anarduino that I only use in 3.3 volt mode with the miniwireless, including for uploading. I have not yet burned a bootloader, so this will be interesting when I get to it. Again, I'll be busy for a couple days, but maybe will have some chances to try things & interact here.
|
|
|
Post by greginkansas on May 31, 2016 22:36:25 GMT
So you used a 3.3V uno and no pullups on the radio? No errors on the bootloader upload?
|
|
|
Post by papa on May 31, 2016 23:57:47 GMT
Greg,
Above after I wrote, "I have a switchable FTDI from Anarduino that I only use in 3.3 volt mode with the miniwireless, including for uploading,"
please note that I then wrote "I have not yet burned a bootloader..." I'm uploading ONLY SKETCHES so far.
I.E. I'm pre-newbie on burning any kind of bootloader. Have only used Arduino boards that have bootloader already installed or ATMega328 chips that I programmed (with a sketch, but NOT with a bootloader, using an Uno (& breadboard circuit) as ISP.
I'm still researching & scratching my head on burning ANY bootloader.
|
|
|
Post by greginkansas on Jun 2, 2016 0:13:12 GMT
Sorry I ment this for jim.
Post by greginkansas on yesterday at 5:36pm So you used a 3.3V uno and no pullups on the radio? No errors on the bootloader upload?
I just got a USBasp so I am going to give it another try. Wireless programing would be SO nice. All but 3 of my nodes are the miniwireless.
PAPA "I'm still researching & scratching my head on burning ANY bootloader."
I think its one of the few ways to brick a arduino. I have one I'm not sure about yet.
|
|
|
Post by papa on Jun 2, 2016 1:07:06 GMT
Well after researching, scratching my head, & piecing together something, I tried some thngs. Along the way, I wondered if I had bricked my miniwireless.
However, just now I was able to burn Mr. Light's dualoptiboot bootloader for miniwireless. Then I was able to upload a node sketch & the node sketch worked like it had on the from the vendor miniwireless.
Whether this miniwireless is suitable for wireless programming, I do not know yet. I'm just thankful to have burned my first bootloader ever & it works its basic purpose of programming sketches.
In the following threads, I'll try to document what I did & what I think I learned. I'm hoping others can see & tweak any mistakes I made AND build on what maybe went right towards an optiboot bootloader usable for wireless programming on miniwireless.
|
|
|
Post by papa on Jun 2, 2016 1:09:01 GMT
My Experience So Far Burning a DualOptiboot Bootloader for a miniwireless That can eventually be used for wireless programming of a node (Hardware)
First out of the box:From Anarduino.com, I bought two miniwireless (MW) with 915MHz RFM69 radio plus a USB FTDI programmer. We need ways for connecting with the MW... On one MW short end, I soldered mail header pins to connect the FTDI power/programmer. On the two MW longer sides, I soldered female headers On the MW ANT solder hole, I soldered an antenna about 3 inches long & made it into a coil by wrapping it around a pencil. -------------------------------------------------- Update 12/14/2016: Wanting to install a Miniwireless in tight places & to be able to use plug in connections & noticing that a female connector on a male pin is shorter than a male pin in a female header, I'm now trying this way to connect to the MW... On one MW short end, I soldered mail header pins to connect the FTDI power/programmer. On the two MW longer sides, I soldered female headers male header pins. On the MW ANT solder hole, I soldered an antenna about 3 inches long (for 915 MHz radio) & made it into a coil by wrapping it around a pencil. -------------------------------------------------- I set the FTDI programmer switch to 3.3v & connected it to a computer's USB. ====================================== Update 12/14/2016: As above, I prepared another new MW. A port was not assigned until I selected Duemilanove or Diecimila (processor ATmega328) as the board. Once the port was assigned that way, I could select Arduino or Arduino Pro Mini-5v_16MHz as the boards & the serial monitor worked. With Duemilanove or Diecimila (processor ATmega328) selected as the board, I successfully uploaded a sketch & the serial monitor worked. With Arduino selected as the board, I could not upload to the MW. With Arduino Pro Mini-5v_16MHz selected as the board, I successfully uploaded a sketch & the serial monitor worked. Apparently the voltage does not matter here, but the 16MHz is needed for the MW's overclocked cpu speed. I did not try other board selections. When supplied with power, a new MW's LED blinks quickly several times then after an off pause, it steadily blinks on once & off. ====================================== Note: I don't know yet if it matters, but after I burned DualOptiboot for miniwireless, my miniwireless no longer took uploads as Arduino Pro or Pro Mini, 5v, 16MHZ, but rather as an Arduino/Genuino Uno. Maybe this is because the best details I could find on burning a bootloader were about burning one on an Uno that had no bootloader. Continues in the next post ...
|
|
|
Post by papa on Jun 2, 2016 1:31:02 GMT
Preparing to burn DualOptiboot for miniwireless: (Presupposes Papa's post just above) Important: Disconnect the FTDI programmer & its USB cable from miniwireless & computer. Don't risk frying your boards by having two power sources connected to them later. I believe that for the sake of the MW's RFM69 radio, its important (for burning the MW bootloader) to use an Arduino compatible that runs throughout on 3.3 volts. I'm confident this way is safe. To a Buono Uno switched to 3.3 volts, upload File/Examples/ArduinoISP. Unplug Buono it from USB Between Buono Uno & miniwireless, make the connections in the table below using male to male jumper cables. I used the same colors as the entries' backgrounds to help keep things straight. Since miniwireless 3.3v, d5 (via 10K ohm resistor) & d10 (via 10K ohm resistor) all need 3.3v from the Buono, connect the Buono's 3.3v socket to the positive power rail of a solderless breadboard BB). Then to the BB's positive power rail, connect MW's 3.3v, d5, & d10 (again the last 2 through 10K ohm resistor). The d5 & d10 pullups are to keep possible miniwireless signals there from interfering with the bootloader burning. ^^ Click on table for larger view I adapted the above table from here though it resembles other Arduino as ISP hookups I've used. Check all your connections especially anything related to 3.3 volts or GND.
|
|
|
Post by papa on Jun 2, 2016 2:15:26 GMT
A Source for a miniwireless DualOptiboot To use with the two connected Arduino boards in the above post.
Ideally, an Arduino IDE boards.txt file would have the info needed for using the IDE's Tools/Burn Bootloader menu item. Added 6/2/2016: Greg & I did find miniwireless entries for board.txt that I could adapt. See the "Easy Way" below.As Greg recommended, I've used the DualOptiboot for miniwireless, posted here by "Mr. Light." From what I can see, it adapts this by WestfW & a lot is for rolling your own bootloader (beyond me) plus some DualOptiboot examples ( .hex files) for several boards, but not miniwireless. Such non-miniwireless boards are in the boards.txt & boards-1.6.txt (which won't work without being renamed to boards.txt) files. Though he did not put miniwireless DualOptiboot settings into a board.txt file, Mr. Light did helpfully provide bootloader files: optiboot_miniwireless.hex & the bigger optiboot_miniwireless_debug.hex. Mr. Light also provided fuse settings that can be used to burn a bootloader using avrdude (see below): 6/2/2016 correction ^^: For both versions, it turns out the EXTEND Fuse should be 0x05 instead of 0xFD. 05 & FD are the same in the lower 3 bits & that's all that's used. Besides EXTEND 0x05 will avoid an error that will halt burning the bootloader. Here is a handy fuse calculator. Set it to ATmega328P. Near the bottom, one can enter a set of EXTEND, HIGH, & LOW fuse settings & then above see what those settings encode. In the next post I'll document using the bootloader file & fuse settings.
|
|
|
Post by papa on Jun 2, 2016 2:42:48 GMT
Burning DualOptiboot for miniwireless, "The Hard Way" Using avrdude.exe
Added 6/2/2016: You might scroll below & try "The Easy Way" first. If the Easy way does not work, this Hard way might work. It's settings for avrdude slow the burn to avoid problems (lower baud & -v -v -v -v for quadruple verbose status reports).
I adapted the following from this YouTube video...& from this Sparkfun tutorial, the Uploading Code - Hard Way section (an update of what's in the video's background). Find & note the computer folder that holds avrdude (which comes with the Arduino IDE install). On my Windows 7, avrdude.exe is at "C:\Program Files (x86)\Arduino\hardware\tools\avr\bin" From here on I call this location "avrdude folder." Essential step, added 6/2/2016: find the config file named avrdude.conf & copy it to the avrdude folder. On my Windows 7, avrdude.conf is at "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" Download the whole Mr. Light DualOptiboot zip file & note where it stores on your computer. To the avrdude folder, copy only optiboot_miniwireless.hex & optiboot_miniwireless_debug.hex (found in the zip file's AtmelStudio folder) For the regular bootloader ... In the avrdude folder, create a new text file named "Install MW Bootloader" With a Windows text editor (& comparably on Linux), edit the new file so it contains (as explained above, the efuse has been corrected to 0x05 from 0xFD): pause avrdude -P com3 -b 19200 -c avrisp -p m328p -v -v -v -v -e -U efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xDE:m pause avrdude -P com3 -b 19200 -c avrisp -p m328p -v -v -v -v -e -U flash:w:optiboot_miniwireless.hex -U lock:w:0x0F:m pause Important: in the two above avrdude command lines, change com3 to the port connecting your 3.3v Arduino compatible (to which you uploaded ArduinoISP above). The first avrdude command uses Mr. Light's fuse settings. For the debugging bootloader (bigger, less space left for sketches) ... In the avrdude folder, create a new text file named "Install MW Debug Bootloader" With a Windows text editor (& comparably on Linux), edit the new file so it contains (as explained above, the efuse has been corrected to 0x05 from 0xFD): pause avrdude -P com3 -b 19200 -c avrisp -p m328p -v -v -v -v -e -U efuse:w:0x05:m -U hfuse:w:0xD8:m -U lfuse:w:0xDE:m pause avrdude -P com3 -b 19200 -c avrisp -p m328p -v -v -v -v -e -U flash:w:optiboot_miniwireless_debug.hex -U lock:w:0x0F:m pause ^^ This version for the debug bootloader uses a different .hex file & changes the hfuse value. Important: in the two above avrdude command lines, change com3 to the port connecting your 3.3v Arduino compatible (to which you uploaded ArduinoISP above). The first avrdude command uses Mr. Light's fuse settings. On a Windows computer, change the text file tags to .bat to make them batch files. On Linux, change the tags to .sh & use chmod with the file for the same reason. In the avrdude folder, execute Install MW Bootloader OR Install MW Debug Bootloader. On Windows, that opens a cmd window where it first waits for you to tap a key to proceed. When you tap a key, the first avrdude command will take a while & scroll much info. Though it may stop & ask for an answer before it proceeds: Papa: I got better end results when I answered y [enter] << Papa: maybe a coincidence of running the burn again.When the first avrdude command is done (after a good while), it will ask for another key tapped to start the second avrdude command. You may scroll back to see info & errors from the first command. When ready, tap a key, watch the rapid scrolling & hope the second command ends well. Again you may scroll back & view. A final key tap will end the batch run of the two avrdude commands. Next: Testing the miniwireless with the new bootloader (DualOptiboot) to see if sketches will upload to it.
|
|
|
Post by papa on Jun 2, 2016 3:28:31 GMT
Testing the miniwireless with the new bootloader (DualOptiboot): Will sketches upload to it?
Important: Disconnect the Arduino as ISP from the computer's USB. Disconnect all connections between the miniwireless & the other board. Connect the FTDI power / programmer to the miniwireless & connect the FTDI to the computer's USB. Open a known working sketch in the Arduino IDE (one that outputs to the Serial Monitor?). Which board will you set in Tools/Board? For me, after burning DualOptiboot using the above methods, the board setting that worked is Arduino/Genuino Uno? Important addition on 6/2/2016: Be sure to set Tools/Programmer to AVR ISP.Upload the sketch. Did the upload succeed? Does the programmed miniwireless work as expected?
|
|
|
Post by papa on Jun 2, 2016 3:54:14 GMT
Greg, Jim, others ??
The above gives my so far successful burning of a miniwireless DualOptiboot that is supposedly usable for wireless programming of a miniwireless.
How does it compare with your experience? Does anyone have the right boards.txt entries for such a miniwireless & this bootloader?
Now maybe we can begin to test whether wireless programming works on the miniwireless with new bootloader.
|
|
|
Post by greginkansas on Jun 2, 2016 10:48:58 GMT
I will take a better look after work but I do have this not confirmed to work yet -
############################################################## miniwireless.name=Anarduino MiniWireless miniwireless.upload.protocol=arduino #miniwireless.upload.maximum_size=32256 miniwireless.upload.maximum_size=30720 miniwireless.upload.speed=115200 miniwireless.bootloader.low_fuses=0xde miniwireless.bootloader.high_fuses=0xda miniwireless.bootloader.extended_fuses=0xfd miniwireless.bootloader.path=optiboot6 miniwireless.bootloader.file=optiboot_miniwireless.hex #miniwireless.bootloader.file=DualOtiboot_atmega328_1k_d9LED_debugON.hex miniwireless.bootloader.unlock_bits=0x3F miniwireless.bootloader.lock_bits=0x0F miniwireless.build.mcu=atmega328p miniwireless.build.f_cpu=16000000L miniwireless.build.core=arduino miniwireless.build.variant=standard
##############################################################
|
|
|
Post by papa on Jun 2, 2016 11:59:18 GMT
Yes, Greg, I saw that miniwireless boards.txt from abouillot last night just after I finished documenting what I tried so far. I may try adapting that one. Added on the evening of 6/2/2016:Interesting that miniwireless boards.txt is available here, but not in the downloaded zip. I have adapted & corrected that abouillot version boards.txt to use the Mr. Light bootloader. See below.
|
|
|
Post by papa on Jun 3, 2016 0:38:53 GMT
Burning DualOptiboot for miniwireless, "The Easy Way" Using the Arduino IDE (Necessary Setup)
The following in this post is a bit tedious. Once set up, if it works, this is a much easier & faster way to burn the bootloader than the Hard Way above. As shown in detail above, this method also: 1) uploads the IDE Example sketch ArduinoISP to a 3.3 volt Arduino compatible (Bunono Uno?). 2) connects a miniwireless to that 3.3 volt Arduino (see above table for wiring). 3) & connects the 3.3 volt Arduino to your computer via USB. Important: If your Arduino IDE is open, close it.Find the main boards.txt file that was installed with your Arduino IDE. Mine is at C:\Program Files (x86)\Arduino\hardware\arduino\avr. Open that boards.txt (about 25 or 26 kb) in a good text editor like Notepad++. My installed boards.txt starts like this ... In boards.txt, scroll down below the Ardino Uno sections that starts & ends like this (... indicating omitted lines): Just after the #####... that ends the Uno section & just before the Arduino Duemilanove or Diecimila section, paste in the following lines: ^^ the above added lines were updated on 6/9/2016. To try the (larger) debugging version of the bootloader (& give up 1024 more bytes of sketch memory), find the 3 cases above of "# For debug bootloader ..." & to the start of the line above it, add # & at the start of the line below it, delete #. For example, for the first case, you should end up with: #miniwireless.bootloader.high_fuses=0xda # For debug bootloader ... miniwireless.bootloader.high_fuses=0xd8 Here is a handy fuse calculator. Set it to ATmega328P. Near the bottom, one can enter a set of EXTEND, HIGH, & LOW fuse settings & then above see what those settings encode. On your computer find where the Arduino IDE install put the bootloaders folder. On my Windows computer, it's at C:\Program Files (x86)\Arduino\hardware\arduino\avr\bootloaders. If you don't have that folder create it in your equivalent of C:\Program Files (x86)\Arduino\hardware\arduino\avr\. In your equivalent of C:\Program Files (x86)\Arduino\hardware\arduino\avr\bootloaders, create a new miniwireless folder (hereafter called the "miniwireless bootloader folder." Download the whole Mr. Light DualOptiboot zip file & note where it stores on your computer. To the miniwireless bootloader folder, copy only optiboot_miniwireless.hex & optiboot_miniwireless_debug.hex (found in the zip file's AtmelStudio folder). Open the Arduino IDE. Through its menu, click to Tools/Board. Near the top of the list you should see something like Arduino Yun, Arduino/Genuino Uno, AND Anarduino_MiniWireless ... Select Anarduino_MiniWireless, but stop there for now.
|
|
|
Post by papa on Jun 3, 2016 1:41:04 GMT
Burning DualOptiboot for miniwireless, "The Easy Way" Using the Arduino IDE (Necessary Hardware Setup #1) A convenient repeat from "The Hard Way" above
You need a miniwireless (MW) with an RFM69 radio plus a USB FTDI programmer (both available from Anarduion.com) We need ways for connecting with the MW... On one MW short end, I soldered mail header pins to connect the FTDI power/programmer. On the two MW longer sides, I soldered female headers or mail header pins. On the MW ANT solder hole, I soldered an antenna about 3 inches long & made it into a coil by wrapping it around a pencil. Set the FTDI programmer switch to 3.3v. Important: Have the FTDI programmer disconnected from the miniwireless AND the computer's USB.
|
|
|
Post by papa on Jun 3, 2016 1:49:25 GMT
Burning DualOptiboot for miniwireless, "The Easy Way" Using the Arduino IDE (Necessary Hardware Setup #2) A convenient repeat from "The Hard Way" above
Important: Have the FTDI programmer & its USB cable disconnected from miniwireless & computer. Don't risk frying your boards by having two power sources connected to them later. I believe that for the sake of the MW's RFM69 radio, its important (for burning the MW bootloader) to use an Arduino compatible that runs throughout on 3.3 volts. I'm confident this way is safe. To a Buono Uno switched to 3.3 volts, upload File/Examples/ArduinoISP. Unplug Buono it from USB Between Buono Uno & miniwireless, make the connections in the table below using, as needed, male to male or male to female jumper cables. I used the same colors as the entries' backgrounds to help keep things straight.Since miniwireless 3.3v, d5 (via 10K ohm resistor) & d10 (via 10K ohm resistor) all need 3.3v from the Buono, connect the Buono's 3.3v socket to the positive power rail of a solderless breadboard BB). Then to the BB's positive power rail, connect MW's 3.3v, d5, & d10 (again the last 2 through a 10K ohm resistor). The d5 & d10 pullups are to keep possible miniwireless signals there from interfering with the bootloader burning. ^^ Click on table for larger view I adapted the above table from here though it resembles other Arduino as ISP hookups I've used. Check all your connections especially anything related to 3.3 volts or GND.
|
|
|
Post by papa on Jun 3, 2016 2:00:14 GMT
"Doing the Deed" Burning DualOptiboot for miniwireless, "The Easy Way" Using Arduino IDE
The following presupposes you have already completed ALL the above "Easy Way" posts (boards.txt) additions, downloads, wiring). Open the Arduino IDE. Using the File/Preferences/Settings menu, choose "Show verbose output during ... upload." Using Tools/Board menu, make sure the Board is Anarduino_MiniWireless. Using Tools/ Programmer menu, select Arduino as ISP. Again be sure to set Tools/Programmer to AVR ISP Arduino as ISP. OK, now you should be ready for Tools/Burn Bootloader. Pretty quickly (much more so than the Hard Way above), it should be finished, one hopes successfully. When successful, reset Tools/Programmer to AVR ISP. If the burn is not successful, click the copy error messages & paste them to a text editor where you can more easily study them. See if you can learn from the error messages & correct the problem. Above all check that you followed the above instructions.
|
|
|
Post by papa on Jun 3, 2016 2:11:53 GMT
Testing the miniwireless with the new bootloader (DualOptiboot): Will sketches upload to it?
Important: Disconnect the Arduino as ISP from the computer's USB. Disconnect all connections between the miniwireless & the other board. Connect the FTDI power / programmer to the miniwireless (MW) & connect the FTDI to the computer's USB. ================= Update 12/16/2016: As above when I connected & powered the MW, the MW LED did 3 quick blinks 9 times & then did a noticeable pause before repeating the 9 sets of 3 blinks. This is one effect of the new bootloader. It apparently means the bootloader is watching for a sketch bootload over the USB / UART interface. ================= Open a known working sketch in the Arduino IDE (one that outputs to the Serial Monitor?). Which board will you set in Tools/Board? For me, after burning DualOptiboot for miniwireless using the above Easy Way methods, the board setting that worked is Anarduino_MiniWireless Upload the sketch. Did the upload succeed? Does the programmed miniwireless work as expected?
|
|
|
Post by papa on Jun 3, 2016 2:16:15 GMT
Greg, Jim, others ??
The above gives my so far successful Easy Way burning of a miniwireless DualOptiboot that is supposedly usable for wireless programming of a miniwireless.
How does it compare with your experiences? What do you think of the boards.txt entries I added for a miniwireless & this bootloader?
Now maybe we can begin to test whether wireless programming works on the miniwireless with new bootloader.
|
|
|
Post by papa on Jun 3, 2016 3:08:19 GMT
One thing so far perplexes me in relation to a miniwireless with the new DualOptiboot bootloader:
To the miniwireless, I uploaded an end node (Mailbox). Even when it's supposed to be asleep, the miniwireless' onboard LED does three blinks & pauses & keeps repeating that endlessly. The only thing that stops the LED blinking is opening the IDE Serial Monitor (whether the node is using DEBUG mode or not).
This may not be a big deal if the node is wall powered, but could be a problem it it is battery powered.
I guess I have not tried sleeping the miniwireless 128Mb SPI-based Flash Memory.
Thoughts, anyone?
Added 6/3/2016: Looking at the Make file (deep & bewildered in the weeds), I see ...ifdef LED_START_FLASHES LED_START_FLASHES_CMD = -DLED_START_FLASHES=$(LED_START_FLASHES) dummy = FORCE else LED_START_FLASHES_CMD = -DLED_START_FLASHES=3 endif ^^ This makes me wonder if it's only supposed to flash at the START, not constantly
Reassuring update: The above constant 3 LED flashes then brief pause only happens when I connect the miniwireless (with new DualOptiboot bootloader) to my computer's USB via the FTDI programmer/power. Powered by a wall adapter, the miniwireless LED does NOT flash. I assume it will be the same with battery power. So maybe nothing to worry about.
Added 12/15/2016: From studying the DualOptiboot version of optiboot.c (current bootloader's heart), it looks like LED flashes do happen when connected to USB & indicate that the bootloader (over USB) is watching for a new sketch to bootload. Powered by a wall adapter & NOT connected to USB, the DualOptiboot MW's bootloader is not watching for a new sketch to come via USB.
|
|
|
Post by greginkansas on Jun 3, 2016 23:50:23 GMT
I am just behind you on starting on this again. I have a usbasp so will try to burn the bootloader this weekend. Is this the boards.txt you have used?
# edited for Mr. Light DualOptiboot for miniwireless miniwireless.name=Anarduino_MiniWireless miniwireless.upload.tool=arduino:avrdude miniwireless.upload.protocol=arduino #bootloader is supposed to be 1024, so upload maximum could maybe be 31744 #miniwireless.upload.maximum_size=31744 miniwireless.upload.maximum_size=30720 miniwireless.upload.speed=115200 miniwireless.bootloader.tool=avrdude miniwireless.bootloader.low_fuses=0xde miniwireless.bootloader.high_fuses=0xda miniwireless.bootloader.extended_fuses=0x05 miniwireless.bootloader.file=miniwireless/optiboot_miniwireless.hex miniwireless.bootloader.unlock_bits=0x3F miniwireless.bootloader.lock_bits=0x0F miniwireless.build.mcu=atmega328p miniwireless.build.f_cpu=16000000L miniwireless.build.board=AVR_MINIWIRELESS miniwireless.build.core=arduino:arduino miniwireless.build.variant=arduino:standard
|
|
|
Post by papa on Jun 4, 2016 1:09:57 GMT
Yes, Greg, that is the board.txt I've used & it's working so far, but I have not got the point of a wireless upload. See the post above with the heading below as I describe where I put the board.txt entries for miniwireless. Burning DualOptiboot for miniwireless, "The Easy Way" Using the Arduino IDE (Necessary Setup)
|
|
|
Post by papa on Jun 4, 2016 21:42:46 GMT
Greg, Jim, & all, Wirelessly programming (WP) an Anarduino miniwireless, I've just done itwith the help of more stuff I discovered online & tweaked. I'll start documenting how I got there in a new thread, <success> Wireless Programming>Anarduino MiniwirelessI have not finished coding a computourist style WP node yet, but will document that when I do.
|
|
|
Post by greginkansas on Jun 4, 2016 23:14:35 GMT
I am also getting closer have the bootloader in two nodes now. One was the one I thought I might have fried. Right now I am looking for this-
TNode_Openhab_Node_Node_16_ATC_wireless_programing:293: error: 'flash' was not declared in this scope
from this line What are you using for the MANUFACTURER_ID? SPIFlash flash(5, 0xEF30); //EF30 for windbond 4mbit flash I have not found it yet
Edit- found this ManufacturerID to 0120 is this what you used?
|
|
|
Post by papa on Jun 5, 2016 4:20:21 GMT
Greg, for wireless programming with miniwireless, it takes libraries & sketch lines tweaked from their Moteino forum. To see & obtain what's needed, see my new thread <success> Wireless Programming>Anarduino Miniwireless From the WirelessAnarduinoProgramming_node: #define FLASH_SS 5 // FLASH SS on D5 for miniWireless. ///////////////////////////////////////////////////////////////////////////// // flash(SPI_CS, MANUFACTURER_ID) // SPI_CS - CS pin attached to SPI flash chip (5 in case of miniWireless) // MANUFACTURER_ID - OPTIONAL, 0x12018 SPANION S25FL127S ///////////////////////////////////////////////////////////////////////////// SPIFlashA flash(FLASH_SS, 0x12018); // For Anarduino miniWireless with SPANION S25FL127S Note the tweaked SPIFlashA library, besides the flash memory code
|
|