Giter Site home page Giter Site logo

homeaccessorykid / esp8266-homekit-demo Goto Github PK

View Code? Open in Web Editor NEW
125.0 125.0 27.0 63 KB

User part of the ESP8266-HomeKit foundation

Home Page: https://www.youtube.com/watch?v=Xnr-utWDIR8

License: Apache License 2.0

Makefile 13.22% C 77.47% Shell 9.31%

esp8266-homekit-demo's People

Contributors

adysan avatar homeaccessorykid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266-homekit-demo's Issues

How can I reset between attempts?

I managed to load both the Demo and Button-led examples. But after a few attempts of recompiling and reloading the accessory on my iOS device, the iOS device stops seeing my new attempts.

I am changing hkc_init("myApp"); between each iteration to myApp1, myApp2, etc. In the beginning I can see the new versions, but then my iOS device stops seeing it and only see the old one.

You write:

if something went wrong, go to the foundation, and change the signature string to something else and you can start from scratch
but I can't find the signature string in the foundation, mostly because I don't know what you refer to.

I run Apple's HomeKit Accessory Simulator, and I can see these accessories, and keep adding and removing them.

I have attached iOS-Home screenshot from my iPhone and iPad simultaneously, they show various version of the same single ESP8266 circuit.

Something is not been reset in the iOS device. Can anybody help?

Thanks.

img_1150
img_1007

Demo$ ./gen_misc.sh don't work

error:
collect2: error: ld returned 1 exit status
make: *** [.output/eagle/debug/image/eagle.app.v6.out] Error 1
среда, 29 ноября 2017 г. 11:02:45 (MSK)
ls: /Volumes/cs/esp-open-sdk/ESP8266_RTOS_SDK/bin/eagle.[if]*: No such file or directory

ls: cannot access '../../bin/eagle.[if]*': No such file or directory

I get:

Generate eagle.flash.bin and eagle.irom0text.bin successully in BIN_PATH
eagle.flash.bin-------->0x00000
eagle.irom0text.bin---->0x20000
!!!
Thu Sep 21 10:13:48 DST 2017
ls: cannot access '../../bin/eagle.[if]*': No such file or directory
../../../esptool/esptool.py --baud 230400 -p /dev/cu.usbserial-AH02MF3H write_flash 0x00000 ../../bin/eagle.flash.bin 0x14000 ../../bin/eagle.irom0text.bin

Is that ls: cannot access '../../bin/eagle.[if]*': No such file or directory cosmetic or an issue?

button GPIO interrupt routine

In order to make the suggested button to give some local input to the accessory, I am trying to find out how to make a GPIO interrupt routine.
For now I'm not finding any useful examples, only stuff that doesn't compile.

Can anyone suggest where to look/give a working example??

Travis CI build

I've attempted to enable a Travis CI build on this repo. This is the first time I've setup Travis CI, so kindly excuse any noob mistakes on my part. The build seems to be working fine, however, I have some open questions.

  • This line calling ./gen_misc.sh exits with error code 0 even if the script fails. This makes the CI build rather useless. I suppose this is due to the hardcoded y I'm putting as input to the script. Is there a better way to do this?

  • I've used install_toolchain.sh from esp-open-rtos, what is the best way to cite this?

  • I've not sure how long Travis CI maintains the cache, but if the builds are far apart, it probably needs to build the whole toolchain, which takes about ~10mins.

Clear installation guide

I have tried some things, to install the development env om my Mac.
Lots of errors and I don't really know what I am installing.
The whole ESP world is pretty much new for me.

Would it be possible to give me some clear steps on what to install?
I am basically starting from scratch.

The readme in button-led mentions this:

This will create (after several minutes) the files:

../../bin/eagle.flash.bin
../../bin/eagle.irom0text.bin

No clue on how this should happen, getting lots of errors. I think I miss a lot of dependencies.
The install_toolchain.sh also results in errors.

{Enhancement} Suggestions

  • Add button switch to example, that reflects in Home app. I.e. a physical button on the ESP8266 switches the light on/off and status is reflected in the Home app. #4 #6

  • Add more profiles/examples? Doorbell, Switch, Lightbulb, Fan, Garage Door, Window Blinds?, Motion Sensor (with push notification)

How do I add an MAC address to the device name?

Hello! Sorry for the stupid question.

File: user_main.c
Void: hkc_user_init

chas=addService( sers,++iid,APPLE,SWITCH_S);
addCharacteristic(chas,aid,++iid,APPLE,NAME_C,"Switch",NULL);

How to add the MAC address so that it was "Switch_01020304"

Invert value of cJSON struct

Helllo,

In the example led-button, instead of the routine interrupt on GPIO0:
new=GPIO_INPUT(GPIO_Pin_2)^1; //get new state
GPIO_OUTPUT(GPIO_Pin_2,new); //toggle
gpio2.value->type=new;
change_value( gpio2.aid,gpio2.iid,gpio2.value);
send_events(NULL,gpio2.aid,gpio2.iid);

I would like to inverse the value of gpio2.value, something like this :
gpio2.value=!gpio2.value; => What is the operator for a struct cJSON *?
change_value( gpio2.aid,gpio2.iid,gpio2.value);
send_events(NULL,gpio2.aid,gpio2.iid);
Is it possible?

Thanks

Flash memory map

Hello @HomeACcessoryKid just curious, would you mind explain me the flash map? I wanted to implement SPIFFS but I noticed most of the info is saved directly as slots into the flash memory, for instance I notice that the main sector is 0x13 and the first 80 bytes are for configuration, basically for a 512k flash, what do you think could be the start address for spiffs

Village at sha2017.org

A homekit village has been started by me.

I will attend at SHA2017, the famous hacker festival in the Netherlands held every 4 years.

I hope we can meet with likeminded HomeKit hackers and make the Arduino library or assembly crypto. And make those hardware items that have shown up the other day...

If you are interested, please leave a message or contact me at home-accessory-at-xs4all.nl

Stuck on pairing 1

So I got everything working... but my iOS device can not find the esp.... it is stuck on pairing 1

Any suggestions? Thanks in advance! Good work on the HomeKit project btw.!!

Greetings, i7clock

Thermostat Sensor example

CLONED from API repository to demo repository, please stick to the format?
@faronov commented
Hi
I'm very interesting about this project, it looks very promise.
I'm not a developer guru, but can read and modify some code :)
I'm looking how to write thermostat code, I understand how to read temperature sensor
But can't understand how to store HEATING_THRESHOLD_TEMPERATURE_C
and where it can be stored

Also in your demo, I see how to get state from a sensor when it requested,
but how to get state continuously?
Like get the temperature from a sensor, compare with stored HEATING_THRESHOLD_TEMPERATURE_C and turn on or off relay when it needed, without interacting with homekit?
👍 1
@ageorgios

@ageorgios commented
I cannot answer your question, but on which hardware you are trying to implement the thermostat? Sonoff?
@faronov

@faronov commented
It can be Sonoff
but I have some devices with esp12 or esp7 modules
I made ESPurna-H board
http://tinkerman.cat/the-espurna-board-a-smart-wall-switch-with-power-monitoring/

