├── .gitignore ├── Wiki ├── Picture.jpg └── Schema.png ├── Board ├── Esp8266Plug [B].dip └── Esp8266Plug [B].md ├── LICENSE.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | Datasheets/** 2 | Private/** 3 | Research/** 4 | Releases/** 5 | -------------------------------------------------------------------------------- /Wiki/Picture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/medo64/EspPlug/HEAD/Wiki/Picture.jpg -------------------------------------------------------------------------------- /Wiki/Schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/medo64/EspPlug/HEAD/Wiki/Schema.png -------------------------------------------------------------------------------- /Board/Esp8266Plug [B].dip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/medo64/EspPlug/HEAD/Board/Esp8266Plug [B].dip -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | ### The MIT License ### 2 | 3 | Copyright (c) 2014 Josip Medved 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this hardware, software, and associated documentation files (the "Product"), to 7 | deal in the Product without restriction, including without limitation the 8 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 | sell copies of the Product, and to permit persons to whom the Product is 10 | furnished to do so, subject to the following conditions: 11 | 12 | * The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Product. 14 | 15 | * THE PRODUCT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE PRODUCT OR THE USE OR OTHER DEALINGS 21 | IN THE PRODUCT. 22 | -------------------------------------------------------------------------------- /Board/Esp8266Plug [B].md: -------------------------------------------------------------------------------- 1 | ### EspPlug ### 2 | 3 | 31 x 17 mm ~ 0.9 sqin 4 | 5 | 6 | #### Parts #### 7 | 8 | | # | Part name | RefDes | DigiKey | 9 | |---:|----------------------------------|---------|----------------------------| 10 | | 2 | C 47pF, X7R (0805) | C1 C2 | 399-7158-1-ND | 11 | | 1 | C 10nF /16V NP0 (0805) | C3 | 1276-2984-1-ND | 12 | | 2 | C 100nF, X7R (0805) | C4 C5 | 399-1170-1-ND | 13 | | 2 | C 4.7uF /16V X5R (0805) | C6 C7 | 1276-1065-1-ND | 14 | | 2 | DS LED (0805) | DS1 DS2 | 475-1415-1-ND | 15 | | 1 | J Socket 2x4 | J1 | S7072-ND | 16 | | 1 | L Ferrite 40Ohm (0805) | L1 | 445-2201-1-ND | 17 | | 1 | P USB A, plug, horizontal | P1 | WM17118-ND | 18 | | 2 | R 27, 0.125W (0805) | R1 R2 | RMCF0805FT27R0CT-ND | 19 | | 2 | R 1K, 0.125W (0805) | R3 R4 | RMCF0805FT1K00CT-ND | 20 | | 2 | R 10K, 0.125W (0805) | R5 R6 | RMCF0805FT10K0CT-ND | 21 | | 1 | U FT230XS-R (SSOP-16) | U1 | 768-1135-1-ND | 22 | | 1 | VR MCP1700 (SOT-23) | VR1 | MCP1700T3302ETTCT-ND | 23 | 24 | Optionally: 1/2" heat-shrink tubing, 28mm 25 | 26 | 27 | #### Jumpers #### 28 | 29 | JP1 and JP2 control whether GP0 pin of ESP8266 module. At most one jumper 30 | should be soldered at any time. If connected to GND, ESP8266 module will enter 31 | firmware update mode every time it is plugged in. If GP0 is connected to RTS#, 32 | firmware update can be programmatically controlled; i.e. when RTS is high, 33 | firmware update will be enabled and when RTS is low, normal operation will 34 | proceed. Both these jumpers can be left disconnected if no firmware upgrade 35 | functionality is needed. 36 | 37 | 38 | #### Serial port #### 39 | 40 | Parameters for serial port are 115200,8,N,1. 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### EspPlug ### 2 | 3 | This board is intended to allow direct interfacing between ESP8266 modules and 4 | your computer via the USB serial port. 5 | 6 | ![EspPlug, revision A board](Wiki/Picture.jpg) 7 | 8 | 9 | #### Serial parameters #### 10 | 11 | Default module settings are `9600,N,8,1` for older firmware versions and 12 | `115200,N,8,1` for newer. 13 | 14 | 15 | #### Jumpers #### 16 | 17 | JP1 and JP2 on the bottom of the board control GP0 pin of ESP8266 module. At 18 | most one jumper should be soldered at any time. If connected to GND, ESP8266 19 | module will enter firmware update mode every time it is plugged in. If GP0 is 20 | connected to DTR#, firmware update can be programmatically controlled; i.e. 21 | when DTR is high, firmware update will be enabled and when DTR is low, normal 22 | operation will proceed. Both these jumpers can be left disconnected if firmware 23 | upgrade functionality is not needed. 24 | 25 | 26 | #### Commands #### 27 | 28 | All commands have prefix AT and have to end with . 29 | 30 | 31 | ##### AT ##### 32 | 33 | Replies with OK. 34 | 35 | ###### Example ###### 36 | 37 | AT 38 | 39 | OK 40 | 41 | 42 | ##### ATE`state` ##### 43 | 44 | Turn character echoing off (`0`) or on (`1`). 45 | 46 | Echo will be turned on by default and every time device is reset. 47 | 48 | `state`: 49 | * `0` - Echo off 50 | * `1` - Echo on 51 | 52 | ###### Example ###### 53 | 54 | ATE0 55 | 56 | OK 57 | 58 | 59 | ##### AT+RST ##### 60 | 61 | Reset the module. 62 | 63 | ###### Example ###### 64 | 65 | AT+RST 66 | 67 | OK 68 | c_▒▒RS▒▒FjS▒fJ[▒▒▒ 69 | [Vendor:www.ai-thinker.com Version:0.9.2.4] 70 | 71 | ready 72 | 73 | 74 | ##### AT+GMR ##### 75 | 76 | Shows the firmware version. 77 | 78 | ###### Example ###### 79 | 80 | AT+GMR 81 | 0018000902-AI03 82 | 83 | OK 84 | 85 | 86 | ##### AT+CIUPDATE ##### 87 | 88 | Upgrades the firmware from cloud. Must be connected as client to access point 89 | with Internet access. Upgrade itself takes couple of minutes. 90 | 91 | If firmware upgrade fails, at [Electrodragon Blog](http://blog.electrodragon.com/cloud-updating-your-wi07c-esp8266-now/) 92 | you can see instructions for manual firmware update and a link to [binaries](https://drive.google.com/folderview?id=0B_ctPy0pJuW6d1FqM1lvSkJmNU0&usp=sharing) 93 | needed for repair. To enter bootloader mode short between GP0 and GND will be 94 | needed (exposed on board's bottom as jumper link). Alternative firmwares and 95 | tools can be found on [Electrodragon Documentation](https://drive.google.com/folderview?id=0B3dUKfqzZnlwRXhBTmlhaTROTmM&usp=sharing) 96 | page. 97 | 98 | ###### Example ###### 99 | 100 | AT+CIUPDATE 101 | +CIPUPDATE:1 102 | +CIPUPDATE:2 103 | +CIPUPDATE:3 104 | +CIPUPDATE:4 105 | 106 | OK 107 | 108 | ets Jan 8 2013,rst cause:4, boot mode:(3,6) 109 | 110 | wdt reset 111 | load 0x40100000, len 212, room 16 112 | tail 4 113 | chksum 0x5e 114 | load 0x3ffe8000, len 788, room 4 115 | tail 0 116 | chksum 0x1c 117 | load 0x3ffe8314, len 72, room 8 118 | tail 0 119 | chksum 0x55 120 | csum 0x55 121 | jump to user1 122 | rN▒ 123 | ready 124 | 125 | 126 | ##### AT+CIOBAUD=`rate` ##### 127 | 128 | Changes baud rate. 129 | 130 | ###### Example ###### 131 | 132 | AT+CIOBAUD=115200 133 | BAUD->115200 134 | 135 | OK 136 | 137 | 138 | ##### AT+CIOBAUD? ##### 139 | 140 | Shows current baud rate. 141 | 142 | Result is given as: 143 | > +CIOBAUD:`rate` 144 | 145 | ###### Example ###### 146 | 147 | AT+CIOBAUD? 148 | +CIOBAUD:9600 149 | 150 | OK 151 | 152 | 153 | ##### AT+CWMODE=`mode` ##### 154 | 155 | Changes the mode to one specified after the command. 156 | 157 | `mode`: 158 | * `1` - Client 159 | * `2` - Access point 160 | * `3` - Both client and access point 161 | 162 | ###### Example ###### 163 | 164 | AT+CWMODE=1 165 | 166 | OK 167 | 168 | 169 | ##### AT+CWMODE? ##### 170 | 171 | Read current mode. 172 | 173 | Result is given as: 174 | > +CWMODE:`mode` 175 | 176 | `mode`: 177 | * `1` - Client 178 | * `2` - Access point 179 | * `3` - Both client and access point 180 | 181 | ###### Example ###### 182 | 183 | AT+CWMODE? 184 | +CWMODE:1 185 | 186 | OK 187 | 188 | 189 | ##### AT+CWLAP ##### 190 | 191 | Shows visible networks. Only valid in client modes (`1` and `3`). 192 | 193 | Results are given as multiple lines each formatted as: 194 | > +CWLAP:(`security`,"`ssid`",`db`,"`mac`",`channel`) 195 | 196 | `security`: 197 | * `0` - No authentication 198 | * `1` - No authentication 199 | * `2` - WEP 200 | * `3` - WPA 201 | * `4` - WPA2 202 | 203 | ###### Example ###### 204 | 205 | AT+CWLAP 206 | +CWLAP:(3,"DIRECT-roku-374-F9AA61",-57,"40:a7:37:e0:32:a5",1) 207 | +CWLAP:(4,"HOME-38C0",-93,"f4:32:c8:d0:38:c0",1) 208 | +CWLAP:(0,"xfinitywifi",-90,"26:32:c8:d0:38:c2",1) 209 | +CWLAP:(1,"kaostation",-86,"c0:1d:19:de:23:21",1) 210 | +CWLAP:(4,"HOME-ACD0",-89,"a4:32:c8:cc:ac:d0",1) 211 | +CWLAP:(3,"Prashant",-91,"e0:e5:2a:aa:65:66",1) 212 | +CWLAP:(3,"Polaris",-47,"fc:ee:7b:30:a9:e8",1) 213 | +CWLAP:(3,"Gost",-48,"ec:ee:7b:30:a9:e9",1) 214 | +CWLAP:(0,"xfinitywifi",-90,"e6:32:c8:cc:ac:d2",1) 215 | +CWLAP:(3,"NETGEAR",-82,"a0:22:3f:9f:f2:2a",2) 216 | +CWLAP:(3,"kao",-88,"bc:22:0b:2f:e8:08",6) 217 | +CWLAP:(4,"kao3",-85,"bc:22:0b:2f:e8:09",6) 218 | +CWLAP:(3,"HOME-13C8",-94,"b0:26:f3:ab:13:c8",6) 219 | +CWLAP:(0,"xfinitywifi",-89,"b6:32:c8:25:16:dc",1) 220 | +CWLAP:(3,"NETGEAR21",-54,"64:94:fc:3f:6f:0c",11) 221 | +CWLAP:(4,"HOME-4982",-83,"60:1a:ca:22:49:80",11) 222 | +CWLAP:(4,"HOME-7A7F",-90,"3c:35:40:d2:7a:7f",1) 223 | +CWLAP:(4,"150104",-92,"ac:35:40:67:65:79",1) 224 | 225 | OK 226 | 227 | 228 | ##### AT+CWJAP ##### 229 | 230 | Join the network giving the SSID and password. Both should be enclosed in 231 | quotes. 232 | 233 | ###### Example ###### 234 | 235 | AT+CWJAP="Polaris","SomePassword" 236 | 237 | OK 238 | 239 | 240 | ##### AT+CWJAP? ##### 241 | 242 | Shows joined network. 243 | 244 | Result is given as: 245 | > +CWJAP:"`ssid`" 246 | 247 | 248 | ###### Example ###### 249 | 250 | AT+CWJAP? 251 | +CWJAP:"Polaris" 252 | 253 | OK 254 | 255 | ##### AT+CWQAP ##### 256 | 257 | Disconnects client from network. 258 | 259 | ###### Example ###### 260 | 261 | AT+CWQAP 262 | 263 | OK 264 | 265 | 266 | ##### AT+CWSAP="`ssid`","`password`",`channel`,`security` ##### 267 | 268 | Set access point parameters. Valid only in AP modes (`2` and `3`). 269 | 270 | `channel` is between 1 and 13. 271 | 272 | `security`: 273 | * `0` - No authentication 274 | * `1` - WEP 275 | * `3` - WPA 276 | * `4` WPA2 277 | 278 | ###### Example ###### 279 | 280 | AT+CWSAP="Test","Password",1,0 281 | 282 | 283 | ##### AT+CWSAP? ##### 284 | 285 | Returns current access point parameters. 286 | 287 | Result is given as: 288 | > +CWSAP:"`ssid`","`password`",`channel`,`security` 289 | 290 | ###### Example ###### 291 | 292 | AT+CWSAP? 293 | +CWSAP:"ESP_9CB4F7","",1,0 294 | 295 | OK 296 | 297 | 298 | ##### AT+CWLIF ##### 299 | 300 | Show access point clients. 301 | 302 | Result is given as: 303 | > `ip`,`mac` 304 | 305 | ###### Example ###### 306 | 307 | AT+CWLIF 308 | 192.168.4.100,ac:f8:ae:51:89:07 309 | 310 | OK 311 | 312 | ##### AT+CIFSR ##### 313 | 314 | Gives module IP address. First address given will be address in access point 315 | mode (`2` or `3`) while second address will be one used in client mode (`1` or 316 | `3`). 317 | 318 | Results are given as list of: 319 | > `ip` 320 | 321 | ###### Example ###### 322 | 323 | AT+CIFSR 324 | 192.168.4.1 325 | 192.168.100.105 326 | 327 | OK 328 | 329 | 330 | ##### AT+CIFSR (newer) ##### 331 | 332 | Returns IP address assigned to module in following format: 333 | > +CIFSR:STAIP,"`ip`" 334 | > +CIFSR:STAMAC,"`mac`" 335 | 336 | ###### Example ###### 337 | 338 | AT+CIFSR 339 | +CIFSR:STAIP,"192.168.200.126" 340 | +CIFSR:STAMAC,"18:fe:34:9c:a4:aa" 341 | 342 | OK 343 | 344 | 345 | ##### AT+CIPMUX=`multi` ##### 346 | 347 | Sets whether multiple connections are to be used. 348 | 349 | `multi`: 350 | * `0` - Single connection only 351 | * `1` - Multiple connections enabled 352 | 353 | ###### Example ###### 354 | 355 | AT+CIPMUX=1 356 | 357 | OK 358 | 359 | 360 | ##### AT+CIPMUX? ##### 361 | 362 | Returns whether multiple connections are supported. 363 | 364 | Results are given as: 365 | > +CIPMUX:`multi` 366 | 367 | `multi`: 368 | * `0` - Single connection only 369 | * `1` - Multiple connections enabled 370 | 371 | ###### Example ###### 372 | 373 | AT+CIPMUX? 374 | +CIPMUX:0 375 | 376 | 377 | ##### AT+CIPSTATUS ##### 378 | 379 | Returns the status of the connection. 380 | 381 | Result for server connection is given as: 382 | > STATUS:`status` 383 | 384 | For client connection results are: 385 | > +CIPSTATUS:`id`,`protocol`,"`ip`",`port`,`remoteport`,`status` 386 | 387 | `status`: 388 | * `0` - Connected 389 | * `2` - Listening 390 | * `4` - Disconnected 391 | 392 | ###### Example ###### 393 | 394 | AT+CIPSTATUS 395 | STATUS:4 396 | +CIPSTATUS:0,"UDP","192.168.1.119",514,13566,0 397 | +CIPSTATUS:2,"UDP","192.168.1.111",514,18867,0 398 | 399 | OK 400 | 401 | 402 | ##### AT+CIPSTART="`protocol`",`ip`,`port` ##### 403 | 404 | Starts TCP or UDP connection in single connection mode. 405 | 406 | `protocol`: 407 | * `UDP` - User Datagram Protocol 408 | * `TCP` - Transmission Control Protocol 409 | 410 | ###### Example (UDP) ###### 411 | 412 | AT+CIPSTART="UDP","192.168.1.119",514 413 | 0,CONNECT 414 | 415 | OK 416 | 417 | 418 | ###### Example (TCP) ###### 419 | 420 | AT+CIPSTART="TCP","192.168.1.119",80 421 | 0,CONNECT 422 | 423 | OK 424 | 425 | 426 | ##### AT+CIPSTART=`id`,"`protocol`",`ip`,`port` ##### 427 | 428 | Starts TCP or UDP connection in multiplexed mode. 429 | 430 | `protocol`: 431 | * `UDP` - User Datagram Protocol 432 | * `TCP` - Transmission Control Protocol 433 | 434 | ###### Example ###### 435 | 436 | AT+CIPSTART=0,"UDP","192.168.1.119",514 437 | 0,CONNECT 438 | 439 | OK 440 | 441 | 442 | ##### AT+CIPSEND=`count` ##### 443 | 444 | Sends number of characters over the connection. 445 | 446 | Given characters can be inputed only after prompt (`>`) and command 447 | automatically completes as soon as enough characters are received. 448 | 449 | ##### Example ##### 450 | 451 | AT+CIPSEND=26 452 | > ABCDEFGHIJKLMNOPQRSTUVWXYZ 453 | SEND OK 454 | 455 | 456 | ##### AT+CIPSEND=`id`,`count` ##### 457 | 458 | Sends number of characters over the multiplexed connection. 459 | 460 | Given characters can be inputed only after prompt (`>`) and command 461 | automatically completes as soon as enough characters are received. 462 | 463 | ##### Example ##### 464 | 465 | AT+CIPSEND=1,26 466 | > ABCDEFGHIJKLMNOPQRSTUVWXYZ 467 | SEND OK 468 | 469 | 470 | ##### AT+CIPCLOSE ##### 471 | 472 | Closes the connection. 473 | 474 | ###### Example ###### 475 | 476 | AT+CIPCLOSE 477 | CLOSED 478 | 479 | OK 480 | 481 | 482 | ##### AT+CIPCLOSE=`id` ##### 483 | 484 | Closes the connection in multiplexed mode. 485 | 486 | ###### Example ###### 487 | 488 | AT+CIPCLOSE=3 489 | 3,CLOSED 490 | 491 | OK 492 | 493 | 494 | ##### AT+CIPSERVER=`1`,`port` ##### 495 | 496 | Starts TCP server on a given port. Multiplex mode must be turned on. 497 | 498 | ###### Example ###### 499 | 500 | AT+CIPSERVER=1,514 501 | 502 | OK 503 | 504 | 505 | ##### AT+CIPSERVER=`0` ##### 506 | 507 | Closes TCP server connection. Module reset is needed after it. 508 | 509 | ###### Example ###### 510 | 511 | AT+CIPSERVER=0 512 | we must restart 513 | 514 | 515 | ##### AT+CIPSTO=`timeout` ##### 516 | 517 | Sets server's connection timeout value. Value can only be set while server is 518 | listening. 519 | 520 | 521 | ###### Example ###### 522 | 523 | AT+CIPSTO=120 524 | 525 | OK 526 | 527 | 528 | ##### AT+CIPSTO? ##### 529 | 530 | Returns currently set server timeout value. 531 | 532 | Format is as follows: 533 | > +CIPSTO:`timeout` 534 | 535 | ###### Example ###### 536 | 537 | AT+CIPSTO? 538 | +CIPSTO:180 539 | 540 | OK 541 | 542 | 543 | ##### `id`,`state` ##### 544 | 545 | This is an unsolicited output that gets received every time there is a change 546 | on server connection. 547 | 548 | `state` 549 | * `CONNECT` - Connection established 550 | * `CLOSED` - Connection closed 551 | 552 | ###### Example ###### 553 | 554 | 0,CONNECT 555 | 556 | 557 | ##### +IPD ##### 558 | 559 | This is an unsolicited output that gets received every time server receives 560 | data. 561 | 562 | Format: 563 | > +IPD,`id`,`count`:`data` 564 | 565 | ###### Example ###### 566 | 567 | +IPD,0,26:ABCDEFGHIJKLMNOPQRSTUVWXYZ 568 | OK 569 | 570 | 571 | #### Schematics #### 572 | 573 | ![EspPlug, revision a schematics](Wiki/Schema.png) 574 | 575 | 576 | #### Manufacturing #### 577 | 578 | If you want to make this board your self, just grab the latest gerbers and send 579 | them over to [OSH Park](http://oshpark.com/) (or any other PCB manufacturer of 580 | your choice). 581 | 582 | 583 | 584 | --- 585 | 586 | *You can check my blog and other projects at [www.jmedved.com](http://www.jmedved.com/).* 587 | --------------------------------------------------------------------------------