B4R Question why no record to log and no error ?

peacemaker

Expert
Licensed User
Longtime User
HI, all

It's my this first experience with MCU (NodeMCU ESP8266, ESP-12E), so, i'm just collecting the experience.
And latest my coding shows sometimes the following:
1) when initially write a sub code - all log() records are visible in the log, all is correct and no trouble (sending a record to a server API and database).
2) after some more adding codes into this well debugged sub - suddently i see that no more log outputs from this sub !, but result is OK, the data is received into the server db.
And no any errors in the log.

But why logging is stopped from this sub ?

If to remove latest added codes from the sub - the previous working logging is again ok visible!
 

peacemaker

Expert
Licensed User
Longtime User
Seems, no, according to the NodeMCU sch the serial port uses GPIO1\3, my board uses GPIO5\4\14\16.
Now i have added the second HTTPJob after 1-st Job, with shared JobDone sub - and the log lines from JobDone about 2-nd Job is visible, but about 1-st - no...
BTW, i use the max speed 256000 baud.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Try it with a lower baud.

No help, the same, no logs from first HTTPJob, but server received it OK:

B4X:
********************* PROGRAM STARTING ****************
AppStart
Vcc, volts = 4.7370
Bat, % = 100
Marker = 213
RTC Period: 25000
Get RTC time: 16471
LastAlive = 58564
GetStoredDataLength = 0
No saved network data found.
Trying to connect to: WiFissid
WiFi connected, my ip: 192.168.1.116
InternetConnected = 1
Device_ID = F4CFA24CAFC7
Wifi, %: 100
Sensor power: trying to switch ON...
Setup_MPU6050
AVG: 0.4434; acx: -0.2979, acy: -0.0122 ,acz: -1.0203, Tmp: 28.7000
Time to send logs...
trying to connect to: server.com port: 80 ssl: 0
connected: server.com
*******************************
>>>>>HERE SHOULD BE ABOUT JobName: API_SAVE_logs, but NO logs

JobName: API_SAVE_t2, success = 1
Response: {"ret":"ok","msg":"Data saved OK (stancontrol_t2)","new":0}
Go deep sleep for 10 secs

Here in MCU all subs are executed only synchronously ? Or HTTPJob module works async ?
 
Last edited:
Upvote 0
Top