Run
Code: Select all
upyeasy.setnet(1,'A3','A4','192.168.178.135', '192.168.178.1', '255.255.255.0', '192.168.178.1')
Cheers,
Lisa
Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM
Code: Select all
upyeasy.setnet(1,'A3','A4','192.168.178.135', '192.168.178.1', '255.255.255.0', '192.168.178.1')
HI Lisa, Thanks for that info. My Blue Pill is a STM32F103C8T6 (with 128k flash), so not one of the models you mentioned. I bought it as a first step with STM32's (not uPyEasy).LisaM wrote: ↑18 Mar 2018, 16:04For the STM32F103 to work, you'll need the STM32F103RG/STM32F103VG/STM32F103ZG because these have 1MB on board.AndrewJ wrote: ↑16 Mar 2018, 20:27 Mine is the same part.
Some additional info..,
I tried the same W5500 with a STM32F103 "Blue Pill" board using one of the example sketches (web server) and it worked fine. Connected to network, no problem connecting from my browser, and it supplied data to my browser, able to ping. In this scenario, I used the same SCS pin.
Hi Lisa,LisaM wrote: ↑18 Mar 2018, 16:34 Attached pictures of my config, please adjust your config.
Run(replace ip-addresses by your own ip, gateway, mask, dns)Code: Select all
upyeasy.setnet(1,'A3','A4','192.168.178.135', '192.168.178.1', '255.255.255.0', '192.168.178.1')
Cheers,
Lisa
Hi @LisaM,LisaM wrote: ↑18 Mar 2018, 16:34 Attached pictures of my config, please adjust your config.
Run(replace ip-addresses by your own ip, gateway, mask, dns)Code: Select all
upyeasy.setnet(1,'A3','A4','192.168.178.135', '192.168.178.1', '255.255.255.0', '192.168.178.1')
Cheers,
Lisa
Code: Select all
Pyboard clone W5500 wire colour
PA3 SCS light blue/green
PA4 RST white
PA5 SCLK purple
PA6 MISO orange
PA7 MOSI yellow
3v3 3v3 red
Gnd GND black
Thanks for the update, Lisa.LisaM wrote: ↑27 Mar 2018, 19:47 @andrewj: The colors are good, the wiring is good...
@karl222: Since the ESP32 is now, i'm currently looking at the STM32
STM32's are great, because the interrupts are hardware bound while the ESP32's have a software bound interrupt. Meaning that the STM32 latency is WAY lower then that of the ESP's, that also makes the ethernet way faster then wifi.
Pffffff, after update i ran into bugs. Filed them @micropython for help...
Hi Lisa,LisaM wrote: ↑27 Mar 2018, 19:47 @andrewj: The colors are good, the wiring is good...
@karl222: Since the ESP32 is now, i'm currently looking at the STM32
STM32's are great, because the interrupts are hardware bound while the ESP32's have a software bound interrupt. Meaning that the STM32 latency is WAY lower then that of the ESP's, that also makes the ethernet way faster then wifi.
Pffffff, after update i ran into bugs. Filed them @micropython for help...
No update, this weekend i'll give it a try to work-around the bug so that we can build the STM32 version again...AndrewJ wrote: ↑04 Apr 2018, 22:40Hi Lisa,LisaM wrote: ↑27 Mar 2018, 19:47 @andrewj: The colors are good, the wiring is good...
@karl222: Since the ESP32 is now, i'm currently looking at the STM32
STM32's are great, because the interrupts are hardware bound while the ESP32's have a software bound interrupt. Meaning that the STM32 latency is WAY lower then that of the ESP's, that also makes the ethernet way faster then wifi.
Pffffff, after update i ran into bugs. Filed them @micropython for help...
Any news about the bugs on STM32?
Also, I think I notice some small changes in the source code in recent version which may affect the CS pin etc. Would these changes allow the latest code to be built and to run on STM32, do you think? Is it worth me giving it a try?
Regards
Andrew
Hi Lisa,LisaM wrote: ↑05 Apr 2018, 01:08No update, this weekend i'll give it a try to work-around the bug so that we can build the STM32 version again...AndrewJ wrote: ↑04 Apr 2018, 22:40Hi Lisa,LisaM wrote: ↑27 Mar 2018, 19:47 @andrewj: The colors are good, the wiring is good...
@karl222: Since the ESP32 is now, i'm currently looking at the STM32
STM32's are great, because the interrupts are hardware bound while the ESP32's have a software bound interrupt. Meaning that the STM32 latency is WAY lower then that of the ESP's, that also makes the ethernet way faster then wifi.
Pffffff, after update i ran into bugs. Filed them @micropython for help...
Any news about the bugs on STM32?
Also, I think I notice some small changes in the source code in recent version which may affect the CS pin etc. Would these changes allow the latest code to be built and to run on STM32, do you think? Is it worth me giving it a try?
Regards
Andrew
Cheers,
Lisa
Code: Select all
git clone https://github.com/micropython/micropython.git micropython-stm32
cd micropython-stm32/
git submodule update --init
git checkout a275cb0f487cd6517760271dc01d369c32600c63
git pull origin pull/3379/head
Code: Select all
>>> import upyeasy
>>> upyeasy.main()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'main'
Hmm, that's frustrating!LisaM wrote: ↑13 Apr 2018, 18:14 I've tried to fix the bugs, but they have change so much on the stm32 port that i lost track.
So, the work-around now is to roll back before they started to change the stm32 port on 31/1:This builds the firmware.dfu again, without the errors.Code: Select all
git clone https://github.com/micropython/micropython.git micropython-stm32 cd micropython-stm32/ git submodule update --init git checkout a275cb0f487cd6517760271dc01d369c32600c63 git pull origin pull/3379/head
However... i now run into the problem:Pfffff.Code: Select all
>>> import upyeasy >>> upyeasy.main() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'main'
Ah, glad you've found that!LisaM wrote: ↑14 Apr 2018, 00:11 The problem was that script.py imports re.py which is actually an unix library, script.py should import ure library which is a default micropython library. I fixed this, so it's working again. Apparently is main.py not findable if one the imports fails...
Cheers,
Lisa
uPyEasy does compile but doesn't work, it doesn't repond to web requests. I'm trying to figure out why, i suspect that the asyncio changes in uPyEasy have something to do with it.AndrewJ wrote: ↑14 Apr 2018, 08:39Ah, glad you've found that!LisaM wrote: ↑14 Apr 2018, 00:11 The problem was that script.py imports re.py which is actually an unix library, script.py should import ure library which is a default micropython library. I fixed this, so it's working again. Apparently is main.py not findable if one the imports fails...
Cheers,
Lisa
Which version of uPyEasy are you using? I realised belatedly that I was still using a previous version, not the latest with OpenHABmqtt. And did you find you needed to go through the whole building process like I was doing?
EDIT: forgot to ask, is W5500 now working for you?
Cheers
Andrew
Code: Select all
import picoweb, uasyncio as asyncio
CONTENT = """\
<html>
<head>
</head>
<body>
<p>Hello #%d from uPyEasy!</p>
</body>
</html>
"""
app = picoweb.WebApp(__name__)
@app.route("/")
def index(req, resp):
yield from picoweb.start_response(resp)
yield from resp.awrite(CONTENT)
class plugins(object):
def __init__(self) :
print("init")
async def asyncdevices(self):
print("async")
import network,pyb
nic = network.WIZNET5K(pyb.SPI(1), pyb.Pin.board.A3, pyb.Pin.board.A4)
while not nic.isconnected():
pass
nic.active(1)
nic.ifconfig(('192.168.178.100', '255.255.255.0', '192.168.178.1', '192.168.178.1'))
loop = asyncio.get_event_loop()
_plugins = plugins()
loop.create_task(_plugins.asyncdevices())
app.run(host="0.0.0.0", port=80,debug=False)
Code: Select all
#core._nic.active(1)
Code: Select all
core._nic.active(1)
Fantastic! Good spot!!LisaM wrote: ↑14 Apr 2018, 14:40 Solved the mystery, it was a single line of code! Changing this in the hal.py file from:toCode: Select all
#core._nic.active(1)
Solved the problem. In hindsight it makes sense, the nic was there, even with an ip-address, but not active so it couldn't receive data...Code: Select all
core._nic.active(1)
Uploaded new version.
Cheers,
Lisa
I totally forgot the Lopy was ESP32. Since I have a couple of those, I will have to plug one in and see if it works.....JR01 wrote: ↑19 May 2018, 14:54 Difficult to see in this forum topic which board specs will and won’t work. Ie. memory required for code, etc.
Will this board work?
STM32 ARM Mini System - 72Mhz
https://www.robotics.org.za/6970622930693
And the pycom lopy?
https://www.robotics.org.za/AF3339
The mini doesn work, you'll need at least 1MB of flash memory! Also at least 196K of ram.JR01 wrote: ↑19 May 2018, 14:54 Difficult to see in this forum topic which board specs will and won’t work. Ie. memory required for code, etc.
Will this board work?
STM32 ARM Mini System - 72Mhz
https://www.robotics.org.za/6970622930693
And the pycom lopy?
https://www.robotics.org.za/AF3339
Can you post the errors? i'm interested in the error.Drum wrote: ↑21 May 2018, 17:55 I gave the LoPy a try, the 2048 version loads and runs. I need to play with it more, but it appears to have issue keeping the AP information but that could be me not doing something correctly.. There were some other errors, something about MAC address not set, but that could be the LoPy comm module. Hard to say.
I was able to access several of the menus as well..
Is this an ESP32 or a STM32F4?
But, you do get an ip-address:Drum wrote: ↑11 Jul 2018, 17:11 I am still getting
I (3063) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (3073) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUS
How can I get the log without being connected to the computer?
Thanks
You should be able to connect to it...I (5063) event: sta ip: 192.168.1.114, mask: 255.255.255.0, gw: 192.168.1.1
I
Users browsing this forum: No registered users and 8 guests