Ryan,
OK - thanks for that info - there are two other interfaces that show status active from ifconfig -a besides en0 - can you change their status to down or inactive just to be sure? awdl0 and llw0 could be forwarding packets.
You're right about the subnet mask - that's 255.255.255.0 - it's just in hex.
The only other thing I can think of right now is for you to make a new build - and copy your build log here so it can be reviewed; but first shut down all active network interfaces that show active besides en0.
Regards,
John W.
To All:
From github - I imagine applying this patch will make operation better:
WiFi Improvements
HTH,
John W.
thejerseychemist:
can I change the subnet mask to 255.255.0.0?
Yes, but remember the subnet mask must be the same on all network interfaces!
jwestmoreland:
I just noticed this: (1.2.1)
IPv4 Address. . . . . . . . . . . : 192.168.3.3
Subnet Mask . . . . . . . . . . . : 192.0.0.0
Default Gateway . . . . . . . . . : 192.168.3.1
That subnet mask isn't real bueno - that should be 255.255.255.0 just for demo purposes.
Not 255.255.255.0 but 255.255.0.0 ! That is, if you're still using IP's like 192.168.3.1 en 192.168.4.1 .
PS. Strange as it may seem, a subnet mask like 192.0.0.0 might just work! Converted to bits you'll see 11000000 00000000 00000000 00000000, which is the correct format. 
jwestmoreland:
Ryan,
OK - thanks for that info - there are two other interfaces that show status active from ifconfig -a besides en0 - can you change their status to down or inactive just to be sure? awdl0 and llw0 could be forwarding packets.
You're right about the subnet mask - that's 255.255.255.0 - it's just in hex.
The only other thing I can think of right now is for you to make a new build - and copy your build log here so it can be reviewed; but first shut down all active network interfaces that show active besides en0.
Regards,
John W.
Dear John,
I've got less bandwidth to deal with this at the moment, so bear with me (lots of simultaneous projects; it was ever thus!). I have found that the various patches you have indicated don't solve my issues, neither does disabling awdl0 and llw0.
How do I go about accessing the build logs? I'm not so familiar with this.
All the best,
Ryan
Ryan (and others),
I need to put the subnet mask issue to rest wrt this thread:
First to make sure this is crystal clear and I will probably not comment on the subnet mask issue any further - for the purposes of this thread and this demo - a network mask of 255.255.255.0 is the one we're using.
Further discussions of Class-C, B, or A subnet masks really goes beyond the scope of this thread - I've already provided network (IETF) references plus a subnet mask tool that explains all of this.
For the scope of this thread - a single gateway address and a 255.255.255.0 subnet mask are what's being used and discussed.
Anyone else wanting to comment on subnet masks needs to look through this thread for those references.
Two important issues have come up regarding that and have been posted as issues on github.
=====
Thanks first for checking the other network interfaces - one of those looked like it could be forwarding packets - impossible for me to know for sure without direct access to that machine. Also, apparently, the Mac we had here is apparently MIA - we looked for it this past weekend and were not able to locate it - so I won't be able to try the demo on that Mac. One of my daughters does have an iPhone - I'll see if I can try the demo on her phone.
For the log file - just copy what the compiler outputs when you're making a build - for me - it's something like this under 0.0.6 IDE:
9K characters.>
You can build with that (0.0.6) or 1.8.13 - but please post the log file.
I have run with the latest commits on github and ping will still run even though the HTTP web page disconnects - which is interesting.
I've tried running the build with gdb and ThreadDebug.lib but that doesn't really yield anything useful thus far - it's not easy to keep the AP running right now running it this way in gdb - keeping in mind all of this is still in a pre-beta condition.
Thanks,
John
build_log.txt (25.1 KB)
Ryan,
I'm attaching a screen shot from my daughter's iPhone - she connected to the Portenta and was able to run the demo. I watched as she pressed buttons and the LED's changed colors - went on/off, etc. She was able to run it with no issues and she's not a 'computer person'.
So, not sure what the issue could really be with this now.
Note - the demo isn't 'stable' - everything is really pre-beta right now as far as 1.2.2 and the 0.0.6 IDE.
Regards,
John
Just thought I'd add that i couldn't get this working with 1.2.2. Could join the network and view the web page on my iphone but no commands would get through.
I rolled back to 1.2.1 and then it started working (only after i changed the SSID name too).
EDIT:
It works again after getting the latest Arduino_mbd and ArduinoCore-API as described by jwestmoreland here,
https://forum.arduino.cc/index.php?topic=701201.0
To All:
I've been able to get some semblace of a debugger going under eclipse - screen shot attached - maybe I can find the actual root cause of the difficulty running this demo in a repeatable fashion.
Regards,
John W.
jwestmoreland:
Ryan (and others),
Thanks first for checking the other network interfaces - one of those looked like it could be forwarding packets - impossible for me to know for sure without direct access to that machine. Also, apparently, the Mac we had here is apparently MIA - we looked for it this past weekend and were not able to locate it - so I won't be able to try the demo on that Mac. One of my daughters does have an iPhone - I'll see if I can try the demo on her phone.
For the log file - just copy what the compiler outputs when you're making a build - for me - it's something like this under 0.0.6 IDE:
9K characters.>
You can build with that (0.0.6) or 1.8.13 - but please post the log file.
I have run with the latest commits on github and ping will still run even though the HTTP web page disconnects - which is interesting.
I've tried running the build with gdb and ThreadDebug.lib but that doesn't really yield anything useful thus far - it's not easy to keep the AP running right now running it this way in gdb - keeping in mind all of this is still in a pre-beta condition.
Thanks,
John
The output of the compiler gives me a warning message:
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2341:035b
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08040000, size = 669700
Download [=========================] 100% 669700 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
I'm not quite sure what this error message is telling me, and a quick Google search doesn't yield too much detailed information. Is this an issue?
All the best,
Ryan
Ryan,
You posted the log when the tools download to the target.
The build log is the log file from the actual build of the sketch (*.ino) file.
I attached an example log to this thread so you would know what that looked like.
Please post the build log file.
Thanks,
John
Dear John,
Apologies, but I don't have a build_log.txt file anywhere!
All the best,
Ryan
Ryan,
That's not a literal - it's just what I named what comes out of the build tools when you compile.
It's all of the console messages that show the tools - like this:
If using the new Portenta IDE - this shows under the Arduino: Compile window under Output:
Using board 'envie_m7' from platform in folder: C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2
Using core 'arduino' from platform in folder: C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2
Detecting libraries used...
"C:\Users\john\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -c -w -g -Os -nostdlib "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/defines.txt" "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/cxxflags.txt" -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino/api/deprecated" "-iprefixC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino" "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/includes.txt" "c:\AppData\Local\Temp\arduino-sketch-F4FDEBF0AE476380AD0D1998965BD951\sketch\demo-web-server.ino.cpp" -o nul
Alternatives for ThreadDebug.h: [ThreadDebug@1.0.0]
ResolveLibrary(ThreadDebug.h)
-> candidates: [ThreadDebug@1.0.0]
"C:\Users\john\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -c -w -g -Os -nostdlib "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/defines.txt" "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/cxxflags.txt" -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\libraries\ThreadDebug\src" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino/api/deprecated" "-iprefixC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino" "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/includes.txt" "c:\AppData\Local\Temp\arduino-sketch-F4FDEBF0AE476380AD0D1998965BD951\sketch\demo-web-server.ino.cpp" -o nul
Alternatives for WiFi.h: [WiFiNINA@1.6.0 WiFi@1.2.7 WiFi@1.0]
ResolveLibrary(WiFi.h)
-> candidates: [WiFiNINA@1.6.0 WiFi@1.2.7 WiFi@1.0]
"C:\Users\john\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -c -w -g -Os -nostdlib "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/defines.txt" "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/cxxflags.txt" -mcpu=cortex-m7 -mfloat-abi=softfp -mfpu=fpv5-d16 -w -x c++ -E -CC -DARDUINO=10607 -DARDUINO_PORTENTA_H7_M7 -DARDUINO_ARCH_MBED -DARDUINO_LIBRARY_DISCOVERY_PHASE=1 "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\libraries\ThreadDebug\src" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\libraries\WiFi\src" "-IC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino/api/deprecated" "-iprefixC:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\cores\arduino" "@C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/includes.txt" "c:\AppData\Local\Temp\arduino-sketch-F4FDEBF0AE476380AD0D1998965BD951\sketch\demo-web-server.ino.cpp" -o nul
...
C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\libraries\WiFi
Using library MRI at version 1.0.0 in folder: C:\Users\john\AppData\Local\Arduino15\packages\arduinobeta\hardware\mbed\1.2.2\libraries\MRI
"C:\Users\john\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-size" -A "c:\AppData\Local\Temp\arduino-sketch-F4FDEBF0AE476380AD0D1998965BD951/demo-web-server.ino.elf"
Sketch uses 313844 bytes (39%) of program storage space. Maximum is 786432 bytes.
Global variables use 72792 bytes (13%) of dynamic memory, leaving 450832 bytes for local variables. Maximum is 523624 bytes.
Regards,
John
Dear John,
I just started using the Pro 0.0.1 IDE rather than the standard IDE and I immediately found what you were talking about.
I've attached my own version of 'build_log.txt'
All the best,
Ryan
build_log.txt (56.5 KB)
Ryan.
Can you try 1.2.2 with 10.0.0.1?
Thanks,
John
Dear John,
The tutorial now works absolutely fine when running on my Macbook and my iPhone with the 0.1.0 Pro IDE, using mbed 1.2.2 and the patches you provided links for in your previous message.
I had to run the sketch PortentaWiFiFirmwareUploader.ino once to get it working.
I followed exactly the same procedure as the standard IDE 1.8.13, so I'm not quite sure why it didn't work with 1.8.13, but I guess I should be switching to the Pro environment at some point anyway, so it might as well be now.
Many thanks for your help and patience John.
All the best,
Ryan
Ryan,
Well - that's good news - and I'm glad you got that running OK.
Thanks for sticking in there on this as well - and the build environment should keep getting better.
You are more than welcome Ryan!
Best Regards,
John W.
I got the wifi demo to run one time, and got the page with the buttons on it to display on my iPhone, but after that the H7 seemed to get into some kind of crash / hang / bootloop.
The IDE noticed the serial port coming and going over and over, I thought it might be a little bit bricked. After a few cycles of bashing the reset button, cycling power to board, restarting pro IDE, I was able to reflash the previous tutorial blinky-red-LED and it's happy again.
Sounds like I should steer clear of the wifi stuff til some of this dust settles.
It's the Sept 23, 2020 the issue is the same.
No changes.
Arduino 1.8.13
Why the function
WiFiClient client = server.available(); // listen for incoming clients
is blocking?
Normaly this function is nonblocking
LawMower:
It's the Sept 23, 2020 the issue is the same.
No changes.
Arduino 1.8.13
Why the function
WiFiClient client = server.available(); // listen for incoming clients
is blocking?
Normaly this function is nonblocking
What do you mean by blocking?
Ryan,
Blocking means the call will hang until an I/O (usually) is completed or available for processing.
Here's a web-page that explains it:
http://faculty.salina.k-state.edu/tim/ossg/Device/blocking.html
HTH,
John W.