Skip to content

Commit 7afb148

Browse files
committed
delete this branch
0 parents  commit 7afb148

File tree

141 files changed

+20814
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+20814
-0
lines changed

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.gitignore

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
build/
2+
firmware/
3+
espfs/mkespfsimage/*.o
4+
espfs/mkespfsimage/mkespfsimage
5+
webpages.espfs
6+
espfs/espfstest/*.o
7+
espfs/espfstest/espfstest
8+
html_compressed/
9+
esp-link.tgz
10+
tve-patch/
11+
yui
12+
espfs/mkespfsimage/mman-win32/mman.o
13+
esp-link.opensdf
14+
esp-link.sdf
15+
espfs/mkespfsimage/mman-win32/libmman.a
16+
.localhistory/
17+
local.conf
18+
*.tgz
19+
20+
# =========================
21+
# Operating System Files
22+
# =========================
23+
24+
# WINDOWS
25+
# =========================
26+
# Image file caches
27+
Thumbs.db
28+
ehthumbs.db
29+
30+
# Installer files
31+
*.cab
32+
*.msi
33+
*.msm
34+
*.msp
35+
36+
# Shortcuts
37+
*.lnk
38+
39+
# Folder config file
40+
Desktop.ini
41+
42+
# Recycle Bin used on file shares
43+
$RECYCLE.BIN/
44+
45+
# OSX
46+
# =========================
47+
48+
.DS_Store
49+
.AppleDouble
50+
.LSOverride
51+
52+
# Thumbnails
53+
._*
54+
55+
# Files that might appear in the root of a volume
56+
.DocumentRevisions-V100
57+
.fseventsd
58+
.Spotlight-V100
59+
.TemporaryItems
60+
.Trashes
61+
.VolumeIcon.icns
62+
63+
# Directories potentially created on remote AFP share
64+
.AppleDB
65+
.AppleDesktop
66+
Network Trash Folder
67+
Temporary Items
68+
.apdisk

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
language: c
2+
before_install:
3+
- curl -Ls http://s3.voneicken.com/xtensa-lx106-elf-20160330.tgx | tar Jxf -
4+
- curl -Ls http://s3.voneicken.com/esp_iot_sdk_v2.0.0.p1.tgx | tar -C .. -Jxf -
5+
compiler: gcc
6+
env:
7+
matrix:
8+
script:
9+
- export XTENSA_TOOLS_ROOT=$PWD/xtensa-lx106-elf/bin/
10+
- export BRANCH=$TRAVIS_BRANCH
11+
- echo $TRAVIS_BRANCH
12+
- make release
13+
notifications:
14+
email: false
15+
deploy:
16+
skip_cleanup: true
17+
provider: releases
18+
api_key:
19+
secure: kiEIjSd56sIvZw9hYO4N1YIge62vqN+LskfTGUYEIp5ePho2qXVTHvjTmrnNxKfvwgKSo24JiWIzCBlL6eHFqIoqlJipJk/Z8Yo23kjqEEV7Ex3aOqMm0eeDGgZhABffQGWKGX3X0a8wL9FdaLjlJJLYvdGnp46hSQGrPoYRhlomz1CwX3OTiy6Jk/b8E7cJ2eqL7dwVPtz1qYQTUNkwoXzNzv3FAa1hi6WmlM8yZOdBsjTJmme6micRz+AcgVxCmA7P/nNl2v+0mz4Lf4Ufhu2nTNXyl4X+WFYrYyPZf9FzvzFdJiFKBs+0JcqZPEibWbv0vVUm79ueMKn7Y+MpxyYzDBnpY0jTxEzp/xz07p44dUrHhjml1cBxjiW1NInXiemXMu7uNO/0AOMCRCt9X5ME5jY3OudMGc40P926duUMn+ydqU1zB4BTEbNLSiVmneN72t4GtmtdrXzEVTzqp0wsxU6kcXoOcOcv3eqw/7l6UGUoyj+9qsBryKIjgci1hbY6fFnj3SclossJ3lgwBDhD/alhR28zOPp7wV9Ewd/hrZ/+fkR1B76MqLOTKOjcowygBox8rorfZ3JqTacl1fGSEPEL82gRb3e7nKAqTAG9T/rDEEwUAv53bkY6bxynYzk5fBEDzWWvPaW1GdGT6Br3vAFg+59bAlDrWt5pJdw=
20+
file_glob: true
21+
file: esp-link-*.t*gz
22+
on:
23+
repo: fuzzball03/esp-link-v2

BOARDS.md

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
Boards with esp-link
2+
====================
3+
4+
This readme provides instructions for PCBs that I've made that are designed for esp-link.
5+
Some of the instructions may be helpful to others as well.
6+
7+
esp-bridge
8+
----------
9+
![dsc_5127](https://cloud.githubusercontent.com/assets/39480/8509323/11037aa2-2252-11e5-9bd2-6c86c9a3b2ed.jpg)
10+
11+
The esp-bridge has an esp-03 modulde, an FTDI connector (with wrong pinout!), a 3-pin power
12+
and debug connector, and two buttons.
13+
Next to the buttons it is marked "TvE2015 esp-ftdi".
14+
It comes preloaded with the latest version of esp-link.
15+
16+
Power: the on-board MCP1825S-33 regulator can provide 500mA and is good from about 3.6v to 6v.
17+
Connect power either to the 3-pin connector (GND in center, 5v towards the esp module), or to
18+
the FTDI connector (GND marked next to the buttons, 5V on 3rd pin).
19+
20+
On power-up you should see the green LED on for ~1 second (the yellow should go on too, but
21+
the firmware may not be configured correctly). After that the green should blink according to the
22+
patterns described in the README's LED indicators section. Follow the Wifi configuration details
23+
section thereafter.
24+
25+
To connect a JeeNode to the esp-bridge to flash the AVR or debug it, plug it into the FTDI
26+
port flipped-over, i.e. the component side of the JeeNode will be on the bottom and the
27+
components of the esp-bridge will be on the top. (Yes, the FTDI port should have been reversed
28+
on the esp-bridge...)
29+
30+
To program the JeeNode, having set-up the Wifi through the web pages, run avrdude with an
31+
option like "-Pnet:esp8266:23" (you can use an IP address instead of `esp8266`). My test command
32+
line is as follows:
33+
```
34+
/home/arduino/arduino-1.0.5/hardware/tools/avrdude \
35+
-C /home/arduino/arduino-1.0.5/hardware/tools/avrdude.conf -DV -patmega328p \
36+
-Pnet:esp8266:23 -carduino -b115200 -U flash:w:greenhouse.hex:i
37+
```
38+
If you're using "edam's Arduino makefile" then you can simply set `SERIALDEV=net:bbb:2000` in your
39+
sketch's Makefile.
40+
41+
To program an LPC processor using the JeeLabs uploader. follow the instructions below for the jn-esp.
42+
43+
Reflashing the esp-bridge itself (as opposed to the attached uController):
44+
_you should not need to do this!_, in general use the over-the-air reflashing by downloading the latest release.
45+
If you cannot reflash over-the-air and need to reflash serially, connect TX of a
46+
USB BUB to RX of the esp-bridge and RX to TX (i.e. cross-over). Hold the flash button down
47+
and briefly press the reset button. Then run esptool.py.as described below.
48+
49+
jn-esp
50+
-------
51+
![dsc_5125](https://cloud.githubusercontent.com/assets/39480/8509322/08194674-2252-11e5-8539-4eacb0d79304.jpg)
52+
53+
The jn-esp has an esp-03 module, an LPC824, a pseudo-FTDI connector (marked in tiny letters)
54+
and a JeePort (also marked). On the bottom it is marked "JN-ESP-V2".
55+
It comes preloaded with the latest version of esp-link.
56+
57+
Power: the on-board MCP1825S-33 regulator can provide 500mA and is good from about 3.6v to 6v.
58+
Connect power to the FTDI connector (GND and 5V marked on bottom).
59+
60+
On power-up you should see the green LED on for ~1 second (the yellow should go on too, but
61+
the firmware may not be configured correctly). After that the green should blink according to the
62+
patterns described in the README's LED indicators section. Follow the Wifi configuration details
63+
section thereafter.
64+
65+
To program the LPC824 _ensure that you have a recent version of the Embello uploader_
66+
and point the Embello uploader at port 23. Something like:
67+
```
68+
uploader -w -t -s 192.168.0.92:23 build/firmware.bin
69+
```
70+
Remove the -s option if you don't want to stay connected. A simple sketch to try this out
71+
with is the [hello sketch](https://github.com/jeelabs/embello/tree/master/projects/jnp/hello).
72+
The result should look something like:
73+
```
74+
$ uploader -w -t -s jn-esp:23 build/firmware.bin
75+
found: 8242 - LPC824: 32 KB flash, 8 KB RAM, TSSOP20
76+
hwuid: 16500407679C61AE7189A053830200F5
77+
flash: 0640 done, 1540 bytes
78+
entering terminal mode, press <ESC> to quit:
79+
80+
81+
[hello]
82+
500
83+
1000
84+
1500
85+
2000
86+
2500
87+
...
88+
```
89+
90+
The pseudo-ftdi connector has the following pin-out:
91+
- 1: GND (marked on bottom)
92+
- 2: LPC824 P17/A9
93+
- 3: 5V (marked on bottom)
94+
- 4: LPC824 P11/SDA
95+
- 5: LPC824 P10/SCL
96+
- 6: LCP824 P23/A3/C4
97+
98+
The JeePort connector has the following pin-out:
99+
- 1: LPC824 SWDIO/P2 (not 5v unlike JeeNodes!)
100+
- 2: LPC824 P14/A2/C3
101+
- 3: GND
102+
- 4: 3.3V (reg output)
103+
- 5: LPC824 P13/A10
104+
- 6: LPC824 SWCLK/P2
105+
106+
Reflashing the jn-esp's esp8266 itself (as opposed to the attached uController):
107+
_you should not need to do this!_, in general use the over-the-air reflashing by downloading the latest release.
108+
If you cannot reflash over-the-air and need to reflash serially, there are SMD pads for an FTDI connector on the
109+
bottom of the PCB below the esp-03 module. GND is marked. The best is to solder a right-angle
110+
connector to it such that the pins point up (i.e. to the component side). You can then
111+
hook-up a USB-BUB. I recommend jumpering the flash pin (next to GND) to GND and to
112+
hook the reset pin (6) to the USB-BUB's DTR (should happen automatically). RX&TX also go
113+
straight through).
114+
115+
Wifi-link-12
116+
------------
117+
118+
The wifi-link has an esp-12 modulde, an FTDI connector, and a 2-pin power connector.
119+
The underside is marked "Wifi-link-12-v2 Jeelabs TvE2015".
120+
It comes preloaded with the latest version of esp-link V2.
121+
122+
The ftdi connector has the following pin-out:
123+
- 1: GND (marked top&bottom)
124+
- 2: CTS (used as ISP to program ARM processors, also esp's TX when flashing the esp)
125+
- 3: 5V (marked on bottom)
126+
- 4: TX (from the esp)
127+
- 5: RX (to the esp)
128+
- 6: DTR (used ass reset to program AVR and ARM processors, also esp's RX when flashing the esp)
129+
130+
Power: the on-board LM3671 switching regulator can provide 600mA while staying cool and is good from about 3.6v to 5.5v!
131+
Connect power to the marked power connector or to the FTDI connector (GND marked, 5V on 3rd pin). Do not exceed 5.5v!!
132+
133+
It is possible to bypass the on-board regulator and power the wifi-link directly with 3.3v: connect the 3.3v to the FTDI connector ("5v" pin) and switch the jumper on the bottom from 5v to 3v3 (you need to cut the tiny trace on the 5v side and jumper the two pads on the 3v3 side).
134+
135+
On power-up you should see the green LED on for ~1 second (the yellow should go on too, but
136+
the firmware may not be configured correctly). After that the green should blink according to the
137+
patterns described in the README's LED indicators section. Follow the Wifi configuration details
138+
section thereafter.
139+
140+
The bottom also has a "sleep" jumper which connects the esp's reset pin with its gpio16 to enable deep-sleep
141+
mode. This jumper is open and must be bridged to use the timed-wake-up feature of the esp's deep-sleep mode.
142+
143+
To connect a JeeNode to the esp-bridge to flash the AVR or debug it, plug it into the FTDI
144+
port straight, i.e. the component side of the JeeNode and of the wifi-link will be on the top.
145+
146+
To connect an arduino, jumper gnd, tx, rx, and dtr for reset. The wifi-link-12-v2 has a 2.2K resistor on rx (serial going from AVR to esp) in order to protect it from 5v signals.
147+
148+
To program the JeeNode or AVR, having set-up the Wifi through the web pages, run avrdude with an
149+
option like "-Pnet:esp-link:23" (you can use an IP address instead of `esp-link`). My test command
150+
line is as follows:
151+
```
152+
/home/arduino/arduino-1.0.5/hardware/tools/avrdude \
153+
-C /home/arduino/arduino-1.0.5/hardware/tools/avrdude.conf -DV -patmega328p \
154+
-Pnet:esp-link:23 -carduino -b115200 -U flash:w:greenhouse.hex:i
155+
```
156+
If you're using "edam's Arduino makefile" then you can simply set `SERIALDEV=net:esp-link:23` in your
157+
sketch's Makefile. You can also use port 2323 which forces programming mode (no real benefit with avrdude, but can
158+
enable programming PICs).
159+
160+
Serially reflashing the wifi-link itself (as opposed to the attached uController):
161+
_you should not need to do this!_, in general use the over-the-air reflashing by downloading the latest release.
162+
If you cannot reflash over-the-air and need to reflash serially, follow this process:
163+
- connect TX of the programmer (such as USB-BUB or a FDTI-friend) to DTR (FTDI pin 6)
164+
- connect RX of the programmer to CTS (FTDI pin 2)
165+
- short the flash jumper on the top of the board (push tweezers or a piece of wire into the jumper gap),
166+
the green LED will be on solid when you have contact
167+
- briefly interrupt the power to reset the esp
168+
- it will now be in flash mode: the green LED should be off (assuming you release the flash jumper),
169+
if you see the green LED come on it has rebooted into esp-link and you need to reset it again
170+
(the whole proess take some fiddling, you can solder a real jumper or switch to the flash pads and there's a similar
171+
reset jumper pad on the bottom of the PCB).
172+
- use your favorite programming tool to reflash, you have time if the esp really entered programming mode, it often takes me
173+
2-3 tries until the programming works
174+
175+
Serial flashing
176+
---------------
177+
178+
Once you have a version of esp-link flashed to your module or if you received a pre-flashed
179+
module from me you should not need this section. But sometimes things fail badly and your
180+
module is "brocked", this is how you receover.
181+
182+
### Installing esptool.py
183+
184+
On Linux I am using [esptool.py](https://github.com/themadinventor/esptool) to flash the esp8266.
185+
If you're a little python challenged (like I am) then the following install instructions might help:
186+
- Install ez_setup with the following two commands (I believe this will do something
187+
reasonable if you already have it):
188+
189+
wget https://bootstrap.pypa.io/ez_setup.py
190+
python ez_setup.py
191+
192+
- Install esptool.py:
193+
194+
git clone https://github.com/themadinventor/esptool.git
195+
cd esptool
196+
python setup.py install
197+
cd ..
198+
esptool.py -h
199+
200+
### Flashing esp-link
201+
202+
Using esptool.py a esp-link release can be flashed as follows:
203+
```
204+
curl -L https://github.com/jeelabs/esp-link/releases/download/0.10.1/esp-link.tgz | tar xzf -
205+
cd esp-link
206+
esptool.py write_flash 0x00000 boot_v1.4\(b1\).bin 0x1000 user1.bin 0x7e000 blank.bin
207+
```
208+
If you want to speed things up a bit and if you need to specify the port you can use a command
209+
line like:
210+
```
211+
esptool.py --port /dev/ttyUSB0 --baud 460880 write_flash 0x00000 boot_v1.4\(b1\).bin \
212+
0x1000 user1.bin 0x7e000 blank.bin
213+
```

0 commit comments

Comments
 (0)