P.S.
I also interesting to add power usage monitoring but it seems to look like power usage not supported homekit directly.
Only in custom profile with Elgato EVE application.
But this is another story :)

Stepper delay

Hi, I'm trying to make door lock with stepper motor. I implemented code for stepper instead of led in your user_main.c, but I need delay of 2ms between the steps and vTaskDelay is 10ms. I tried to change configTICK_RATE_HZ from 100 to 1000 in FreeRTOSConfig.h, but with no effect. Can you please help me with this? Can I change vTaskDelay to 1ms? or can I use some other way to make 2ms pauses between steps? thank you!

AiLight - user_main.c:70:1: error: unknown type name 'acc_item'

user_main.c:70:1: error: unknown type name 'acc_item'
extern acc_item acc_items[];
^
user_main.c: In function 'lightSET':
user_main.c:127:49: error: request for member 'json' in something not a structure or union
on=cJSON_GetObjectItem(acc_items[mylight.on].json,"value")->type;
^
user_main.c:129:55: error: request for member 'json' in something not a structure or union
bri=cJSON_GetObjectItem(acc_items[mylight.bri].json,"value")->valueint;
^
user_main.c:130:55: error: request for member 'json' in something not a structure or union
hue=cJSON_GetObjectItem(acc_items[mylight.hue].json,"value")->valueint;
^
user_main.c:131:55: error: request for member 'json' in something not a structure or union
sat=cJSON_GetObjectItem(acc_items[mylight.sat].json,"value")->valueint;
^
make[1]: *** [.output/eagle/debug/obj/user_main.o] Error 1
make: *** [.subdirs] Error 2

Adding WeMo/fauxmoesp - Alexa support?

Would it be possible to add support for WeMo via for example fauxmoesp to the demo? This to have it interact with the HomeKit portion as well. If so this code base/example would make the perfect universal device/switch since it would have both HomeKit and Alexa support all rolled into one simple solution.

Fauxmoesp
https://bitbucket.org/xoseperez/fauxmoesp

It works fine, but why my log always garbled?

Hi, I try some baud rate like 74880, 9600, 115200, 230400, but it always garbled!
So What is the correct baud rate?
I use AiLight code.And I try to init uart use uart_init_new() command and use default baud rate 74880 it's always garbled !

Do you have any idea?

Thanks you!

Pairing failing on AiLight

ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 32048, room 16
tail 0
chksum 0xda
load 0x3ffe8000, len 2996, room 8
tail 12
chksum 0xdd
ho 0 tail 12 room 4
load 0x3ffe8bc0, len 3640, room 12
tail 12
chksum 0xb3
csum 0xb3
OS SDK ver: 1.5.0-dev(4e7f435) compiled @ Aug 25 2017 19:26:38
phy ver: 1055_1, pp ver: 10.7

rf cal sector: 11
w_flash
tcpip_task_hdl : 3fff0d28, prio:10,stack:512
idle_task_hdl : 3fff0dc8,prio:0, stack:384
tim_task_hdl : 3fff3580, prio:2,stack:512
start of user_init @ 301
hkc by HomeACcessoryKid! Compiled Oct 25 2017@03:32:47 Heap: 47424
EspMsgMutex created
ffffffffffffffffffffffffffffffff00
initializing flash in 5 seconds
initializing flash
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
key written: 0
1477a63bae5d22d7e643adc2437722ad4b921cbea9903f92d673f70b597d4b9b42475deaa85d94a86efcbd648243e3a953286c8358f3d3688e6ca7b53f57aaa5
username written: F5:80:EFE30:72:1
myUsername: F5:80:EF:30:72:1E
pairing: 1
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
end of user_init @ 5523
mode : sta(5c:cf:7f:10:45:ef)
add if0
system time: 5534
s: d4cc6637d0e7913a3332df3759c584e0
b: e226aca19d76446580575f112e2ab5525eb5cd4460966d469e385fdf8d7d00a3
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 7
pm open phy_2,type:2 0 0
cnt

