STM32 boards

Moderators: BertB, Voyager, Stuntteam, Martinus, LisaM

Message
Author
frank
Normal user
Posts: 80
Joined: 15 Oct 2016, 20:17
Location: Nederland

Re: STM32 boards

#21 Post by frank » 15 Feb 2018, 22:16

>>> import upyeasy
>>> upyeasy.setnet(1,'A4','A3')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy/__init__.py", line 23, in setnet
File "upyeasy/utils.py", line 30, in setnet
File "filedb.py", line 70, in update
AttributeError: type object 'networkTable' has no attribute '__fields__'
>>>

this is what i get

LisaM
Normal user
Posts: 484
Joined: 11 Apr 2017, 18:29

Re: STM32 boards

#22 Post by LisaM » 15 Feb 2018, 22:52

frank wrote:
15 Feb 2018, 22:16
>>> import upyeasy
>>> upyeasy.setnet(1,'A4','A3')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy/__init__.py", line 23, in setnet
File "upyeasy/utils.py", line 30, in setnet
File "filedb.py", line 70, in update
AttributeError: type object 'networkTable' has no attribute '__fields__'
>>>

this is what i get
Hi Frank,

Does this also happen when you do:

Code: Select all

upyeasy.setnet(1,'A4','A3','192.168.0.210', '255.255.255.0', '192.168.0.3', '8.8.8.8')
?

Cheers,

Lisa

AndrewJ
Normal user
Posts: 220
Joined: 14 Feb 2017, 12:38

Re: STM32 boards

#23 Post by AndrewJ » 06 Mar 2018, 21:14

LisaM wrote:
15 Feb 2018, 22:52
frank wrote:
15 Feb 2018, 22:16
>>> import upyeasy
>>> upyeasy.setnet(1,'A4','A3')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "upyeasy/__init__.py", line 23, in setnet
File "upyeasy/utils.py", line 30, in setnet
File "filedb.py", line 70, in update
AttributeError: type object 'networkTable' has no attribute '__fields__'
>>>

this is what i get
Hi Frank,

Does this also happen when you do:

Code: Select all

upyeasy.setnet(1,'A4','A3','192.168.0.210', '255.255.255.0', '192.168.0.3', '8.8.8.8')
?

Cheers,

Lisa
Hi Lisa,
I'm having the same error as Frank...
And in answer to your question to him, if I do

Code: Select all

>>> upyeasy.setnet(1,'A4','A3','192.168.1.77', '192.168.1.1', '255.255.255.0', '192.168.1.1')
I get

Code: Select all

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upyeasy/__init__.py", line 23, in setnet
  File "upyeasy/utils.py", line 30, in setnet
  File "filedb.py", line 70, in update
AttributeError: type object 'networkTable' has no attribute '__fields__'
I am using the Beta release .dfu file from Github.

When I do

Code: Select all

import upyeasy
upyeasy.main()
it looks as if upyeasy starts. I get some OSError17's on the way. It gets to the stage where it says it is running on 192.168.1.77:9000/, and starts the async processes, but however hard I try, I cannot access it from my browser ("192.168.1.77:9000 is unreachable"). I have set port 9000 in config/config. (I'm just wondering, does this affect ethernet, or only wifi??).
Hope this helps!
Andrew

karl222
Normal user
Posts: 88
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: STM32 boards

#24 Post by karl222 » 15 Mar 2018, 16:02

LisaM wrote:
23 Dec 2017, 15:17
Firmware status: Beta
Firmware version: v0.2.0

For the PyBv3 with STM32F405 board:

BOM (Bill Of Materials): Wiring between Pyboard and W5500:
MOSI connected to PA7
MISO connected to PA6
SCLK connected to PA5
nSS connected to PA4
nRESET connected to PA3
Firmware upload instructions

Download the dfu-util tool here: http://dfu-util.sourceforge.net/

The uPyEasy FLASHBINARY file has this format: upyeasy_vXX_YYYYMMDD_test_esp32_2048.bin and is attached to this post as zip file.
The (latest) uPyEasy binary files can be downloaded here: https://github.com/letscontrolit/upyeasy/releases

