CH340-based boards support

Hi everyone,

I can't upload a valid sketch on a clone Uno with CH340 chip (I get "Error : Could not program the board").
It works just well on Codebender, it still works when using Arduino IDE with CH340 drivers... but not on the Create web editor.

I tried both on W7 and W10, checked the firewall, reinstalled everything, installed drivers and certificates, but nothing works with this board.

Is is a known limitation / a choice from the team, or is it me missing something ?

[Edit] Same thing with a Pro mini clone with offboard FTDI USB, works only with desktop IDE :frowning:

thanx !
Marc

Odd as they work at this end.

The FTDI thing (even ch340 types) does work but not for 8 MHz MINI version boards most of the other CH340 items seem fine here too.

I have requested the 8 MHz boards be supported EDIT they already are my bad !

Win 7 x64

Have you tried with your antivirus / security turned off ( just to test )

Been a few minor issues with different AV causing some issues.

Also turn on VERBOSE and post your output here bu please use CODE TAGS ( </> ) to do so.

Thanx for the replies :wink:

I tried again with a basic sketch (blink...): sketch verification is OK but I get a "compilation failed" when uploading. Nothing more in console but I do have stuff in the console of the Arduino create agent (in the system tray) saying:

downloadtool windows-drivers
downloadtool avrdude 6.3.0-arduino6 undefined keep https://downloads.arduino.cc/tools

I have the problem with a CH340-clone and an Adafruit USB-Boarduino (this one has a FTDI chip), both with ATmega328.
No antivirus running, Windows Defender + firewall deactivated...

The firewall is OK being left ON as an exception was made when you agreed to the pop up boxes during install.

Could be a browser issue. so which browser are you currently using. hopefully its chrome.
If it is make sure it is up to date.

Windows defender has not been seen (YET) to cause any issues either.

Use Preference and make sure "Console: Show Verbose Output" is switched on
Try an upload and then copy and paste the output in here using code tags.

Another option for deeper diagnostics would be to use the developer tools option in chrome and paste that output here to see if it gives any clues.
That output can be quite large so It would have to be added as an attachment here.

To do that I like to open a fresh instance of the create page in Chrome.
Hit the settings button for chrome the 3 vertical dots top right.
Hit More Tools and select Developer options.
A new side windows will open..my personal pref is to have it at the bottom of the page but that's up to you.
Make sure you have CONSOLE selected in the Chrome panel.

Load up your sketch in create.
Refresh the page (just gets rid of anything in the chrome console)
Now hit upload in create.
When it fails post the whole of the output here from the Chrome Console window.
It should look a little like below
I can then ask somebody to take a look at it and see if they see anything obvious.

c06db189-aa29-45e9-8a72-1161ced12d48:1 Refused to load the script 'data:application/javascript;base64,KGZ1bmN0aW9uKCkgewoJLy8gaHR0cHM6Ly9kZXZl…07Cgl9OwoJZ2EucmVtb3ZlID0gbm9vcGZuOwoJd2luZG93W2dhTmFtZV0gPSBnYTsKfSkoKTs=' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.google-analytics.com ws://create-dev.arduino.cc ws://create-staging.arduino.cc ws://create.arduino.cc wss://create-dev.arduino.cc wss://create-staging.arduino.cc wss://create.arduino.cc http://webide.arduino.cc:* https://webide.arduino.cc:* https://blog.arduino.cc https://connect.facebook.net".

