These are chat archives for SmingHub/Sming

8th
Mar 2016
codenamerohan
@codenamerohan
Mar 08 2016 02:58
Windows
Patrick Jahns
@patrickjahns
Mar 08 2016 06:33
Did you set your paths for espressif sdk and esptool correctly?
Patrick Jahns
@patrickjahns
Mar 08 2016 14:41
Question: Where are the debugf Strings stored? PROGMEM or Ram?
alon24
@alon24
Mar 08 2016 15:53
@avr39-ripe how do I use WifiEvents.onAccessPointDisconnect(APDisconnect)
WifiEvents.onAccessPointConnect(APAGotIP);
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 15:56
@alon24 do not fully understand you...
alon24
@alon24
Mar 08 2016 15:57
tried:

this function is defined before I call wifievents
void APAGotIP(uint8_t mac, uint8_t aid)
{

} 
this is in initi:
WifiEvents.onAccessPointConnect(APAGotIP);

getting: 
app/application.cpp:798:42: error: no matching function for call to 'WifiEventsClass::onAccessPointConnect(void (&)(uint8_t, uint8_t))'
  WifiEvents.onAccessPointConnect(APAGotIP);
(it takes time to write)
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 15:59
I think you must change to void APAGotIP(uint8_t[6] mac, uint8_t aid)
and it is called not when client got ip from you softAP but when client CONNECTS to ap..
alon24
@alon24
Mar 08 2016 16:00
app/application.cpp:708:26: error: expected ',' or '...' before 'mac'
 void APAGotIP(uint8_t[6] mac, uint8_t aid)
                          ^
app/application.cpp: In function 'void init()':
app/application.cpp:798:42: error: no matching function for call to 'WifiEventsClass::onAccessPointConnect(void (&)(uint8_t*))'
  WifiEvents.onAccessPointConnect(APAGotIP);
how can I know when I get an ip from ap, or is it at the same time
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:02
my bad.. again.. try void APAGotIP(uint8_t mac[6], uint8_t aid)
alon24
@alon24
Mar 08 2016 16:02
void APAGotIP(uint8_t mac[6], uint8_t aid)
yes got that
so the first is mac address, and the second is aid, how to convert to string
(what is aid
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:03
I think you misunderstood thees delegates purpose..
alon24
@alon24
Mar 08 2016 16:03
they are there to know when connect disconnect to ap or sta - right?
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:04
do you whant to know when some client connects to YOU ESP8266 SOFTAP? or you whant to know when your esp connects to some ACCESSPOINT??
yeh, you're right..
alon24
@alon24
Mar 08 2016 16:04
oh thats a question, maybe i did get it wrong
what is the answer, is the onAccessPointConnect - telling me, "hey - ap mode is up"????
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:06
onStation is when your esp is client to some router, accsspoint.. other esp in softap mode
onAccessPoint
is when your esp is AccessPoint and waits for some clients to connect
no, it tells you - hey, if you esp in AP mode here is some new client connected to it :)
alon24
@alon24
Mar 08 2016 16:07
oh
ok, now i get it
here we attach functions 1) when we lost connection to accesspoint, 2) when we GOTIP (ont just connected!!) from accesspoint
alon24
@alon24
Mar 08 2016 16:09
yes i saw that, but did not test it :), now its clear
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:11
SDK proiede us with 7 "events" STA connect/disconnect/gotip/auth mode change and AP connect/disconnect/receive probe request
alon24
@alon24
Mar 08 2016 16:11
what is receive probe request
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:12
WifiEvents is sming way to attach callbacks/delegates to them.. probe req - is when some client SCANS for AP and this probe is received by you esp in SOFTAP mode
alon24
@alon24
Mar 08 2016 16:12
k
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:16
@alon24 WifiEvents is better than WaitConnection based on timers and misused in all sample app..
alon24
@alon24
Mar 08 2016 16:18
Constantly getting debug messsages: 
void WifiEventsClass::WifiEventHandler(System_Event_t *evt)
{
    debugf("event %x\n", evt->event_id);
event 0x8

event 0x8

event 0x8
I am guessing thats the place that writes the event (because of search)
I am guessing you need to remark that line of code?
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:20
doy you hve softAP enabled?
if you turn off system debug you will not get this message
alon24
@alon24
Mar 08 2016 16:22
I have debug because I use it
I do not see the value of this specific message in normal code,
Of I turn off system debug, will my debugf still work, if so how to turn it off
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:25
may be you're right, if people find this particular debugf useless or even more BAD I can remove this line.. meanwhile you can comment/remove it and recompile sming lib
alon24
@alon24
Mar 08 2016 16:25
Sure
hreintke
@hreintke
Mar 08 2016 16:26
@patrickjahns :
PROGMEM is arduino terminolgy. There is a "fake PROGMEM" in sming so you can use it.
But... debugf strings (as other strings) are in flash -> no need for specific handling.
eadf
@eadf
Mar 08 2016 16:33
I realize that this is the wrong forum to get an unbiased opinion, but what's the advantages of sming compared to Arduino esp (and vice versa)?
Dmitry Kireev
@kireevco
Mar 08 2016 16:46
@avr39-ripe Hi, any feedback on the toolchain?
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 16:48
@kireevco builds under debian, but either on debian and freebsd after successful build of toolchain I need MANUALY strip and pack it.. do not done this yet so not tested as real build weapon :)
codenamerohan
@codenamerohan
Mar 08 2016 17:01
@patrickjahns espressif sdk and esptool is correctly set but I have no idea regarding debugf Strings
Patrick Jahns
@patrickjahns
Mar 08 2016 18:16

