Comments (28)
Not really a hero:p. It appears that someone already made an issue about using serial.
Btw I just tested it (I don't have CJMCU-3212 but I have similar board that connects Atmega32U4 and Esp8266 using "Serial1" port of Atmega32U4). That's what I did:
- uncommented
// #define ENABLE_SERIAL
in esp_duck/config.h - selected settings like that (using 2.7.1 Esp8266 for Arduino library):
- clicked
Sketch->Export compiled binary
(which produced "bin" file) - uploaded "bin" file to Esp8266 using nodemcu-flasher (idk how to do it for CJMCU-3212 but I guess there are tutorials online)
- uncommented all the lines below from atmega_duck/config.h
// #define ENABLE_DEBUG
// #define DEBUG_PORT Serial
// #define DEBUG_BAUD 115200
// #define ENABLE_SERIAL
- uploaded it to the Atmega32U4 (it runs on 5V, I selected Arduino Leonardo board setting)
- replugged the board, connected to the access point, went to
192.168.4.1
address in browser on my mobile phone - I opened serial monitor (selected 115200 setting)
- I ran "STRING test" script and noticed that serial monitor indicates that messages are received by Atmega32U4 properly (but for some reason keystrokes are not typed)
- after some testing I realized that adding
#include <Keyboard.h>
at the top of atmega_ducky.ino (and reuploading the code) solves that problem (I have no idea why, and I have no idea if it breaks some other things, but that's how I got it working)
from wifiduck.
WifiDuck is using I2C protocol, that is available on specific pins. If you take a look at the schematic of the CJMCU-3212 board, you can notice that these pins of Atmega32U4 are available as header pins. On Esp12-F these pins are not connected to anything but they're big enough to easily solder them. So if you have a soldering iron, you could solder these 2 connections yourself.
Edit:
It looks like there's a way to choose between both: I2C and serial communiation (using Serial1 which seems to be connected properly on the CJMCU-3212).
In config.h you can uncomment // #define ENABLE_SERIAL
https://github.com/SpacehuhnTech/WiFiDuck/blob/master/atmega_duck/config.h
from wifiduck.
WifiDuck is using I2C protocol, that is available on specific pins. If you take a look at the schematic of the CJMCU-3212 board, you can notice that these pins of Atmega32U4 are available as header pins. On Esp12-F these pins are not connected to anything but they're big enough to easily solder them. So if you have a soldering iron, you could solder these 2 connections yourself.
Edit:
It looks like there's a way to choose between both: I2C and serial communiation (using Serial1 which seems to be connected properly on the CJMCU-3212).In config.h you can uncomment
// #define ENABLE_SERIAL
https://github.com/SpacehuhnTech/WiFiDuck/blob/master/atmega_duck/config.h
@michalmonday
Thank you Michal, you are the hero we are waiting for.
from wifiduck.
It worked! Thanks! :)
* after some testing I realized that adding `#include <Keyboard.h>` at the top of atmega_ducky.ino (and reuploading the code) solves that problem (I have no idea why, and I have no idea if it breaks some other things, but that's how I got it working)
I had the same problem and your solution worked for me. But I changed just the position because #include "keyboard.h"
was already their and I put it on top of atmega_ducky.ino
from wifiduck.
Can you provide more information about the board you'd like to use?
The steps are the same, but maybe you need to make some mofications to compile it.
That depends on how the two chips are connected to each other (which pins).
from wifiduck.
Front
Back
Sorry, I do not have technical knowledge. But these 2 images attached...I have bought that.
from wifiduck.
Hi @cnu77, Hi @spacehuhn
I have the same board and I tried the following steps: https://github.com/puckk/CJMCU-3212
More information is here: spacehuhn/wifi_ducky#91
or here: https://www.youtube.com/watch?v=G-Z2rf_AN-c
Is for the old ducky version but with the modifications it worked fine and I flashed the Atmega32u4 and ESP8266.
But the problem is, that I get an "internal connection error" when I run a script.
Probably the connections are different. I found this scheme:
Maybe you @spacehuhn can help me to look at the right spot. I dont know where to look at.
from wifiduck.
Thanks @alican
I have the same board and I tried the following steps: https://github.com/puckk/CJMCU-3212
More information is here: spacehuhn/wifi_ducky#91
I tried both the links.
As I am new to these h/w parts, its difficult for me to find even the correct pins. I tried to hold the two circled spots together using a pin header, again it fails with the same error.
I guess this has something to do with the basic config like Drivers. But Windows 10 do not even tell if there is any error.
When I connect, I can see the WiFi part can be connected from my mobile. So, I guess the WiFi part is working, but I am not sure if the same WiFi part is deducted by my Laptop or not.
Also, I am not sure if the GPIO0 and GND are already connected (hardwired) or not as there is no mapping diagrams. There was a link but seems to be broken.
Fingers crossed.
from wifiduck.
Now, I tried this video https://www.youtube.com/watch?v=G-Z2rf_AN-c
I followed the steps.
- Flash ATMEGA32U4, using Step1.ino file
- Flash ESP8266 using esp8266_flasher.exe and esp8266_wifi_duck_4mb.bin as bin file. Held a jumper cable to the 2 circles, pushed it to USB. Connected to the USB. Did not take the cable out. Click on Download on the flasher and uploaded and finally said 'leaving...'
Now, I can connect to the WiFi Duck with password quackquack.
But, I cannot run the script. Nothing happens.
from wifiduck.
I have the same issue the old wifi_ducky works but the wifiduck doesn't. With the wifi_ducky I can run ducky script only in I gues the US layout. For the SD card on the CJMCU-3212 I don't know if you can use it and why I didn't test it.
But after flashing the ESP8266-12e (I belive it's this model) you must re flash the arduino leonardo with this script:
https://github.com/spacehuhn/wifi_ducky/blob/master/arduino_wifi_duck/arduino_wifi_duck.ino
or this one
https://github.com/jipher/CJMCU3212_WIFI_DUCK_MOUSE_SUPPORT/blob/master/arduino_wifi_duck/arduino_wifi_duck.ino
But this works only with the "old" version wifi_ducky not with this one.
from wifiduck.
After checking the repo page I just realise the layout of the wifi_ducky is:
Arduino | ESP82666 |
---|---|
TX | RX |
RX | TX |
GND | GND |
VCC (3.3V) | VCC (3.3V) |
and the wifi_duck use:
ESP8266 | Atmega32u4 |
---|---|
D1 alias GPIO 5 | 3 alias SCL |
D2 alias GPIO 4 | 2 alias SDA |
GND | GND |
If we refer to this picture and look at the wiring we use the wifi_ducky and not the wifi_duck so we need to adapt the code if it's possible....
from wifiduck.
Did anyone figure this out yet?
from wifiduck.
I'm also waiting for progress. I'm sad that I can't use the board. I bought it just to play with it with wifiduck.
from wifiduck.
Please share if you've found the necessary modifications to the code for this particular board.
from wifiduck.
You have to use this repo because of the wiring of the PCB.
https://github.com/spacehuhn/wifi_ducky
For the moment you can't use the SD card and we are stuck with the us layout...
from wifiduck.
Yes, i know the old version works fine. I even managed to change the layout but i would really like this updated firmware. To change the layout, you just need to modify the code in keyboard.cpp according to your own layout. File is located in C:\Program Files (x86)\Arduino\libraries\Keyboard\src
As far as i know, the SD card can only be used to store scripts. It's pretty pointless since they can already be stored in SPLIFFS. Using it as a mass storage would be awesome, but i highly doubt it's possible due the contruction of the board.
from wifiduck.
If you look at the code you will find that it's impossible to have the new functions on this board it use something like master slave between the ESP8266 and the Arduino (ATMEGA32U). The CJMCU-3212 is not plug like this like I mentioned in my last posts... The ESP have more space than the arduino so you can reprogram the keyboard function and add some layout but the arduino will not have enough space ... If you succeeded I need to take a look at it because I just add the mouse and sd card option and my memory is almost full.
from wifiduck.
It worked! Thanks! :)
Were you able to test this solution on the CJMCU-3212?
from wifiduck.
It worked! Thanks! :)
Were you able to test this solution on the CJMCU-3212?
Yes. it works on the CJMCU-3212 and I run successfully a script.
from wifiduck.
does the multiple keyboard layout are usable ? You talk about adding the #include <Keyboard.h>
?
@alican
from wifiduck.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from wifiduck.
I follow your steps the keyboard work but not the layout with the command LOCAL.... So the big purpose to get this version over the wifi ducky is gone...
from wifiduck.
I forked the original repo (wifi_ducky) and added some functions.The website have a similar look to this project (WIFIDuck) and the sdcard can be use to store duckyscript. I store them with the extenxion .txt.
https://github.com/TheMMcOfficial/CJMCU-3212-wifi_ducky
from wifiduck.
Sorry the LOCALE with the layout name in CAPITAL (LOCALE FR) work I will check if I'm able to add the function to execute script from the SD Card!
from wifiduck.
I'm not sure if it will be possible because after I added the SD function the space left for the variables in the memory are over 100%...
from wifiduck.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from wifiduck.
Not really a hero:p. It appears that someone already made an issue about using serial.
Btw I just tested it (I don't have CJMCU-3212 but I have similar board that connects Atmega32U4 and Esp8266 using "Serial1" port of Atmega32U4). That's what I did:
- uncommented
// #define ENABLE_SERIAL
in esp_duck/config.h- selected settings like that (using 2.7.1 Esp8266 for Arduino library):
- clicked
Sketch->Export compiled binary
(which produced "bin" file)- uploaded "bin" file to Esp8266 using nodemcu-flasher (idk how to do it for CJMCU-3212 but I guess there are tutorials online)
- uncommented all the lines below from atmega_duck/config.h
// #define ENABLE_DEBUG // #define DEBUG_PORT Serial // #define DEBUG_BAUD 115200 // #define ENABLE_SERIAL
- uploaded it to the Atmega32U4 (it runs on 5V, I selected Arduino Leonardo board setting)
- replugged the board, connected to the access point, went to
192.168.4.1
address in browser on my mobile phone- I opened serial monitor (selected 115200 setting)
- I ran "STRING test" script and noticed that serial monitor indicates that messages are received by Atmega32U4 properly (but for some reason keystrokes are not typed)
- after some testing I realized that adding
#include <Keyboard.h>
at the top of atmega_ducky.ino (and reuploading the code) solves that problem (I have no idea why, and I have no idea if it breaks some other things, but that's how I got it working)
Hello! This helped me perfectly with the CJMCU-3212.
As @michalmonday says I have just edited "#define SERIAL_BAUD 9600" AND "Serial" in the "Protocol" tab instead of "I2C"
Flashed ESP with nodemcuflasher.
I lost a few hours due to the lack and spread of information, for this device the jumpers cables are to bootload the ESP module, then you unplug it and flash the ATMEGA (the ones that are next to the USB at the edge of the PCB (This will cause the ESP module to not start the network once connected) so be sure to unsolder/disconnect that connection after you do the flashing.
This was my experience running WifiDuck with the CJMCU-3212
Hope this helps anyone struggling with this hardware
from wifiduck.
Not really a hero:p. It appears that someone already made an issue about using serial.
Btw I just tested it (I don't have CJMCU-3212 but I have similar board that connects Atmega32U4 and Esp8266 using "Serial1" port of Atmega32U4). That's what I did:
- uncommented
// #define ENABLE_SERIAL
in esp_duck/config.h- selected settings like that (using 2.7.1 Esp8266 for Arduino library):
- clicked
Sketch->Export compiled binary
(which produced "bin" file)- uploaded "bin" file to Esp8266 using nodemcu-flasher (idk how to do it for CJMCU-3212 but I guess there are tutorials online)
- uncommented all the lines below from atmega_duck/config.h
// #define ENABLE_DEBUG // #define DEBUG_PORT Serial // #define DEBUG_BAUD 115200 // #define ENABLE_SERIAL
- uploaded it to the Atmega32U4 (it runs on 5V, I selected Arduino Leonardo board setting)
- replugged the board, connected to the access point, went to
192.168.4.1
address in browser on my mobile phone- I opened serial monitor (selected 115200 setting)
- I ran "STRING test" script and noticed that serial monitor indicates that messages are received by Atmega32U4 properly (but for some reason keystrokes are not typed)
- after some testing I realized that adding
#include <Keyboard.h>
at the top of atmega_ducky.ino (and reuploading the code) solves that problem (I have no idea why, and I have no idea if it breaks some other things, but that's how I got it working)Hello! This helped me perfectly with the CJMCU-3212.
As @michalmonday says I have just edited "#define SERIAL_BAUD 9600" AND "Serial" in the "Protocol" tab instead of "I2C" Flashed ESP with nodemcuflasher. I lost a few hours due to the lack and spread of information, for this device the jumpers cables are to bootload the ESP module, then you unplug it and flash the ATMEGA (the ones that are next to the USB at the edge of the PCB (This will cause the ESP module to not start the network once connected) so be sure to unsolder/disconnect that connection after you do the flashing.
This was my experience running WifiDuck with the CJMCU-3212 Hope this helps anyone struggling with this hardware
Hello you get a yellow mensaje that "Internal Conecction Problem" in yellow color idk why.
from wifiduck.
Related Issues (20)
- Keystroke fix HOT 2
- WiFi not visible to mobile device HOT 2
- Hardware HOT 2
- WIFI WHID HOT 2
- FileStorage library invoked from serial_bridge.cpp not working with Arduino Pro Micro HOT 2
- Can you flash the DSTIKE USB32? HOT 2
- will it work on pi pico?? add the option!! HOT 2
- [Feature Request]: HID and STORAGE HOT 1
- i2c loop error HOT 3
- I CAN RUN SCRIPS BUT THEY STOP - CJMCU 3212 - INFO HOT 61
- Unable to save settings to enable Execute on start up. HOT 2
- Probleme while flashing Pro Micro HOT 3
- [Feature Request]: PLEASE PUT A RPI PICO W OPTION!!! HOT 1
- [Locale]: IT HOT 5
- a simple button[Feature Request]: HOT 1
- Question with SD HOT 1
- help me to find file Main connections (D1 -> 3, D2 -> 2) HOT 2
- [Feature Request]: Support ESP32-S2 HOT 3
- [Feature Request]: brother use esp32 and pi pico please HOT 1
- Internet connection problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifiduck.