The code in the two ESP8266's is identical.
Both ESP8266's have the same micropython builds - v1.191(583K)
ESP8266 Code (In Part)
Code: Select all
enRcvr = b'\x78\x21\x84\x9b\x57\xf4' # Unit ESP32-001
devState = bytes('On', 'UTF-8')
ackRcvd = False
TryCnt = 0
Tstart = time.ticks_ms()
while TryCnt < 3 and not ackRcvd:
print('\nSending')
ackRcvd = eNow.send(enRcvr,devState,True)
TryCnt += 1
Code: Select all
while True:
recvSender, recvMsg = eNow.irecv(recvWait) # Default timeout = 5 mins (wait on recv if neg).
if recvMsg != None: # msg == None if timeout in recv()
Sender=ubinascii.hexlify(recvSender)
Message=recvMsg.decode('ascii')
print(Sender,Message)
if Sender == Sensor001:
print('Sensor001: '+str(Message))
The first ESP8266 (Sensor001) sends once, and receives an acknowledge; the receiver's recvSender has it's MAC, and recvMsg has the message sent.
The second ESP8266 (with identical code) tries to send 3 times then returns to REPL; the receiver's eNow.irecv(recvWait) does not return anything and times out after one minute.
Both ESP8266 modules were tested with identical code to confirm wifi connection; making sure the respective radios were functional.
Any suggestions as to why one ESP8266 is received and the other is not?