connected with Payziyev Residence, channel 6
dhcp client start...
ip:192.168.1.9,mask:255.255.255.0,gw:192.168.1.1
srp_prepare done: system time: 30114
B: 4623adb259df5c41451e1c690d6746da3ba6f7c86807b9d4302d3793dad46255b1ba4c3378b6a84b6b276ae314c51711c96bd77d03da26ec17d2b0e3bbe18a900c19e4ac1538cb67ee51e0dc3e69cde46b3546fae0c773569a2b2de1349b7affb1beb38eb2a1edf552e7030f97911873b9a3fcfc9d5146d41426aed6abd08130849806b18ece89333eea023fdaf4301a22c7e08f34505333318186c3a430242e5b0c09638bb1a7b23195e2eaabf7c335c81bfd5505929aee2eb54ea92b8c0da45f8dd2a66cf2e80cd1b22e5dc7d5b2e12a5a805ce6f54fd1a8e131e92eaab699f771bc0c7918d0e3ae3023fd985d1c1b6a1b67223060eb9dc9f2909b8e37456947614bc4ea7a3e9b96b1736566227068624c92cc569ba23a4545aa2b7e38a82d576331944361b2eff11d3569060d8e1ad3ab92b32907245b885d1d9400ddee702f4b3add473dc9684198caf32cda6a8ef1c76b375d60c5e63f1420071b685c845619947facef8e9816b13796831efde8a724683ae165592625693071d6d959cf
ServerInitPriority:1
pairing 1, heap 31968, system time=30243
waiting for task
pairing 1, heap 31968, system time=33242
pairing 1, heap 31968, system time=36242
pairing 1, heap 31968, system time=39242
pairing 1, heap 31968, system time=42242
pairing 1, heap 31968, system time=45242
pairing 1, heap 31968, system time=48242
pairing 1, heap 31968, system time=51242
pairing 1, heap 31968, system time=54242
pairing 1, heap 31968, system time=57242
pairing 1, heap 31968, system time=60242
pairing 1, heap 31968, system time=63244
pairing 1, heap 31968, system time=66242
pairing 1, heap 31968, system time=69242
pairing 1, heap 31968, system time=72242
pairing 1, heap 31968, system time=75242
pairing 1, heap 31968, system time=78242
pairing 1, heap 31968, system time=81242
pairing 1, heap 31968, system time=84242
pairing 1, heap 31968, system time=87242
pairing 1, heap 31968, system time=90242
pairing 1, heap 31968, system time=93242
pairing 1, heap 31968, system time=96242
pairing 1, heap 31968, system time=99242
pairing 1, heap 31968, system time=102242
pairing 1, heap 31968, system time=105242
pairing 1, heap 31968, system time=108242
pairing 1, heap 31968, system time=111242
pairing 1, heap 31968, system time=114242
pairing 1, heap 31968, system time=117242
pairing 1, heap 31968, system time=120242
pairing 1, heap 31968, system time=123242
pairing 1, heap 31968, system time=126242
pairing 1, heap 31968, system time=129242
pairing 1, heap 31968, system time=132242
pairing 1, heap 31968, system time=135242
pairing 1, heap 31968, system time=138242
pairing 1, heap 31968, system time=141242
pairing 1, heap 31968, system time=144243
pairing 1, heap 31968, system time=147242
pairing 1, heap 31968, system time=150242
pairing 1, heap 31968, system time=153242
pairing 1, heap 31968, system time=156242
pairing 1, heap 31968, system time=159242
pairing 1, heap 31968, system time=162242
pairing 1, heap 31968, system time=165242
pairing 1, heap 31968, system time=168242
pairing 1, heap 31968, system time=171242
pairing 1, heap 31968, system time=174242
pairing 1, heap 31968, system time=177242
pairing 1, heap 31968, system time=180242
pairing 1, heap 31968, system time=183242
pairing 1, heap 31968, system time=186242
pairing 1, heap 31968, system time=189242
pairing 1, heap 31968, system time=192242
pairing 1, heap 31968, system time=195242
pairing 1, heap 31968, system time=198242
pairing 1, heap 31968, system time=201242
pairing 1, heap 31968, system time=204242
pairing 1, heap 31968, system time=207242
pairing 1, heap 31968, system time=210242
pairing 1, heap 31968, system time=213242
pairing 1, heap 31968, system time=216242
pairing 1, heap 31968, system time=219242
pairing 1, heap 31968, system time=222242
pairing 1, heap 31968, system time=225242
pairing 1, heap 31968, system time=228242
pairing 1, heap 31968, system time=231242
pairing 1, heap 31968, system time=234242
pairing 1, heap 31968, system time=237242
pairing 1, heap 31968, system time=240242
pairing 1, heap 31968, system time=243242
pairing 1, heap 31968, system time=246242
p_sema taken
3fff26d0 connects from 192.168.1.4:57584 id:00000001
p_sema locked
server got a packet from 192.168.1.4:57584 at 248415
len:126
len:126
A_dat:6,tot:6,lenght:6
dsl: 6, tl: 6, hl: 120, len: 6
normal packet saved
POST/S: pair-setup C: F:
pParseB: 000100060101
pair-setup
t:0-n:1
t:6-n:1
0:00
6:01
Free heap1:30600
srp pair step 1! Free heap:30160
s: d4cc6637d0e7913a3332df3759c584e0
i=0,t=6,l=1
i=8,t=2,l=16
i=32,t=3,l=384
chunked_len: 432
Priority:10
485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601020d0a31320d0a0210d4cc6637d0e7913a3332df3759c584e00d0a3138340d0a03ff4623adb259df5c41451e1c690d6746da3ba6f7c86807b9d4302d3793dad46255b1ba4c3378b6a84b6b276ae314c51711c96bd77d03da26ec17d2b0e3bbe18a900c19e4ac1538cb67ee51e0dc3e69cde46b3546fae0c773569a2b2de1349b7affb1beb38eb2a1edf552e7030f97911873b9a3fcfc9d5146d41426aed6abd08130849806b18ece89333eea023fdaf4301a22c7e08f34505333318186c3a430242e5b0c09638bb1a7b23195e2eaabf7c335c81bfd5505929aee2eb54ea92b8c0da45f8dd2a66cf2e80cd1b22e5dc7d5b2e12a5a805ce6f54fd1a8e131e92eaab699f771bc0c7918d0e3ae3023fd985d1c1b6a1b67223060eb9dc9f2909b8e374503816947614bc4ea7a3e9b96b1736566227068624c92cc569ba23a4545aa2b7e38a82d576331944361b2eff11d3569060d8e1ad3ab92b32907245b885d1d9400ddee702f4b3add473dc9684198caf32cda6a8ef1c76b375d60c5e63f1420071b685c845619947facef8e9816b13796831efde8a724683ae165592625693071d6d959cf0d0a300d0a0d0a
to be sent by tlv8_send routine
arg=3fff2940, ptrespconn=3fff26d0, pcryp=3fff2940
send result: 0
Free heap2:28960
server sent a packet to 192.168.1.4:57584 at 249122
pairing 1, heap 30752, system time=249242
p_sema locked
server got a packet from 192.168.1.4:57584 at 251474
len:579
len:579
A_dat:457,tot:457,lenght:457
dsl: 457, tl: 457, hl: 122, len: 457
normal packet saved
POST/S: pair-setup C: F:
pParseB: 06010303ff8e809402eaf4ae809fef89c4317247d94171f596aeb5b16c8ac1c47ca89f3788dee70348c5df48d7073da64d8436a52d840f173c4941f6e61c87a6474d06878aaf4d52839a96a7ed233815b9404637c2d949a59c66868d4de8416f2c9632db05bb7a40107e49f0ae8e43031e3685f50f0b02186be30e9c66f19e440dcc9e8e4e2ea0ed4fed12f024244e254b4c804631e8a2cf2b9c061ee3a3ce414a0b92ff8bd3bcf539ebeacfd80a0566534f87a001dccd058c446cd07179bfcecd282c444ea4fd66bf1f60196860b4969332681210ba69eab117c8b3341a5085af374c7806320ffc524b13ac5d7e25c7b59e4bd4545cf68c792120b22297d1a6226354c00381c104687da7c7f8a782c0dfd82ae33b8e9a6c8435070fad69439757fc459d9ab186c7706bd5dd2988af1e49a6816f3c5119c5b286c15adb65d77f5449057dbac68094d45fc269965c349f6ceaf7d93bcec7016da7e23f94b497680f751df428c754976fd32e9258d224bfb71a74d5e44f45f4c4d6410606353e339f778aca2ff58c0440b51fa8f1fbad42fd48abffcfde6cbca6ebfdab11736071a06d7b39cae98fa1669a3d44407596b0d6e2d3e6c67650bf017a1b2b84b5c3ad4fb8e0e90a5e1202bf
pair-setup
t:6-n:1
t:3-n:255
t:3-n:384
t:4-n:64
3:8e809402eaf4ae809fef89c4317247d94171f596aeb5b16c8ac1c47ca89f3788dee70348c5df48d7073da64d8436a52d840f173c4941f6e61c87a6474d06878aaf4d52839a96a7ed233815b9404637c2d949a59c66868d4de8416f2c9632db05bb7a40107e49f0ae8e43031e3685f50f0b02186be30e9c66f19e440dcc9e8e4e2ea0ed4fed12f024244e254b4c804631e8a2cf2b9c061ee3a3ce414a0b92ff8bd3bcf539ebeacfd80a0566534f87a001dccd058c446cd07179bfcecd282c444ea4fd66bf1f60196860b4969332681210ba69eab117c8b3341a5085af374c7806320ffc524b13ac5d7e25c7b59e4bd4545cf68c792120b22297d1a6226354c0c104687da7c7f8a782c0dfd82ae33b8e9a6c8435070fad69439757fc459d9ab186c7706bd5dd2988af1e49a6816f3c5119c5b286c15adb65d77f5449057dbac68094d45fc269965c349f6ceaf7d93bcec7016da7e23f94b497680f751df428c754976fd32e9258d224bfb71a74d5e44f45f4c4d6410606353e339f778aca2ff58c
4:b51fa8f1fbad42fd48abffcfde6cbca6ebfdab11736071a06d7b39cae98fa1669a3d44407596b0d6e2d3e6c67650bf017a1b2b84b5c3ad4fb8e0e90a5e1202bf
6:03
Free heap3:29696
Free heap4:29696
srp pair step 3!