angular.fe96cd4e.js:1 Object {name: "$stateChangeSuccess", targetScope: n, defaultPrevented: false, currentScope: n} Object {url: "^/editor/:uid/:id", data: Object, params: Object, resolve: Object, onEnter: Array[5]…}
angular.fe96cd4e.js:1 Object {name: "$stateChangeSuccess", targetScope: n, defaultPrevented: false, currentScope: n} Object {url: "/editor/:uid", parent: "logged", templateUrl: "views/editor/editor.html", controller: "editorCtrl", data: Object…}
angular.fe96cd4e.js:1 Object {name: "$stateChangeSuccess", targetScope: n, defaultPrevented: false, currentScope: n} Object {url: "^/editor/:uid/:id", data: Object, params: Object, resolve: Object, onEnter: Array[5]…}
angular.fe96cd4e.js:1 ObjectcurrentScope: nulldefaultPrevented: falsename: "$stateChangeSuccess"preventDefault: ()targetScope: n__proto__: Object Object {params: Object, onEnter: Array[5], name: "editor.user.sketch.file", data: Object}
angular.fe96cd4e.js:1 [serial monitor] - try close
vendor.6f2df45b.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this messaged @ vendor.6f2df45b.js:10onCursorChange @ vendor.6f2df45b.js:15d._emit.d._dispatchEvent @ vendor.6f2df45b.js:10(anonymous function) @ vendor.6f2df45b.js:10d._signal @ vendor.6f2df45b.js:10setPosition @ vendor.6f2df45b.js:12onChange @ vendor.6f2df45b.js:12d._signal @ vendor.6f2df45b.js:10applyDelta @ vendor.6f2df45b.js:12insertMergedLines @ vendor.6f2df45b.js:12insert @ vendor.6f2df45b.js:12setValue @ vendor.6f2df45b.js:12setValue @ vendor.6f2df45b.js:13angular.isDefined.e.$render @ libs.6f2bce7f.js:1(anonymous function) @ vendor.6f2df45b.js:8$digest @ vendor.6f2df45b.js:5$apply @ vendor.6f2df45b.js:5f @ vendor.6f2df45b.js:5q @ vendor.6f2df45b.js:5v.onload @ vendor.6f2df45b.js:5
vendor.6f2df45b.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this messaged @ vendor.6f2df45b.js:10onCursorChange @ vendor.6f2df45b.js:15d._emit.d._dispatchEvent @ vendor.6f2df45b.js:10(anonymous function) @ vendor.6f2df45b.js:10d._signal @ vendor.6f2df45b.js:10setPosition @ vendor.6f2df45b.js:12moveCursorTo @ vendor.6f2df45b.js:11moveTo @ vendor.6f2df45b.js:10setValue @ vendor.6f2df45b.js:13angular.isDefined.e.$render @ libs.6f2bce7f.js:1(anonymous function) @ vendor.6f2df45b.js:8$digest @ vendor.6f2df45b.js:5$apply @ vendor.6f2df45b.js:5f @ vendor.6f2df45b.js:5q @ vendor.6f2df45b.js:5v.onload @ vendor.6f2df45b.js:5
vendor.6f2df45b.js:30 WebSocket connection to 'wss://localhost:8992/socket.io/?EIO=3&transport=websocket&sid=RYq3A8CBa9uh_8A-nTyk' failed: One or more reserved bits are on: reserved1 = 0, reserved2 = 1, reserved3 = 1d @ vendor.6f2df45b.js:30d.doOpen @ vendor.6f2df45b.js:29d.open @ vendor.6f2df45b.js:29d.probe @ vendor.6f2df45b.js:29d.onOpen @ vendor.6f2df45b.js:29d.onHandshake @ vendor.6f2df45b.js:29d.onPacket @ vendor.6f2df45b.js:29(anonymous function) @ vendor.6f2df45b.js:28d.emit @ vendor.6f2df45b.js:28d.onPacket @ vendor.6f2df45b.js:29c @ vendor.6f2df45b.js:29(anonymous function) @ vendor.6f2df45b.js:29c.decodePayloadAsBinary @ vendor.6f2df45b.js:29c.decodePayload @ vendor.6f2df45b.js:29d.onData @ vendor.6f2df45b.js:29(anonymous function) @ vendor.6f2df45b.js:29d.emit @ vendor.6f2df45b.js:28f.onData @ vendor.6f2df45b.js:29f.onLoad @ vendor.6f2df45b.js:29hasXDR.b.onreadystatechange @ vendor.6f2df45b.js:29
angular.fe96cd4e.js:2 Error: websocket error(…)(anonymous function) @ angular.fe96cd4e.js:2d.emit @ vendor.6f2df45b.js:28d.emit @ vendor.6f2df45b.js:28d.emitAll @ vendor.6f2df45b.js:28d.onerror @ vendor.6f2df45b.js:28(anonymous function) @ vendor.6f2df45b.js:28d.emit @ vendor.6f2df45b.js:28d.onError @ vendor.6f2df45b.js:29(anonymous function) @ vendor.6f2df45b.js:29d.emit @ vendor.6f2df45b.js:28d.onError @ vendor.6f2df45b.js:29ws.onerror @ vendor.6f2df45b.js:29
angular.fe96cd4e.js:2 transport error
vendor.6f2df45b.js:5 GET https://localhost:8991/info net::ERR_SSL_PROTOCOL_ERROR(anonymous function) @ vendor.6f2df45b.js:5r @ vendor.6f2df45b.js:5k @ vendor.6f2df45b.js:5h @ vendor.6f2df45b.js:5(anonymous function) @ vendor.6f2df45b.js:5$eval @ vendor.6f2df45b.js:5$digest @ vendor.6f2df45b.js:5$apply @ vendor.6f2df45b.js:5(anonymous function) @ vendor.6f2df45b.js:6e @ vendor.6f2df45b.js:4(anonymous function) @ vendor.6f2df45b.js:4
vendor.6f2df45b.js:30 WebSocket connection to 'wss://localhost:8992/socket.io/?EIO=3&transport=websocket&sid=G4WKZ6c48yvBHJm-iRIZ' failed: A server must not mask any frames that it sends to the client.d @ vendor.6f2df45b.js:30d.doOpen @ vendor.6f2df45b.js:29d.open @ vendor.6f2df45b.js:29d.probe @ vendor.6f2df45b.js:29d.onOpen @ vendor.6f2df45b.js:29d.onHandshake @ vendor.6f2df45b.js:29d.onPacket @ vendor.6f2df45b.js:29(anonymous function) @ vendor.6f2df45b.js:28d.emit @ vendor.6f2df45b.js:28d.onPacket @ vendor.6f2df45b.js:29c @ vendor.6f2df45b.js:29(anonymous function) @ vendor.6f2df45b.js:29c.decodePayloadAsBinary @ vendor.6f2df45b.js:29c.decodePayload @ vendor.6f2df45b.js:29d.onData @ vendor.6f2df45b.js:29(anonymous function) @ vendor.6f2df45b.js:29d.emit @ vendor.6f2df45b.js:28f.onData @ vendor.6f2df45b.js:29f.onLoad @ vendor.6f2df45b.js:29hasXDR.b.onreadystatechange @ vendor.6f2df45b.js:29
angular.fe96cd4e.js:2 Error: websocket error(…)(anonymous function) @ angular.fe96cd4e.js:2d.emit @ vendor.6f2df45b.js:28d.emit @ vendor.6f2df45b.js:28d.emitAll @ vendor.6f2df45b.js:28d.onerror @ vendor.6f2df45b.js:28(anonymous function) @ vendor.6f2df45b.js:28d.emit @ vendor.6f2df45b.js:28d.onError @ vendor.6f2df45b.js:29(anonymous function) @ vendor.6f2df45b.js:29d.emit @ vendor.6f2df45b.js:28d.onError @ vendor.6f2df45b.js:29ws.onerror @ vendor.6f2df45b.js:29
angular.fe96cd4e.js:2 transport error
vendor.6f2df45b.js:5 GET https://localhost:8991/info net::ERR_SSL_PROTOCOL_ERROR

Hey Ballscrewbob,

Thanx for all the tips :wink:

I'm using an up-to-date Firefox version on Windows 10 pro. So far, I didn't get anything more than "compilation failed" in the console, even with verbose mode on.

I'll give a try with Chrome tomorrow, see if it performs better / outputs logs.

Well...
I tried with Chrome, and I had the same issue.
In the console, I had 404 errors on localhost requests (same as you posted above).

I reinstall several times the Arduino Agent and the certificates, and eventually it began to work fine in Chrome.
I did the same in Firefox, and now it's also working.

I have absolutely no clue why it came to work :astonished:

Thanx Ballscrewbob for your support
I'll update the topic if I've got the erreor again

Thanks for the update..it may help others.

thanks, Arduino agent version update helped in my case (windows 10, Arduino nano based on CH340)

Despite the fact that 'arduino-create-agent' major version was 1.1, I have downloaded the newer 1.1 version. Lib increased on 500kb in size and contained some fixes that were necessary in my case.