-= EDIT =-
The new library can be found on github
https://github.com/Serasidis/STM32duino … erCard_STM
Roger, if you want you can add it to your repository.
– backSoon
– getStatic
– multiPacket
– noipClient
– rbbb_server
– stashTest
– webClient
– xively
Let me know when the new lib is in your repo and I can pull it
Thanks
Roger
Can you copy those files to your Fork of my repo and do a “pull request”
Its getting too late to “pull” today (for me), but I will do it first thing tomorrow.
Thanks
Roger
Can you copy those files to your Fork of my repo and do a “pull request”
Its getting too late to “pull” today (for me), but I will do it first thing tomorrow.
Thanks
Roger
The Github is very powerful tool but at the same time it’s very complicated.
In the list of examples, I don’t see any servers, such as TCPServer. Do you think we can get some ?
In the list of examples, I don’t see any servers, such as TCPServer. Do you think we can get some ?
Do you mean it would link Serial over TCP ?
Yes. Git is complicated
I sometimes get my local Git very confused and have to delete it and get a new copy from the server
Do you mean it would link Serial over TCP ?
Do you mean it would link Serial over TCP ?

The wiring of Netduino2Plus is a bit different :
ENC_SCK = PA5
ENC_MOSI = PA7
ENC_MISO = PB4
ENC_CS = PC8
I change those accordingly, but in the ENC28J60::begin(), it is hanging in infinite loop writePhy(PHCON2, PHCON2_HDLDIS), which is in fact the loop with no timeout handling in wrtiePhy() is while (readRegByte(MISTAT) & MISTAT_BUSY);
since I don’t know much about ENC28J60, other than having used it on Arduino, I don’t know what I should do.
Probably, since I have a seperate ENC28J60 module, I can try to connect it to my MapleMini and figure out the differences in bytes received.
Any other clues ?
http://www.aliexpress.com/item/USB-24M- … 88263.html
this one gives a bit more info:
http://www.aliexpress.com/item/USB-24M- … 54825.html
One of these, with the software that does decode of the serial protocols for you, so you can compare what is actually on the wire with
what you expect, etc just makes life SO much easier. There are a whole lot of options at different prices but these are so cheap they dont
have to save you much time to be useful.
NOTE: These are clones of better devices, so I will leave the opinions of if using cloned hardware is ok to the individual.
If you do want the real deal then: https://www.saleae.com/ these guys are great.
I have already 2 logic analysers, 1 is like the link your provided,a Saleae clone, and 1 is a FX2 Cypress board from LC-Soft.
I’m using sigrok/pulseview with them on Linux.
It was really helpful recently to debug SPI in MapleMini, and also on ESP8266, even those past days.
But for Netduino2Plus, with all hardware embedded on a 4 layers PCB, it is a bit more difficult, unless I solder thiny wires directly on ENC28J60.
So, I think my only way to debug is thru software and compared it with a working setup, maybe an external ENC28J60 module hookup on an external SPI where I can hook also one of those logic-capture board more easily.
BTW, on a side note, I was forgetting another GPIO, ENC_POWER that allows to turn on the VCC of the ENC28J60. I’ve added it, but now it is hanging even earlier, during readOp(ENC28J60_READ_CTRL_REG, ESTAT) …
rates look ok, etc?
I find sewing machine needles make nice fine probes for smaller SMD work, as an accupuncture needles if you need longer ones.
more difficult if you need to monitor several at the same time.
I often keep a ‘check code’ routing that does the minimum needed to get a chip ID or similar from the device, and which can run looped
which makes checking the basic bus interface a lot easier.
I know its all the basics, but the number of times I catch myself missing something simple.

Since Vassilias’s library doesn’t have any TCPServer yet, I’ve look at the “arduino_uip” library that I’ve play with about 10 months ago on ATM328, at that time, it was working nicely. I’ve try to merge enc28j60.cpp from Vassilias’s library into Enc28J60Network.cpp of the “arduino_uip” library. I’ve got some success, I’ve been able to have DHCP there too. Although a Telnet client can succeed getting a connection to port 23, the MapleMini manage it partially : the server.available() always responding False. I’ve enabled that PACKET_DEBUG, I see them coming in (I’ve didn’t look their contents), even “ping” is working, but the arduino loop() where server.available() is located is simply looping.
I will dig more …

By a telnet server, do you mean a custom server on tcp, or do you mean a shell?
If you are looking for a shell, then wont you be wanting something like busybox? thats not a small lump.
If you just want custom commands over TCP, something like:
http://blog.bouni.de/blog/2012/06/25/a- … et-server/
Is quite simply, however that looks like it is W5100 (ethernet lib) based.. which I admit is my personal perference
anyway.
Personally I do much more UDP, but as you say, having TCP servers can be used for a bunch of good purposes.
Yes, that is exactly what I wish to have. (no, busybox needed, simply my own commands, a mini-shell thru IP instead of Serial)
Unfortunately, the Server and Client classes are not there yet, so that’s why I was trying to merge it with “arduino_uip”.
I have W5100 too, I will look at it later, but since my end goal is to port that to Netduino2Plus equipped with an ENC28J60, I prefer continuing in the current path. I will dig a bit more in finding how packets are not parsed properly in the upper level of Server.available(), etc.
I’ve finally got the isuue with readOp(ENC28J60_READ_CTRL_REG, ESTAT) fixed :
Now, I’m getting back on my main goal, a TCPServer …
Telnet server/client examples are in my future plans.
Vassilis ? Did you got chance to look about that part ? Maybe I can help there too. Is it simple to merge socket.* files from the Ethernet_STM into Serasidis_EtherCard_STM libs ?
You can use a alternative library (UIPEthernet) for ENC28j60.
– The UIPEthernet library uses the same API as the official Arduino Ethernet (compatible with WizNet W5100 ethernet library.).
In code only must change #include <Ethernet.h> to #include <UIPEthernet.h>.
– The UIPEthernet full support for persistent (streaming) TCP-connections and UDP (Client and Server each), ARP, ICMP, DHCP and DNS. Build around Adam Dunkels uIP Stack.
http://www.homautomation.org/2014/10/27 … r-arduino/
Original UIPEthernet library is written by Norbert Truchsess <[email protected]>
You can access on github:https://github.com/ntruchsess/arduino_uip
I modified the code:
– Replaced import to include, because gcc say ‘import is deprecated’.
– I merged martinayotte’s modification (Correct s_dhcp ~40K more memory usage with STM32F MCU-s.)
– Add support for STM32F, and ESP8266 MCU-s.
– Moved htons,ntohs,htonl,ntohl definitions to uip.h.
– Correct infinite loops.
My modified UIPEthernet supported more MCUs:AVR arduinos, STM32F MCU-s, ESP8266 MCU.
Compililation tested: ATMEGA328P,ArduinoDue,Maple Mini,ESP8266.
I already tested (modified UIPEthernet) on arduino nano, and maple mini (STM32F103CBT).
You can download my modified UIPEthernet repo from github:https://github.com/UIPEthernet/UIPEthernet
Best Regards!
Managed to port & test both Vasillis & cassyarduino Libs in an F091 nucleo board… They both run OK !!!
Well done and thanks !