Free heap:31024
pairing 1, heap 25024, system time=252242
pairing 1, heap 11288, system time=255252
3fff26d0 conn, rev:3fff0930, nxt:00000000, act:3, 192.168.1.4:57584, cid:01
pairing 1, heap 9240, system time=258262
pairing 1, heap 11288, system time=261272
pairing 1, heap 11288, system time=264282
pairing 1, heap 9240, system time=267292
3fff26d0 conn, rev:3fff0930, nxt:00000000, act:3, 192.168.1.4:57584, cid:01
pairing 1, heap 7048, system time=270302
pairing 1, heap 9096, system time=273312
pairing 1, heap 7048, system time=276322
key: 14a1a13864ad550c0281738accdeb00d38c0f15705f3c549a78dec37883c552999a73e38b8b89c679ec5b0ae7507400627e1906e09ded90a738894fe510b7a34
i=0,t=6,l=1
i=8,t=4,l=64
chunked_len: 85
485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601040d0a34320d0a04402768385d1b6a3db8563ce7c840da5f98bdaef8e03ec69110aea9b4696f748e5655747b242a21f0a7b14f2470bb8a54afca4662424f4659c624bc7176ca29dec50d0a300d0a0d0a
to be sent by tlv8_send routine
arg=3fff2940, ptrespconn=3fff26d0, pcryp=3fff2940
send result: 0
waiting for task
server sent a packet to 192.168.1.4:57584 at 277380
p_sema locked
server got a packet from 192.168.1.4:57584 at 277404
len:281
len:281
A_dat:159,tot:159,lenght:159
dsl: 159, tl: 159, hl: 122, len: 159
normal packet saved
POST/S: pair-setup C: F:
pParseB: 059a82e2a5ba325236dcc963685f0733d8c484b0aaf51cc65a7145a4bbd2b7c812470a93e3fa6505224ade8b226463d0984d028d3a0487ed50d879c251df5f024199da4d8f91a4ecec9af76a6cb8c1f3deb76b0521ee576eae92b9481b939ebfa3431b1eaeae8c775e25618844e9bd8e23d092b17f9a72957ce1722afd3f95b7063455022a43f6495bd05d731ddcc06fb6ebe490df6a43864dfe1c8f060105
pair-setup
t:5-n:154
t:6-n:1
5:82e2a5ba325236dcc963685f0733d8c484b0aaf51cc65a7145a4bbd2b7c812470a93e3fa6505224ade8b226463d0984d028d3a0487ed50d879c251df5f024199da4d8f91a4ecec9af76a6cb8c1f3deb76b0521ee576eae92b9481b939ebfa3431b1eaeae8c775e25618844e9bd8e23d092b17f9a72957ce1722afd3f95b7063455022a43f6495bd05d731ddcc06fb6ebe490df6a43864dfe1c8f
6:05
Free heap5:30200
Free heap6:30200
srp pair step 5!

Free heap:30840
encKey0:ecb89bcac5233a648d84ee8beb4ea5ad89f1d40a67a7cdbbada4f98f34b70517
t:1-n:36
t:3-n:32
t:10-n:64
1:32313634353037462d343445432d344636372d423138432d413934333135314543423938
3:a7e3235f8ac208d0b499e52d3f2a27986215f135b28f498eb84d957304e8a45d
10:f3fffbb426cb704879f43208bfd2ae06f0df9e41ec5217c18bb2bc0a4e96e6d3f9eda74efcbbd7cc24e08375d923543f162a62ee0b9d07449ca2c7624c1e9709
myLTPK: 42475deaa85d94a86efcbd648243e3a953286c8358f3d3688e6ca7b53f57aaa5
verified=1 r=0
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
writing paired client to flash
7fffffffffffffffffffffff32313634353037462d343445432d344636372d423138432d413934333135314543423938a7e3235f8ac208d0b499e52d3f2a27986215f135b28f498eb84d957304e8a45d
i=0,t=6,l=1
i=8,t=5,l=135
chunked_len: 156
identify_task started
bri 100
h=0,s=0,b=100
r=0,g=0,b=0,w=4095
{
"accessories": [{
"aid": 1,
"services": [{
"iid": 1,
"type": "0000003E-0000-1000-8000-0026BB765291",
"characteristics": [{
"iid": 2,
"type": "00000023-0000-1000-8000-0026BB765291",
"perms": ["pr"],
"format": "string",
"maxLen": 64,
"value": "AiLightS"
}, {
"iid": 3,
"type": "00000020-0000-1000-8000-0026BB765291",
"perms": ["pr"],
"format": "string",
"maxLen": 64,
"value": "HacK"
}, {
"iid": 4,
"type": "00000021-0000-1000-8000-0026BB765291",
"perms": ["pr"],
"format": "string",
"maxLen": 64,
"value": "Rev-1"
}, {
"iid": 5,
"type": "00000030-0000-1000-8000-0026BB765291",
"perms": ["pr"],
"format": "string",
"maxLen": 64,
"value": "10000"
}, {
"iid": 6,
"type": "00000014-0000-1000-8000-0026BB765291",
"perms": ["pw"],
"format": "bool"
}]
}, {
"iid": 7,
"type": "00000043-0000-1000-8000-0026BB765291",
"characteristics": [{
"iid": 8,
"type": "00000023-0000-1000-8000-0026BB765291",
"perms": ["pr"],
"format": "string",
"maxLen": 64,
"value": "light"
}, {
"iid": 9,
"type": "00000025-0000-1000-8000-0026BB765291",
"perms": ["pw", "pr", "ev"],
"format": "bool",
"events": true,
"value": true
}, {
"iid": 10,
"type": "00000013-0000-1000-8000-0026BB765291",
"perms": ["pw", "pr", "ev"],
"minValue": 0,
"maxValue": 360,
"minStep": 1,
"unit": "arcdegrees",
"format": "float",
"events": true,
"value": 0
}, {
"iid": 11,
"type": "0000002F-0000-1000-8000-0026BB765291",
"perms": ["pw", "pr", "ev"],
"minValue": 0,
"maxValue": 100,
"minStep": 1,
"unit": "percentage",
"format": "float",
"events": true,
"value": 0
}, {
"iid": 12,
"type": "00000008-0000-1000-8000-0026BB765291",
"perms": ["pw", "pr", "ev"],
"minValue": 0,
"maxValue": 100,
"minStep": 1,
"unit": "percentage",
"format": "int",
"events": true,
"value": 100
}]
}]
}]
}
485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601060d0a38390d0a058719fcbbc86f5a3b718ed4acdeb9768c421f5860e5948ee0e8a8ca0d0fb4c4dd3d1bea8682d5121f89a4db0d6f6c0a7631e3251ade15129bf2c8d2894ed8115ce8180d587d7c8643ba33f73ab9fb79dd1653c0aae4389c8f783c75064506f0e99c48d8431cbda6dce14bb8e10fe516ded36c1441d71ab7d6546ed2471e6d0574016687a5f9386f610d0a300d0a0d0a
to be sent by tlv8_send routine
arg=3fff2940, ptrespconn=3fff26d0, pcryp=3fff2940
send result: 0
waiting for task
server sent a packet to 192.168.1.4:57584 at 278627
client 192.168.1.4:57584 disconnected with status 0
Cleaning 3fff2940 @ 279265 CID: 1
Freeing 3fff2940 @ 279266
p_sema taken
3fff27e8 connects from 192.168.1.4:57585 id:00000001
p_sema locked
server got a packet from 192.168.1.4:57585 at 279287
len:159
len:159
A_dat:37,tot:37,lenght:37
dsl: 37, tl: 37, hl: 122, len: 37
normal packet saved
POST/S: pair-verify C: F:
pParseB: 0601010320bc21736e836bf2188db3b408ae07c68901069fd0740b1e58984de0b07db0847a
pair-verify
t:6-n:1
t:3-n:32
3:bc21736e836bf2188db3b408ae07c68901069fd0740b1e58984de0b07db0847a
6:01
Free heap1:21352
Free heap2:21352
pairing 1, heap 21560, system time=279335
pair verify step 1 at 279340

