## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
@0x2b3bfa0
cd /Users/\$USER/Documents/Arduino
mkdir hardware
cd hardware
mkdir esp8266com
cd esp8266com
git clone https://github.com/esp8266/Arduino.git esp8266
andig
@andig
right, doing so now
and there it is... thanks!
espasync libs in there as well or into the regular libraries folder?
@0x2b3bfa0
@masalinas: I thought that it was placed on Documents because I placed it there.
@andig I think that it should be on the libraries folder.
andig
@andig
huh, seems to compile quicker on macbook thatn on core i5 windows machine? funny
@0x2b3bfa0
@andig: Maybe. PlatformIO compiles even faster than Arduino IDE.
@me-no-dev: Did you remember that ugly web socket issue?
I've "solved it"
extern "C" {
#include "user_interface.h"
void __run_user_rf_pre_init(void) {
uint8_t ap_mac[] = AP_BSSID;
uint8_t sta_mac[] = STA_BSSID;
system_phy_set_max_tpw(TXPWR);
wifi_set_phy_mode(TXMODE);
}
}
The above lines are the conflicting ones.
However, I don't know why nor how.
Could you kindly explain me that?
andig
@andig
where should I put the upload tool on osx?
docs/arduino/tools/espplugin.jar ?
doesnt seem to fint it whereever its put
@0x2b3bfa0
@0x2b3bfa0
@me-no-dev: The conflicting lines are:
wifi_set_macaddr(SOFTAP_IF, &ap_mac[0]);
wifi_set_macaddr(STATION_IF, &sta_mac[0]);
Clemens Kirchgatterer
@everslick
@hagai-shatz i think cutting the directory info from path is absolutly fine and a sensible thing to do. the RFC even suggest that the browser should do it, when the server hadn't.
@hagai-shatz about 'inline': it's needed to be able to set the filename parameter, so the browser can give the right default filename should the user decide he wants to 'Save As...'.
Me No Dev
@me-no-dev
@andig the tool should go into ~/Arduino/tools/... (like the hardware folder you created)
@crushedice2000 I'm a bit confused?
what was the issue and why would those lines matter?
@0x2b3bfa0
@me-no-dev: Do you remember the issue I had with WebSockets that could not connect?
The main culprit is of these lines. Don't ask me why, but commenting out they, all works.
Me No Dev
@me-no-dev
interesting... maybe @igrr can check the source for issues
@crushedice2000 please explain the problem better here, so he can have something to go from
@0x2b3bfa0

@me-no-dev: Explaining:

1. I've done a sketch based on this one. The only difference is that I'Ve added this code in the top:
extern "C" {
#include "user_interface.h"
void __run_user_rf_pre_init(void) {
uint8_t ap_mac[] = AP_BSSID;
uint8_t sta_mac[] = STA_BSSID;
system_phy_set_max_tpw(TXPWR);
wifi_set_phy_mode(TXMODE);
}
}
1. If I comment the below lines, all works well:
wifi_set_macaddr(SOFTAP_IF, &ap_mac[0]);
wifi_set_macaddr(STATION_IF, &sta_mac[0]);
1. If I don't, then happens this:

• On the firefox JS console:

var j = new WebSocket('ws://192.168.1.1:81', ['arduino']);
undefined
Firefox no puede establecer una conexión con el servidor en ws://192.168.1.1:81/
Translated: Firefox cannot connect to the server on ws://192.168.1.1:81/
• On the server: It fires the webSocketEvent with type=WStype_CONNECTED and then the connection closes (the server won't fire webSocketEvent with type=WStype_DISCONNECTED )

Me No Dev
@me-no-dev
uint8_t ap_mac[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB};
@0x2b3bfa0
@me-no-dev:
#define AP_BSSID {0x52, 0x31, 0x39, 0x32, 0x41, 0x00}
#define STA_BSSID {0x52, 0x31, 0x39, 0x32, 0x41, 0xFF}
Me No Dev
@me-no-dev
and everything else is fine? You see the proper mac in your DHCP?
@0x2b3bfa0
@me-no-dev: I'm not using the client now. On the SoftAP, I don't know what to do.
Me No Dev
@me-no-dev
ok what is WiFi telling you on the ESP?
if you read both macs after setting them
@0x2b3bfa0
@me-no-dev: How?
Me No Dev
@me-no-dev
String staMAC = WiFi.macAddress();
String apMAC = WiFi.softAPmacAddress();
@0x2b3bfa0
@me-no-dev: The result is the new mac. The change works.
Me No Dev
@me-no-dev
let's hope @igrr can shed some light
@0x2b3bfa0
@me-no-dev: OK. Thanks!
sticilface
@sticilface
PyB
@PyBerger
when sending TCP Packets to 1 or several client (ESP as SoftAP + TCP Server), I sometime gets an Exeption 9
The exception decoding seems to indicate it has something to do with the _eventCallback :
'''0x402033a0: ESP8266WiFiGenericClass::_eventCallback(void*) at hardware\esp8266com\esp8266\tools\xtensa-lx106-elf\xtensa-lx106-elf\include\c++\4.8.2/functional line 2439
0x4010117b: ppProcessTxQ at ?? line ?
0x401011b6: ppProcessTxQ at ?? line ?
0x40226c24: wifi_set_status_led_output_level at ?? line ?
<
Ivan Grokhotkov
@igrr
@PyBerger do you have some code which reproduces this issue which I can run?
PyB
@PyBerger
I need to make a specific one - to simulate the working of my application - but would be without interrupt... and that may have an impact
can I sent you the sketch in private ?
Ivan Grokhotkov
@igrr
you can make a private gist and then PM me the link
PyB
@PyBerger
mail ?
easier for me
FWeinb
@FWeinb
I would like to get started with some mqtt. What are you guys running. Was thinking of going with homie. Or are there other more mature projects out there?