question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

flashing avr109 in browser

See original GitHub issue

Description

It’s currently not possible to flash an avr109 protocol device in the browser

Expected behaviour

it should flash like an stk500v1 based device

Actual behaviour

avrgirl-arduino.js:17815 Uncaught TypeError: Serialport is not a constructor
    at Avr109._reset (avrgirl-arduino.js:17815)
    at Avr109._upload (avrgirl-arduino.js:17744)
    at avrgirl-arduino.js:18606
    at avrgirl-arduino.js:12894
    at Connection._setUpSerial (avrgirl-arduino.js:12910)
    at Connection._init (avrgirl-arduino.js:12893)
    at avrgirl-arduino.js:18602
    at AvrgirlArduino._validateBoard (avrgirl-arduino.js:18584)
    at AvrgirlArduino.flash (avrgirl-arduino.js:18598)

Operating system and version

Linux archlinux 5.8.7-arch1-1 #1 SMP PREEMPT Sat, 05 Sep 2020 12:31:32 +0000 x86_64 GNU/Linux

Avrgirl Arduino version

Please provide version on the Avrgirl Arduino version used

If working in a fork of the GitHub project, obtain this information post installation using:

4.2.3

NodeJS version

v12.18.3

Arduino Board being used

pro micro

Step by step guide to reproducing the issue

just use your react example and add the board string ‘micro’ or ‘sf-pro-micro’ or anything similar

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
mrfrase3commented, May 26, 2022

I never got around to looking into this, but coincidentally I’ve been looking into refactoring my application, and the first part of that is re-writing avrgirl, the stk500v1, stk500v2, avr109, and esptools into a new independent npm package.

I’ve gotten stk500v1 done already and am currently decrypting the spaghetti code that is stk500v2, all with typescript, promises, and automated tests (I envision an RPi with a bank of microcontrollers plugged in that runs all the tests, testing uploads to the actual boards)

Can check it out here https://github.com/duinoapp/upload-multitool

2reactions
benjaminaignercommented, May 26, 2022

@shikshik You can put the Arduino Sketch into bootloader mode by opening the port with 1200Baud, closing it after 500ms: https://github.com/benjaminaigner/avr109-webserial/blob/0aaf0a524e2b29bb7b606b24d267c38a124e6965/index.html#L221 But as we discussed, afterwards the Arduino enumerates again as a different serial port, so you have to select the serial port in the browser again.

One caveat (heavily depending on your Arduino, especially the bootloader version): if you reset the Arduino via it’s own serial interface, the time spent in the bootloader is limited. Pressing the reset button twice extends this time. Reference: https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/all#ts-reset

Greetings

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · noopkat/avrgirl-arduino - GitHub
girl: :pager: A NodeJS library for flashing compiled sketch files to Arduino microcontroller boards. ... flashing avr109 in browser enhancement.
Read more >
Avrdude - npm.io
A NodeJS library for flashing compiled sketch files to Arduino microcontroller boards. arduinoavravr109stk500avrdudeavrgirlavrg. 5.0.1 • Published 2 years ago ...
Read more >
avrgirl-arduino - Bountysource
:girl: :pager: A NodeJS library for flashing compiled sketch files to ... not possible to flash an avr109 protocol device in the browser...
Read more >
USB device present, can't upload firmware with website or IDE ...
Today! Plugging the SCK into my USB I get a flash of the yel… ... Maybe it isn't a butterfly/AVR109 but a AVR910...
Read more >
Problem flashing default crkbd firmware to pro micro : r/olkb
Maybe it isn't a butterfly/AVR109 but a AVR910 device? avrdude: ... -c avr109 -p m32u4 -P COM3 -F :avrdude -U flash:w:"D:\Downloads\Browser\ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found