Free heap:21928
mycurvekey: b6abd7374f42e248078c4efaa852791136c909f794b201fe8c3baf8b65532f50
clcurvekey: bc21736e836bf2188db3b408ae07c68901069fd0740b1e58984de0b07db0847a
system time: 279605
shared secret time: 261
sessionkey: cbb3919787af93cc2f172f23f633126e7687333d90c196f2a3abb045a16d5654
system time: 279867
sign message time: 100
edsign: 0
system time: 279967
i=0,t=6,l=1
i=8,t=5,l=101
i=117,t=3,l=32
chunked_len: 162
485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601020d0a36370d0a05654302e7ee593a955caf4efd972cbc976488997692bfb6f01c92137ba1305460e2a5868f0b4f3ef4cb749dd004b7c5f0d257fae354627bccf2f9feebf8f7ec62df6b55c9faf585a3579d6e8154336138ef78099b16016dff0b767ba2bf84c4e3adbf76d5007d0d0a32320d0a0320b6abd7374f42e248078c4efaa852791136c909f794b201fe8c3baf8b65532f500d0a300d0a0d0a
to be sent by tlv8_send routine
arg=3fff2a20, ptrespconn=3fff27e8, pcryp=3fff2a20
send result: 0
waiting for task
server sent a packet to 192.168.1.4:57585 at 280138
p_sema locked
server got a packet from 192.168.1.4:57585 at 280185
len:248
len:248
A_dat:125,tot:125,lenght:125
dsl: 125, tl: 125, hl: 123, len: 125
normal packet saved
POST/S: pair-verify C: F:
pParseB: 0578fd3d311765c19b7a8c7a7f9d022ad37f89afc4a28b169144770dbfae61b1f57c706d58b07ccf365a396e9017aba3a196f60614ffad9f2e0764593362b3ca7c6364b725469c57ad18b485f640f722a68be0f233d92a76e67d47424b2002f795ef1b0ff21d0b1e1fbeeebee4d61c968670c7c77e3cd7706a33060103
pair-verify
t:5-n:120
t:6-n:1
5:fd3d311765c19b7a8c7a7f9d022ad37f89afc4a28b169144770dbfae61b1f57c706d58b07ccf365a396e9017aba3a196f60614ffad9f2e0764593362b3ca7c6364b725469c57ad18b485f640f722a68be0f233d92a76e67d47424b2002f795ef1b0ff21d0b1e1fbeeebee4d61c968670c7c77e3cd7706a33
6:03
Free heap3:21160
Free heap4:21160
pair verify step 3 at 280273

Free heap:21928
t:1-n:36
t:10-n:64
1:32313634353037462d343445432d344636372d423138432d413934333135314543423938
10:d7dcf3b6a91a073c2cea12f411d1074fed4be0e63a9b11f0ad45b8c6f94e24f376de42f149bb18995e49a8baf588b9db724f5883fa2477db998940f5b7551204
2164507F-44EC-4F67-B18C-A943151ECB98 -- 7fffffffffffffffffffffff32313634353037462d343445432d344636372d423138432d413934333135314543423938a7e3235f8ac208d0b499e52d3f2a27986215f135b28f498eb84d957304e8a45d
key 0 loaded - result: 0
system time: 280341
system time: 280343
verify message time: 312, verified=1 r=0
i=0,t=6,l=1
chunked_len: 13
485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601040d0a300d0a0d0a
to be sent by tlv8_send routine
arg=3fff2a20, ptrespconn=3fff27e8, pcryp=3fff2a20
send result: 0
server sent a packet to 192.168.1.4:57585 at 280705
waiting for task
3fff27e8 conn, rev:3fff0930, nxt:00000000, act:3, 192.168.1.4:57585, cid:01
pairing 1, heap 21560, system time=282342
pairing 1, heap 21560, system time=285342
pairing 1, heap 21560, system time=288342
pairing 1, heap 21560, system time=291342
3fff27e8 conn, rev:3fff0930, nxt:00000000, act:3, 192.168.1.4:57585, cid:01
pairing 1, heap 21560, system time=294342
pairing 1, heap 21560, system time=297342
pairing 1, heap 21560, system time=300342
pairing 1, heap 21560, system time=303342
3fff27e8 conn, rev:3fff0930, nxt:00000000, act:3, 192.168.1.4:57585, cid:01
pairing 1, heap 21560, system time=306343
pairing 1, heap 21560, system time=309342
pairing 1, heap 21560, system time=312342
pairing 1, heap 21560, system time=315342
3fff27e8 conn, rev:3fff0930, nxt:00000000, act:3, 192.168.1.4:57585, cid:01
pairing 1, heap 21560, system time=318342
pairing 1, heap 21560, system time=321342
pairing 1, heap 21560, system time=324342
pairing 1, heap 21560, system time=327342
3fff27e8 conn, rev:3fff0930, nxt:00000000, act:3, 192.168.1.4:57585, cid:01
pairing 1, heap 21560, system time=330342
pairing 1, heap 21560, system time=333342
pairing 1, heap 21560, system time=336342
pairing 1, heap 21560, system time=339342
client 192.168.1.4:57585 disconnected with status 0
Cleaning 3fff2a20 @ 340864 CID: 1
Freeing 3fff2a20 @ 340865
pairing 1, heap 22768, system time=342342

ESP8266 is stuck somehow..

I haven't tried the demo since this repository was separated out. I tried today on two separate boards, everything builds and flashes fine. Although when I look at the serial monitor, here's what I observe.


 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x40100000, len 29960, room 16 
tail 8
chksum 0x5b
load 0x3ffe8000, len 2860, room 0 
tail 12
chksum 0xc6
ho 0 tail 12 room 4
load 0x3ffe8b40, len 4560, room 12 
tail 4
chksum 0xd9
csum 0xd9

The ESP seems perpetually stuck here, doesn't reboot or crash, and obviously doesn't show up for pairing in any HK apps. Any pointers on how I could debug this?

Linker cannot find -lmesh

Hello,

I am trying to cross-compile for Arduino, as explained here
I am on a WIn10 machine, with Win Bash. I correctly installed the esp-open-sdk toolchain.

However, when I run the ./gen_misc.sh script, I get the following