Run this in REPL:
import pyb
pyb.bootloader()
Then you're kicked out of REPL due to boot mode.

Run this:
LINUX: sudo dfu-util --alt 0 -D upyeasy-pybv3.dfu
WINDOWS: dfu-util --alt 0 -D upyeasy-pybv3.dfu
After flashing the firmware, the dfu-util tool will reboot your pyboard.
After reboot, uPyEasy will auto-start.

If you have connected a W5500 as described above, no other steps are needed because uPyEasy is using DHCP to get the ip-address.
uPyEasy should be running on default port 80, so connect using your browser using: http://<your upyeasy ip address>:80

In linux you can use the following command to connect to the STM32: screen /dev/ttyACMx 115200,cs8
In Windows just use putty to connect to the com port COMx at 115200 baud speed.
If you have wired the W5500 otherwise, you'll get this message (or get stuck at Network init, then press ctrl-c):

Code: Select all

Exiting: Network not available, set network values!
Now, you'll need to set the correct parameters in REPL:

Code: Select all

upyeasy.setnet(<spi number>,'<machine pin nss>','<machine pin rst>')
And in the case of above wiring, it would be upyeasy.setnet(1,'A3','A4')
Then reboot using:

Code: Select all

import machine
machine.reset()
The uPyEasy webserver response is about 10x faster then the ESP32 WiFi response, due to the wired (1GB) network.
hi,

I was trying to wire up accordingly but couldn't find the nSS pin on the W5500. can someone help me on that...

thx
karl

AndrewJ
Normal user
Posts: 220
Joined: 14 Feb 2017, 12:38

Re: STM32 boards

#25 Post by AndrewJ » 15 Mar 2018, 19:14

hi,

I was trying to wire up accordingly but couldn't find the nSS pin on the W5500. can someone help me on that...

thx
karl
Hi karl,
I had the same issue. In the end, I used the one marked "SCS" on my W5500. It was a process of elimination for me, the others were pretty clear, so that seemed the nearest.
I'm still not sure if that was right, as I have been unable to access uPyEasy over my network, even though the log shows that uPyEasy has made a connection. But it may work for you, I hope so.
Good luck, let us know how it goes! ;)
Andrew

LisaM
Normal user
Posts: 484
Joined: 11 Apr 2017, 18:29

Re: STM32 boards

#26 Post by LisaM » 16 Mar 2018, 19:51

karl222 wrote:
15 Mar 2018, 16:02
hi,

I was trying to wire up accordingly but couldn't find the nSS pin on the W5500. can someone help me on that...

thx
karl
Picture of the W5500?

LisaM
Normal user
Posts: 484
Joined: 11 Apr 2017, 18:29

Re: STM32 boards

#27 Post by LisaM » 16 Mar 2018, 19:51

AndrewJ wrote:
15 Mar 2018, 19:14
hi,

I was trying to wire up accordingly but couldn't find the nSS pin on the W5500. can someone help me on that...

thx
karl
Hi karl,
I had the same issue. In the end, I used the one marked "SCS" on my W5500. It was a process of elimination for me, the others were pretty clear, so that seemed the nearest.
I'm still not sure if that was right, as I have been unable to access uPyEasy over my network, even though the log shows that uPyEasy has made a connection. But it may work for you, I hope so.
Good luck, let us know how it goes! ;)
Andrew
Can you post your W5500 also?

karl222
Normal user
Posts: 88
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: STM32 boards

#28 Post by karl222 » 16 Mar 2018, 20:00


AndrewJ
Normal user
Posts: 220
Joined: 14 Feb 2017, 12:38

Re: STM32 boards

#29 Post by AndrewJ » 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.

LisaM
Normal user
Posts: 484
Joined: 11 Apr 2017, 18:29

Re: STM32 boards

#30 Post by LisaM » 18 Mar 2018, 16:04

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.
For the STM32F103 to work, you'll need the STM32F103RG/STM32F103VG/STM32F103ZG because these have 1MB on board.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest