Connecting to doit.am boards fails
Posted: Mon Oct 22, 2018 1:49 am
I am pretty new to the MicroPython world and started experimenting with two doit.am boards [1,2].
I successfully erased the flash, flashed the MicroPython firmware and programmed the chip with mpfshell and rshell.
Unfortunately establishing a connection with mpfshell and rshell is a very unreliable business.
To illustrate this i wrote a little test case. The test case counts the number of failed connections.
###############################
#!/bin/sh
NOT_CONNECTED=0
N=100
for i in `seq 1 $N`;
do
timeout 2 mpfshell --loglevel DEBUG -n -c "open ttyUSB0" > /dev/null
RET=$?
if [ $RET -eq 124 ]; then
NOT_CONNECTED=$((NOT_CONNECTED+1))
fi
sleep 1
done
echo Failed connections: $NOT_CONNECTED/$N
###############################
Executing the above script yields:
###############################
johannes:~/esp/Micropython % ./testcase.sh
Failed connections: 54/100
johannes:~/esp/Micropython % ./testcase.sh
Failed connections: 49/100
johannes:~/esp/Micropython % ./testcase.sh
Failed connections: 53/100
#################################
You see that approximately 50% of the connections failed. This applies to both boards i bought.
It would be great to hear if someone with a similar board experiences the same behavior.
I cannot imagine that it is normal that connecting to the esp32 is such a unreliable process.
Best regards and i hope for some feedback
[1]: http://www.smartarduino.com/view.php?id=95103
[2]: https://github.com/SmartArduino/SZDOITWiKi/wiki
I successfully erased the flash, flashed the MicroPython firmware and programmed the chip with mpfshell and rshell.
Unfortunately establishing a connection with mpfshell and rshell is a very unreliable business.
To illustrate this i wrote a little test case. The test case counts the number of failed connections.
###############################
#!/bin/sh
NOT_CONNECTED=0
N=100
for i in `seq 1 $N`;
do
timeout 2 mpfshell --loglevel DEBUG -n -c "open ttyUSB0" > /dev/null
RET=$?
if [ $RET -eq 124 ]; then
NOT_CONNECTED=$((NOT_CONNECTED+1))
fi
sleep 1
done
echo Failed connections: $NOT_CONNECTED/$N
###############################
Executing the above script yields:
###############################
johannes:~/esp/Micropython % ./testcase.sh
Failed connections: 54/100
johannes:~/esp/Micropython % ./testcase.sh
Failed connections: 49/100
johannes:~/esp/Micropython % ./testcase.sh
Failed connections: 53/100
#################################
You see that approximately 50% of the connections failed. This applies to both boards i bought.
It would be great to hear if someone with a similar board experiences the same behavior.
I cannot imagine that it is normal that connecting to the esp32 is such a unreliable process.
Best regards and i hope for some feedback
[1]: http://www.smartarduino.com/view.php?id=95103
[2]: https://github.com/SmartArduino/SZDOITWiKi/wiki