...
xtensa-lx106-elf-gcc -L/home/pol/Workspace/iotty/ESP8266_RTOS_SDK/lib -Wl,--gc-sections -nostdlib -T/home/pol/Workspace/iotty/ESP8266_RTOS_SDK/ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lcirom -lcrypto -lespconn -lespnow -lfreertos -lgcc -lhal -ljson -llwip -lmain -lmesh -lmirom -lnet80211 -lnopoll -lphy -lpp -lpwm -lsmartconfig -lspiffs -lssl -lwpa -lwps -lhkc user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
/home/pol/Workspace/iotty/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: cannot find -lmesh
xtensa-lx106-elf-gcc -L/home/pol/Workspace/iotty/ESP8266_RTOS_SDK/lib -Wl,--gc-sections -nostdlib -T/home/pol/Workspace/iotty/ESP8266_RTOS_SDK/ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lcirom -lcrypto -lespconn -lespnow -lfreertos -lgcc -lhal -ljson -llwip -lmain -lmesh -lmirom -lnet80211 -lnopoll -lphy -lpp -lpwm -lsmartconfig -lspiffs -lssl -lwpa -lwps -lhkc user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
/home/pol/Workspace/iotty/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: cannot find -lmesh

Can anyone help me to understand what's missing?

Paolo

DHT sensor

How can i use DHT sensor whith ESP8266 and HomeKit?

Installation Problem

Hello, I have done everything as instructed in wikis and the result is below

esptool.py
v2.0-beta2
Connecting....
Detecting chip type... ESP8266
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 230400
Changed.
Attaching SPI flash...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0040
Compressed 36432 bytes to 26362...
Wrote 36432 bytes (26362 compressed) at 0x00000000 in 1.2 seconds (effective 249.8 kbit/s)...
Hash of data verified.
Compressed 391572 bytes to 283524...
Wrote 391572 bytes (283524 compressed) at 0x00014000 in 12.5 seconds (effective 249.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...

but the esp8266 is not connecting to my AP although I have uncommented the user_init function and inserted my APssid and password correctly

Any ideas?

how to upload binary to ESP?

I was wondering, is suppose the travis build be available to download or how exactly should I do in order to upload the binary to the ESP? (btw my travis looks is working fine)

Compiling fails

Hi,

I followed all the instructions and when running ./gen_misc.sh (all defaults) I get this Error:

~/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: .output/eagle/debug/image/eagle.app.v6.out section .irom0.text' will not fit in region irom0_0_seg'
collect2: error: ld returned 1 exit status

this is for both the Demo and the button-led

I did google around for "eagle.app.v6.out section `.irom0.text' will not fit in region" and I seemto find some references which might be useful. It seems it has to do with an updated version of the SDK

I found this: which is promising : OLIMEX/ESP8266#43

I am new to the ESP8266_RTOS and the whole toolchain setup. Since I have no insight in the versions of the toolchain and the RTOS SDK used originally I am confused about this issue ....

Martijn

how to flash help

echo ../../../esptool/esptool.py --baud 230400 -p /dev/cu.usbserial-* write_flash 0x00000 $BIN_PATH/eagle.flash.bin 0x14000 $BIN_PATH/eagle.irom0text.bin No such file or directory

Data log on Ubuntu

How to get data log on Ubuntu? After searching through the code I managed to get it working. Please mention in the wiki that the WiFi credentials have to be added in the user_main.c file. Great job on the code gotta say that!

AiLight

Hello! I can't compile the firmware for AiLight.
Is the .bin file available for this firmware? I’m interested to try it.
Thank you

At button led, I changed GPIO 0, but it didn't work

At button led, I changed GPIO 0, but it didn't work.

My code is like this, I changed GPIO0 to GPIO5

gpio0_in_cfg.GPIO_IntrType = GPIO_PIN_INTR_NEGEDGE;         //Falling edge trigger
gpio0_in_cfg.GPIO_Mode     = GPIO_Mode_Input;               //Input mode
gpio0_in_cfg.GPIO_Pin      = GPIO_Pin_5;                    //Enable GPIO
gpio_config(&gpio0_in_cfg);                                 //Initialization function
gpio_intr_callbacks[5]=led_intr;                           //define the Pin0 callback

ld.exe: cannot find -lhal

What can be done?

$ ./gen_misc.sh
based on gen_misc.sh version 20150911

SDK_PATH:
/c/Espressif/ESP8266_RTOS_SDK

BIN_PATH:
/c/Espressif/ESP8266_RTOS_SDK/bin

Please check SDK_PATH & BIN_PATH, enter (Y/y) to continue:
y

Please follow below steps(1-5) to generate specific bin(s):
STEP 1: use boot_v1.2+ by default
boot mode: new

STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)
enter (0/1/2, default 0):
0
ignore boot
generate bin: eagle.flash.bin+eagle.irom0text.bin

STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz)
enter (0/1/2/3, default 2):
2
spi speed: 40 MHz

STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT)
enter (0/1/2/3, default 0):
0
spi mode: QIO

STEP 5: choose spi size and map
    0= 512KB( 256KB+ 256KB)
    2=1024KB( 512KB+ 512KB)
    3=2048KB( 512KB+ 512KB)
    4=4096KB( 512KB+ 512KB)
    5=2048KB(1024KB+1024KB)
    6=4096KB(1024KB+1024KB)
enter (0/2/3/4/5/6, default 0):
2
spi size: 1024KB
spi ota map:  512KB + 512KB

start...
12 май 2017 г. 17:01:55

