Open rogerclarkmelbourne opened 10 years ago
Roger,
sorry, I forgot to post this library. I'll add it to Git ASAP.
In the meantime, I have attached the code. It is really tivial.
As for the other issues: it's been a while since I have worked on that code. I can't remember any such issues. I'll have a look at it over the weekend.
Regards,
Markus
Gesendet: Dienstag, 20. Mai 2014 um 13:00 UhrVon: "Roger Clark" notifications@github.comAn: buehlems/sma_web sma_web@noreply.github.comBetreff: [sma_web] Issues compiling (#1)
Hi,
Can you document where Ticker.h can be downloaded from.
Also, I'm getting several other errors while compiling
In file included from /sma_web.h:42, from sma_web.ino:32: bt.h:4: error: two or more data types in declaration of 'readyPin' sma_web.ino: In function 'void loop()': sma_web:351: error: void value not ignored as it ought to be
(Note. The only reason I'm not getting errors for the missing Ticker.h is that I've made a dummy class with the same method names)
Thanks.... PS. I'm only really interested in the Wifi code and would like to re-purpose it for use with a compatible Uart Wifi module
— Reply to this email directly or view it on GitHub.
No worries Markus
The other problems may be changes to the Arduino IDE.
BTW. I was interested to see the note in your code about baud rate, and using 38400, did you see errors at higher data rates ?
I've been using a TLD13AU06 (later model than yours) at 115200 to send small amounts of data with no issues. The only problems I had was using Software Serial on a Arduino Uno, as it wouldnt work above 57600
Hi Roger,
I also first started with 115200 baud and it seemed to work well. But when I kept the device running for a longer time, I got errors in my http socket transfers which I had a hard time to debug. After long debugging sessions and using a socket monitor I found the following error rates: WIFI error rates: 115200 - 1/3k bytes, 57600 - 1/300kbytes, 38400 - 0/1Mbytes
You find this information in Wifi.h as well. The guy I got bt from seemed to have had the same issue with his bluetooth module and chose 38400 as well. I believe this has nothing to do with the wifi or bluetooth module but with the cables I connect them to the Arduino. If you have shorter or better connections higher rates may work as well. But better make some tests before trusting the connection. I couple of kbytes are not sufficient. I ran it for several Mbytes.
-- Markus
Von: Roger Clark notifications@github.com An: buehlems/sma_web sma_web@noreply.github.com CC: buehlems buehlems@web.de Gesendet: 12:25 Mittwoch, 21.Mai 2014 Betreff: Re: [sma_web] Issues compiling (#1)
No worries Markus The other problems may be changes to the Arduino IDE. BTW. I was interested to see the note in your code about baud rate, and using 38400, did you see errors at higher data rates ? I've been using a TLD13AU06 (later model than yours) at 115200 to send small amounts of data with no issues. The only problems I had was using Software Serial on a Arduino Uno, as it wouldnt work above 57600 — Reply to this email directly or view it on GitHub.
Thanks Markus, I'll need to do some testing to see if short RS232 wires have the same problem. I'll see if I can find some code that generates something like a checkerboard bitmap image so something similar that the browser can display, as I presume that when the rs232 fails, the comms get completely messed up between the device and the Arduino
I was intending to attach the module very close to the Arduino, so perhaps this isn't so much of an issue.
BTW. Do you have a blog posting etc that describes what you were doing, as I'd be interested to hear about an other issues.
I've been doing a lot of research into this module, in co-ordination with another guy in Canada via the Arduino forum.
We have found that the "latest" firmware that gets shipped with the TLN13UA06 module (dated March 2014), has a serious fault in the socket create (for server sockets) But have found some older firmware (from a wifi mains plug) that seems to address this issue.
BTW. Do you know who really makes this module? is it http://winnermicro.com/eproduct.asp?id=19 or is it www.hed.com.cn
or perhaps its neither of them and they are just the company who does the vertical marketing.
Thanks
Roger
Roger,
whenever I had to write some extra code to work around an oddity of the module I documented it in the code itself. The one thing I can remember, is that the device would only send packets of 6 bytes (sksnd). This is quite annoying because it complicates the send code: I had to write these sendString functions to manage this as tranparently as possible. It might be fixed in later versions of the firmware. I have never tried. I didn't dare to update the firmware because I was afraid that something might go wrong during the update or that a new firmware has new bugs that I then need to find out and work around.
BTW: the send and receive buffer of my device has 512 bytes. This is also documented in my code. I find the documentation hard to understand. I am not a native English speaker as you may already have guessed, but even I could see that the English is pretty poor, sometimes it is even hard to guess what they mean.
I have also tried to find out more about the module, but sooner or later I ended up on a Chinese web page. I also tried to find some code that goes beyond the trivial use of the module, i.e. use it in command code, but couldn't find any either.
I try to remember how I did my bit error tests in detail. But you probably know how these things are: you find an error, try all sorts of things to debug it and once it is fixed, you forget about it. I'll have a look if I can still find my debug code. But I have only little hope.
I haven't worked on the code recently, there are too many other things going on. But I guess that I have all the low level functions I need to work with the module. I'd be glad to stay in touch and learn what has changed with newer versions. Perhaps we can extend my Wifi class together and make it more generic for use with later versions of the device.
If you want to see the web page I'm feeding with my device, see here: http://www.b-67.de/solar_plant.shtml The Arduino is not always only, but the page is.
-- Markus
Am 22.05.2014 00:55, schrieb Roger Clark:
Thanks Markus, I'll need to do some testing to see if short RS232 wires have the same problem. I'll see if I can find some code that generates something like a checkerboard bitmap image so something similar that the browser can display, as I presume that when the rs232 fails, the comms get completely messed up between the device and the Arduino
I was intending to attach the module very close to the Arduino, so perhaps this isn't so much of an issue.
BTW. Do you have a blog posting etc that describes what you were doing, as I'd be interested to hear about an other issues.
I've been doing a lot of research into this module, in co-ordination with another guy in Canada via the Arduino forum.
We have found that the "latest" firmware that gets shipped with the TLN13UA06 module (dated March 2014), has a serious fault in the socket create (for server sockets) But have found some older firmware (from a wifi mains plug) that seems to address this issue.
BTW. Do you know who really makes this module? is it http://winnermicro.com/eproduct.asp?id=19 or is it www.hed.com.cn http://www.hed.com.cn
or perhaps its neither of them and they are just the company who does the vertical marketing.
Thanks
Roger
— Reply to this email directly or view it on GitHub https://github.com/buehlems/sma_web/issues/1#issuecomment-43824883.
Hi Markus,
I wasn’t aware of the 6 byte packet size for SKSND. It may have been fixed in later firmware versions. I seem to be able to send whatever size of data I like.But perhaps just by accident this has always been a multiple of 6 bytes ;-)
I had some issue with the firmware (dated March 2014) in my module, as SKCT would not really create active Server sockets.
SKSTT claimed that the socket was running, but both Telnet and the browser reported that there was no connection.
Yet someone else with this module (Frederic in Canada) had the same module number TLN13UA06 which worked, but he realised he had older firmware in one of this modules (Frederic has 3 modules – all the same I think )
Frederic tried reloading this firmware (that I found) http://www.wifiplug.co.uk/updates.html onto his newest module (March 2014) firmware and it worked OK.
NOTE. THIS FIRMWARE DOES NOT WORK ON YOUR MODULE ONLY TLN13UA06 NOT THE OLDER TYPES.
Actually Frederic tried a TLG10UA firmware he found on another site on one of his TLN13AU06 modules, but it “bricked” the module, so it looks like firmware for the 13 is not compatible with the 10.
It is interesting to open the firmware in a Hex editor, as you can see all the strings, and determine some undocumented commands, e.g. starting with the “&” character.
e.g. AT+&DBG which I guess is some sort of Debug command e.g. AT+&DBG=!1 sets this - but doesn’t seem to make any difference to the operation.
BTW. I also disassembled the Uart-config.exe program and there are additional commands in that program which my firmware , and the firmware from the wifi-plug do not support e.g. AT+PPPPASS (I think this is correct), but may work with your TLG10 module.
Re: Documentation
The PDF’s documentation appear to be “machine translated” from chinese, and even if you speak as English natively, they are hard to understand.
Also the documentation I found is not really for the TLN13 its possibly for the TLN10, and is not all correct.
Specifically, the hardware control of startup mode using CTS / GPIO to enter “command mode” after start-up, by holding CTS/GPIO LOW for 300ms after reset.
I have tried this many times, including control by the Arduino, and it does not appear to operate as in the documentation, i.e it does not seem to make any difference
Re: Manufacturer
If you remove the metal box over the main CPU, it’s just possible to see the part number on the CPU chip and it is made by HED a Chinese company.
Also the firmware is copyright HED.com.au so I’m pretty sure this is who makes the CPU, however its possible the Beijing Winner Microelectronics have made the module using this CPU
Hed.com.cn lists the TLG10UA06 http://www.hed.com.cn/en/Download_53_71.aspx but not the TLN13UA06
I’d love to have the firmware source files and compiler for this (its probably just GCC as the cross compiler, but I’ve no idea what architecture etc)
Its strange also there are no original docs from the manufacturer's, just an overview doc on Beijing Winner website
Re: Making the code better
I wrote a very simple library (https://github.com/rogerclarkmelbourne/Arduino/tree/master/libraries ) and got as far as sending an email, but you code is much better than mine ;-) So I was thinking about making a new library based on your code.
Ideally the library would have its public API the same as the Arduino Wifi Shield, but would need to define a few extra paramaters i.e what serial port to use and possibly which pins to use for RTS and Reset.
In my library I pass a reference to the Serial port to be used (this can be Software Serial or Hardware Serial). However the data rate cannot be set by the library because both Hardware Serial and Software Serial directly subclass Stream, but Stream does not have Begin method.
So in my code the data rate needs to be set in the main “sketch” . I guess that perhaps a parameter that is a pointer to the begin() function in the serial class you are using, but neither way is perfect.
It’s a shame that both Software Serial and Hardwar Serial, directly subclass stream without an intermediate abstract class that defined but does not implement Begin()
As this would make it easier to write libraries that use Serial. I have tried using an Arduino Mega 2560 using Hardware Serial, and also a Uno using Software Serial Software serial only works up to 57600 even though its supposed to work at 115200
Re: Time available
I know what you mean. I do not have much time either to do interesting things like this, as they take loads of hours ;-0)
Cheers
Roger
Markus
FYI.
There is now a long thread on the Arduino forum, started by Frederic and contributed to by me and one other person http://forum.arduino.cc/index.php?topic=232908.new;topicseen#new
I have now added the Ticker library to GIT.
Am 22.05.2014 23:50, schrieb Roger Clark:
Markus
FYI.
There is now a long thread on the Arduino forum, started by Frederic and contributed to by me and one other person http://forum.arduino.cc/index.php?topic=232908.new;topicseen#new
— Reply to this email directly or view it on GitHub https://github.com/buehlems/sma_web/issues/1#issuecomment-43948571.
Thanks, I'll do a pull
Hi Roger,
we exchanged some mails two years ago or so. I have written some software for TLG10UA03. Are you still working with the module? I would like to write a MQTT driver. In the meantime I have bought a TLN13UA06 which is supposed to be compatible. I had a bit of a hard time to set it up properly with that weird configuration tool, but in the meantime it connects to my WLAN. What I found is that in the HTLM setup I cannot select the encryption mode. It is just greyed out. Do you know by any chance if there is some newer firmware available? I have version 6.20.81. The good thing about the module is that it consumes much less power.
Regards Markus
Hi Markus
I don't use the TLN13UA06 any more because the ESP8266 is now a much better way to add Wifi to a project.
Depending on your project requirements you can program the ESP8266 using the Arduino IDE as it has its its own microprocessor, or if you need thinks like lots of ADC inputs, I now use the STM32F103 based boards, as you can get them for $2 on Aliexpress and they run at 72mhz and have 20k ram and 64k flash as well as onboard usb, and are also programmable directly in the Arduino IDE
Cheers
Roger
Sent from my iPad
On 04/07/2016, at 5:42 AM, buehlems notifications@github.com wrote:
Hi Roger,
we exchanged some mails two years ago or so. I have written some software for TLG10UA03. Are you still working with the module? I would like to write a MQTT driver. In the meantime I have bought a TLN13UA06 which is supposed to be compatible. I had a bit of a hard time to set it up properly with that weird configuration tool, but in the meantime it connects to my WLAN. What I found is that in the HTLM setup I cannot select the encryption mode. It is just greyed out. Do you know by any chance if there is some newer firmware available? I have version 6.20.81. The good thing about the module is that it consumes much less power.
Regards Markus
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I have heard about this before and it sounds interesting. What means the Arduino IDE supports ESP8266? Do all the standard libraries etc. work? I.e. the standard language from https://www.arduino.cc/en/Reference/HomePage and the libraries from https://www.arduino.cc/en/Reference/Libraries Or are there any limitations? I just want to get a feeling what it means to convert my project to the new hardware.
Regards Markus
Markus
I dont know if the ESP8266 is 100% compatible, but it is very close and most things work
The Arduino capability is written by the community and is ooen source. Well its mainly written by some guy called Ivan who lives in St Petersberg , but the version is so popular there are hundreds if not thousands of contributers
just search on "Arduino ESP8266 Github" and you will find the master reference
A board like this from Aliexpress etc is your best option to start investigating the esp8266 as it has a usb serial converter so you can plug it into the pc to upload
cheers
roger
Sent from my iPad
On 04/07/2016, at 7:52 PM, buehlems notifications@github.com wrote:
I have heard about this before and it sounds interesting. What means the Arduino IDE supports ESP8266? Do all the standard libraries etc. work? I.e. the standard language from https://www.arduino.cc/en/Reference/HomePage and the libraries from https://www.arduino.cc/en/Reference/Libraries Or are there any limitations? I just want to get a feeling what it means to convert my project to the new hardware.
Regards Markus
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi,
Can you document where Ticker.h can be downloaded from.
Also, I'm getting several other errors while compiling
In file included from /sma_web.h:42, from sma_web.ino:32: bt.h:4: error: two or more data types in declaration of 'readyPin' sma_web.ino: In function 'void loop()': sma_web:351: error: void value not ignored as it ought to be
(Note. The only reason I'm not getting errors for the missing Ticker.h is that I've made a dummy class with the same method names)
Thanks.... PS. I'm only really interested in the Wifi code and would like to re-purpose it for use with a compatible Uart Wifi module