@officialjimmy
Check the wiki with these hints:
https://github.com/SmingHub/Sming/wiki/Troubleshooting-Windows

it sounds to me like some path variable is set wrong. Can you also share the project on github/gist so we can have a look at everything. Giving advice without more information is wild guessing ;-)

@hreintke
thanks for clarification
@avr39-ripe
Regarding WifiEvents and WaitConnection - wasn`t there an idea to change the backend of waitconnection to events?
Otherwise it would be great to update examples so the "bad stuff" is less copied ;-)
HappyCodingRobot
@HappyCodingRobot
Mar 08 2016 19:17
hi.. i have a little problem with the soft-AP mode: i can not connect to it. I tested different android devices and also with/without auth. They try to connect and stop. Sometimes they came to request an IP but no connection was established. Any idea where i could start to find a solution?
alon24
@alon24
Mar 08 2016 19:22
@HappyCodingRobot is u'r environment rich with wifi signals?, try changing the channel for ap
HappyCodingRobot
@HappyCodingRobot
Mar 08 2016 19:24
it is quite full with wifis .. ok, thats a good point
btw, all i see in the debug output is : station: [mac] join, AID = 1 but it doesn't connect
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 19:25
@HappyCodingRobot if you enable softap With station mode also enabled and disconnected it is normal behaviour
HappyCodingRobot
@HappyCodingRobot
Mar 08 2016 19:25
what does the AID=1 mean?
@avr39-ripe ok .. better to use either one of them?
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 19:26
disable sta and you quickly get connected to ap.. or just let sta to connect to some ap.
HappyCodingRobot
@HappyCodingRobot
Mar 08 2016 19:28
disable would be an option .. i'm trying the "first startup" or "no AP found, make my own AP for configuration" ;)
as it is implemented in the basic_wifi example, i thought it would work together flawless
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 19:30
yes.. you really Can use both, but therw is just one wifu phy, so both ap and sta must share it.. so both of them occupying the same channel.. when sta is either disconnected or scanning it constantly change channel so it is bit hard to connect to ap..
HappyCodingRobot
@HappyCodingRobot
Mar 08 2016 19:31
oh.. i understand ..
ok, try it that way .. on connectFail() i disable STA and set it to AP only
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 19:33
try my example, Basik_WebSkeletonApp.. it do what you whant..
it use new way of handling wifi events..
HappyCodingRobot
@HappyCodingRobot
Mar 08 2016 19:47
@avr39-ripe what does it need? I mean, does it require a specific PR?
Alexander V. Ribchansky
@avr39-ripe
Mar 08 2016 19:55
@HappyCodingRobot it is in recent Sming develop branch
HappyCodingRobot
@HappyCodingRobot
Mar 08 2016 19:57
ok, i have to merge that.. i'm around 2..3 weeks behind with my branch ;)