C:/Git/mingw64/bin/make -C user clean;  C:/Git/mingw64/bin/make -C driver clean;
make[1]: Entering directory 'C:/Espressif/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo/user'
rm -f -r .output/eagle/debug
make[1]: Leaving directory 'C:/Espressif/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo/user'
make[1]: Entering directory 'C:/Espressif/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo/driver'
rm -f -r .output/eagle/debug
make[1]: Leaving directory 'C:/Espressif/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo/driver'
rm -f -r .output/eagle/debug
make[1]: Entering directory 'C:/Espressif/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo/user'
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -fno-jump-tables -DICACHE_FLASH -I include -I ./ -I ../include -I C:/Espressif/ESP8266_RTOS_SDK/include/freertos -I C:/Espressif/ESP8266_RTOS_SDK/include -I C:/Espressif/ESP8266_RTOS_SDK/extra_include -I C:/Espressif/ESP8266_RTOS_SDK/driver_lib/include -I C:/Espressif/ESP8266_RTOS_SDK/include/espressif -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip/ipv4 -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip/ipv6 -I C:/Espressif/ESP8266_RTOS_SDK/include/nopoll -I C:/Espressif/ESP8266_RTOS_SDK/include/spiffs -I C:/Espressif/ESP8266_RTOS_SDK/include/ssl -I C:/Espressif/ESP8266_RTOS_SDK/include/json -I C:/Espressif/ESP8266_RTOS_SDK/include/openssl user_main.c
xtensa-lx106-elf-gcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -fno-jump-tables  -DICACHE_FLASH   -I include -I ./ -I ../include -I C:/Espressif/ESP8266_RTOS_SDK/include/freertos -I C:/Espressif/ESP8266_RTOS_SDK/include -I C:/Espressif/ESP8266_RTOS_SDK/extra_include -I C:/Espressif/ESP8266_RTOS_SDK/driver_lib/include -I C:/Espressif/ESP8266_RTOS_SDK/include/espressif -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip/ipv4 -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip/ipv6 -I C:/Espressif/ESP8266_RTOS_SDK/include/nopoll -I C:/Espressif/ESP8266_RTOS_SDK/include/spiffs -I C:/Espressif/ESP8266_RTOS_SDK/include/ssl -I C:/Espressif/ESP8266_RTOS_SDK/include/json -I C:/Espressif/ESP8266_RTOS_SDK/include/openssl  -o .output/eagle/debug/obj/user_main.o -c user_main.c
xtensa-lx106-elf-ar ru .output/eagle/debug/lib/libuser.a .output/eagle/debug/obj/user_main.o
xtensa-lx106-elf-ar: creating .output/eagle/debug/lib/libuser.a
make[1]: Leaving directory 'C:/Espressif/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo/user'
make[1]: Entering directory 'C:/Espressif/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo/driver'
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -fno-jump-tables -DICACHE_FLASH -I include -I ../include -I C:/Espressif/ESP8266_RTOS_SDK/include/freertos -I C:/Espressif/ESP8266_RTOS_SDK/include -I C:/Espressif/ESP8266_RTOS_SDK/extra_include -I C:/Espressif/ESP8266_RTOS_SDK/driver_lib/include -I C:/Espressif/ESP8266_RTOS_SDK/include/espressif -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip/ipv4 -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip/ipv6 -I C:/Espressif/ESP8266_RTOS_SDK/include/nopoll -I C:/Espressif/ESP8266_RTOS_SDK/include/spiffs -I C:/Espressif/ESP8266_RTOS_SDK/include/ssl -I C:/Espressif/ESP8266_RTOS_SDK/include/json -I C:/Espressif/ESP8266_RTOS_SDK/include/openssl gpio.c
xtensa-lx106-elf-gcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -fno-jump-tables  -DICACHE_FLASH   -I include -I ../include -I C:/Espressif/ESP8266_RTOS_SDK/include/freertos -I C:/Espressif/ESP8266_RTOS_SDK/include -I C:/Espressif/ESP8266_RTOS_SDK/extra_include -I C:/Espressif/ESP8266_RTOS_SDK/driver_lib/include -I C:/Espressif/ESP8266_RTOS_SDK/include/espressif -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip/ipv4 -I C:/Espressif/ESP8266_RTOS_SDK/include/lwip/ipv6 -I C:/Espressif/ESP8266_RTOS_SDK/include/nopoll -I C:/Espressif/ESP8266_RTOS_SDK/include/spiffs -I C:/Espressif/ESP8266_RTOS_SDK/include/ssl -I C:/Espressif/ESP8266_RTOS_SDK/include/json -I C:/Espressif/ESP8266_RTOS_SDK/include/openssl  -o .output/eagle/debug/obj/gpio.o -c gpio.c
xtensa-lx106-elf-ar ru .output/eagle/debug/lib/libdriver.a .output/eagle/debug/obj/gpio.o
xtensa-lx106-elf-ar: creating .output/eagle/debug/lib/libdriver.a
make[1]: Leaving directory 'C:/Espressif/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo/driver'
xtensa-lx106-elf-gcc  -LC:/Espressif/ESP8266_RTOS_SDK/lib -Wl,--gc-sections -nostdlib -TC:/Espressif/ESP8266_RTOS_SDK/ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lcirom -lcrypto -lespconn -lespnow -lfreertos -lgcc -lhal -ljson -llwip -lmain -lmesh -lmirom -lnet80211 -lnopoll -lphy -lpp -lpwm -lsmartconfig -lspiffs -lssl -lwpa -lwps -lhkc user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
c:/sysgcc/esp8266/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld.exe: cannot find -lhal
collect2.exe: error: ld returned 1 exit status
make: *** [C:/Espressif/ESP8266_RTOS_SDK/Makefile:388: .output/eagle/debug/image/eagle.app.v6.out] Error 1
12 май 2017 г. 17:01:56
ls: cannot access '../../bin/eagle.[if]*': No such file or directory
../../../esptool/esptool.py --baud 230400 -p /dev/cu.usbserial-AH02MF3H write_flash 0x00000 ../../bin/eagle.flash.bin 0x14000 ../../bin/eagle.irom0text.bin

Pairing failing on Sonoff

Hi, when I try to pair the pairing process does't finish and times out on the IOS device, tried multiple devices on IOS 10.3.2 and 11 beta 3, here's an extract from the end of the log, any help appreciated:-

send result: 0
Free heap2:15672
server sent a packet to 192.168.1.60:55518 at 2712471
p_sema locked
server got a packet from 192.168.1.60:55518 at 2712712
len:584
len:584
A_dat:457,tot:457,lenght:457
dsl: 457, tl: 457, hl: 127, len: 457
normal packet saved
POST/S: pair-setup C: F:
pParseB: 06010303ff8f63517603c4894c989d98b78edd5b4012d1da02625213573464e981f8e043d0b7210c3fb1f39d923c8e9665d4a6a15841b4072625e8c517d10a63f143c15c55fba9e947c1d52cdb3e8b38b0ceea43101e022a202d9e2307cc6c364efd12849df377bc4f14b240d5eb2893501afc605e44706483f33bf085cc6b6bab9820c5648300733c3c500bd00e9f86370508059b4c0c682de9c9a926ccc301e28db93bcb420554911d3427e05e66560649f96e109b274bfa989ab2552ec62b7f345772d825fd0b71aeefeef324c8da711154cd780c5b0d955e8c10c51d1cd129bea9716b223729c9ae7269fb1bb6495710cdb624ee0caf60f0be1c992970a94fea5d93038147213fd31d08a6a324f9b9651d61e81055b6bb1a674f393132a533cfb7042865210c8734026489c46419502fc6edcd0ff04d8613f4715618a7f0dd268ff7b38b8a87a4ea3388003edd18cff0d1615d1a17d3014a34c8a64ba445597a2ce69e151a4086c130888267dce911292c21f05856c182ec8f57025cbd25900256c54ab8a30440fe0007fd0c0521d2de366934c4e13644cc1cf5a34f71e8d91647aac878bdefada52ae25336f6680cfe27759c17d23fcbe50283eed19ba21431b0ee303683c5c3
pair-setup
t:6-n:1
t:3-n:255
t:3-n:384
t:4-n:64
3:8f63517603c4894c989d98b78edd5b4012d1da02625213573464e981f8e043d0b7210c3fb1f39d923c8e9665d4a6a15841b4072625e8c517d10a63f143c15c55fba9e947c1d52cdb3e8b38b0ceea43101e022a202d9e2307cc6c364efd12849df377bc4f14b240d5eb2893501afc605e44706483f33bf085cc6b6bab9820c5648300733c3c500bd00e9f86370508059b4c0c682de9c9a926ccc301e28db93bcb420554911d3427e05e66560649f96e109b274bfa989ab2552ec62b7f345772d825fd0b71aeefeef324c8da711154cd780c5b0d955e8c10c51d1cd129bea9716b223729c9ae7269fb1bb6495710cdb624ee0caf60f0be1c992970a94fea5d9347213fd31d08a6a324f9b9651d61e81055b6bb1a674f393132a533cfb7042865210c8734026489c46419502fc6edcd0ff04d8613f4715618a7f0dd268ff7b38b8a87a4ea3388003edd18cff0d1615d1a17d3014a34c8a64ba445597a2ce69e151a4086c130888267dce911292c21f05856c182ec8f57025cbd25900256c54ab8a3
4:fe0007fd0c0521d2de366934c4e13644cc1cf5a34f71e8d91647aac878bdefada52ae25336f6680cfe27759c17d23fcbe50283eed19ba21431b0ee303683c5c3
6:03
Free heap3:16400
Free heap4:16400
srp pair step 3!
Free heap:17600
pairing 1, heap 11784, system time=2713093
key: 47c6a5a777243aae0b72cd5e64b9410a52169b4e80241f71d612058c542125cae2b4b14dc9207003f090a0730138e71deacd9a696159285070431a969f8c41e3
i=0,t=6,l=1
i=8,t=4,l=64
chunked_len: 85
485454502f312e3120323030204f4b0d0a436f6e74656e742d747970653a206170706c69636174696f6e2f70616972696e672b746c76380d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a5472616e736665722d456e636f64696e673a206368756e6b65640d0a0d0a330d0a0601040d0a34320d0a044001000000f076ff3f0000000000000000f5071040f027ff3f01000000fa051040f076ff3f000000002826ff3f0682234000000000b588380000000000000000000d0a300d0a0d0a
to be sent by tlv8_send routine
arg=3fffb8b0, ptrespconn=3fff2ab8, pcryp=3fffb8b0
send result: 0
waiting for task
server sent a packet to 192.168.1.60:55518 at 2714468
client 192.168.1.60:55518 disconnected with status 0
Cleaning 3fffb8b0 @ 2714470 CID: 1
Freeing 3fffb8b0 @ 2714471
pairing 1, heap 18528, system time=2716093
pairing 1, heap 18528, system time=2719093
pairing 1, heap 18528, system time=2722093
pairing 1, heap 18528, system time=2725093
chas: 1.9=valT -> bool

Possible issue in GPIO.C

Hi, working on a motion detector and I believe there may be a flaw in the logic of GPIO.C

in GPIO.C function gpio_intr_handler, should this line

    if ( (0x1<<i) & gpio_status & gpio_intr_callbacks[i]!= NULL ){

not be

   if ( (0x1<<i) & gpio_status && gpio_intr_callbacks[i]!= NULL ){

i.e. the second and should be a logical and, not a bitwise and. I was having problems getting interrupts to fire, so I added some debug trace, with the original I get this:-

checking GPIO 2, 0x1<<i=4 , gpio_status=4, callback=4024c940
no match

with the revised code I get:-

checking GPIO 2, 0x1<<i=4 , gpio_status=4, callback=4024c940
called interupt handler for GPIO 2

TIA for your thoughts

section `.irom0.text' will not fit in region `irom0_0_seg'

I tried to prepare my environment to build this Demo.
Since I am not very experienced with linux compiling, I hope my problem is easy for somebody else...

I start with:

jimmy@LTJimmy:~/ESP8266_RTOS_SDK/ESP8266-HomeKit-Demo/Demo$ ./gen_misc.sh
based on gen_misc.sh version 20150911

SDK_PATH:
/home/jimmy/ESP8266_RTOS_SDK

BIN_PATH:
/home/jimmy/ESP8266_BIN

Please check SDK_PATH & BIN_PATH, enter (Y/y) to continue:
y

Please follow below steps(1-5) to generate specific bin(s):
STEP 1: use boot_v1.2+ by default
boot mode: new

STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)
enter (0/1/2, default 0):

ignore boot
generate bin: eagle.flash.bin+eagle.irom0text.bin

STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz)
enter (0/1/2/3, default 2):

spi speed: 40 MHz

STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT)
enter (0/1/2/3, default 0):

spi mode: QIO

STEP 5: choose spi size and map
    0= 512KB( 256KB+ 256KB)
    2=1024KB( 512KB+ 512KB)
    3=2048KB( 512KB+ 512KB)
    4=4096KB( 512KB+ 512KB)
    5=2048KB(1024KB+1024KB)
    6=4096KB(1024KB+1024KB)
enter (0/2/3/4/5/6, default 0):
4
spi size: 4096KB
spi ota map:  512KB + 512KB

start...

The error is:

xtensa-lx106-elf-gcc  -L/home/jimmy/ESP8266_RTOS_SDK/lib -Wl,--gc-sections -nostdlib -T/home/jimmy/ESP8266_RTOS_SDK/ld/eagle.app.v6.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lcirom -lcrypto -lespconn -lespnow -lfreertos -lgcc -lhal -ljson -llwip -lmain -lmesh -lmirom -lnet80211 -lnopoll -lphy -lpp -lpwm -lsmartconfig -lspiffs -lssl -lwpa -lwps -lhkc user/.output/eagle/debug/lib/libuser.a driver/.output/eagle/debug/lib/libdriver.a -Wl,--end-group -o .output/eagle/debug/image/eagle.app.v6.out
/home/jimmy/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: .output/eagle/debug/image/eagle.app.v6.out section `.irom0.text' will not fit in region `irom0_0_seg'
collect2: error: ld returned 1 exit status
/home/jimmy/ESP8266_RTOS_SDK/Makefile:403: recept voor doel '.output/eagle/debug/image/eagle.app.v6.out' is mislukt
make: *** [.output/eagle/debug/image/eagle.app.v6.out] Fout 1

My appologies for the messages being parially in Dutch. I think in English it's like:

/home/jimmy/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: .output/eagle/debug/image/eagle.app.v6.out section `.irom0.text' will not fit in region `irom0_0_seg'
collect2: error: ld returned 1 exit status
/home/jimmy/ESP8266_RTOS_SDK/Makefile:403: recipy for target '.output/eagle/debug/image/eagle.app.v6.out' has failed
make: *** [.output/eagle/debug/image/eagle.app.v6.out] Error 1

Eclipse

Sorry about my bad English!!
Anybody know how to use the eclipse for simulates (verify, test) other code like button-Led . Because I should like try a example with dht (humidity and temperature).

Remote Hub Support

Does (or should) the project currently support the Apple TV 4 or Ipad as a Homekit hub for remote actuation and Automations?

I have successfully compiled and flashed the project using the default Demo build. I have added the light and led accessories to Homekit and can interact with the accessories via the Home app and Control Center while connected my local wifi network. However, I the accessories do not respond if I connect via the cell network (turn off wifi). The Home app reports that my Homekit Hub (Apple TV 4) is connected and communicating.

I have successfully used remote access to Homekit accessories in the past via HomeBridge running on a Raspberry Pi so I believe that the iOS side of things is configured properly.

Set accessory name to include Mac address to make unique

Hi,
any idea the maximum size of the accessory name, I tried adding some code to the user_init function to append the Mac address to the accessory name, however although the resultant mdns entry looks ok, and the accessory name shows as I expect in the iOS Home app, I cannot get a successful pair. There is constant called ANLMAX used in send_mdns function, but I don't see where that is defined.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.