tellnet local network ansd compilation

Moderator: Telldus

philarete
Posts: 54
Joined: Fri Mar 17, 2023 9:45 am

tellnet local network ansd compilation

Post by philarete »

Hi :)
I'm trying to get acces on local network to telldus. Yes, we did now. It's ok, ant we can ask and answer via python socket library. But, there is a rf directory: has anyone been able to compile receive.c ?
And at this point, could someone explain:
- htc.h is the hitecc pic18 one ?
- can we use gcc ?
- Is there e configure script downloadable ?
- Is there a help link for how to use compiled sources ?

Ty
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tellnet local network ansd compilation

Post by micke.prag »

philarete wrote:- htc.h is the hitecc pic18 one ?
Yes
philarete wrote:can we use gcc ?
No, please read README:
The following software is required to build the firmware for TellStick Net.
* Hi-Tech C Pro for the PIC18 MCU Family, version 9.63PL3 or later.
The version 9.80 seems to be incompatible with the TCP/IP stack. Use an earlier version
until this is resolved (read more: http://developer.telldus.com/ticket/206).
http://www.htsoft.com
philarete wrote:Is there e configure script downloadable ?
Yes, read the README for instructions how to build the code
philarete wrote:Is there a help link for how to use compiled sources ?
Please read the README file and see the example script in the client/ folder.
Micke Prag
Software
Telldus Technologies
philarete
Posts: 54
Joined: Fri Mar 17, 2023 9:45 am

Re: tellnet local network ansd compilation

Post by philarete »

Ty
Sorry, i'm not clear. :mrgreen:
I compiled the sources and uploaded to telldus, i can communicate thru socket with python.
I was talkin about receive.c and all the libraries in rf folders: when i try gcc ./receive.h --> no config.h / no htc.h
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tellnet local network ansd compilation

Post by micke.prag »

Why do you compile using gcc? Please read my previous reply. The firmware MUST be compiled using the Hi-Tech C compiler.
You say you have the firmware up and runnig, so why do you try to just compile one of the files?
Micke Prag
Software
Telldus Technologies
philarete
Posts: 54
Joined: Fri Mar 17, 2023 9:45 am

Re: tellnet local network ansd compilation

Post by philarete »

... because i'm a noob.
Ok.
I thought we had to compile them one by step (i read something in forums about rising sun protocol).

I do not understand if i can find a list of the commands:
1/ in yout pythonexample for rebooting "A:disconnect" ---> what is "A:" ?
2/ in your send messages examples : 4:sendh1:S32:$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$kk$$kk$$k$k$ks
If i read well i should read [4:send] is "send" command and hXXXXXXXs is the message itslef with "1:S", one character letter message and 32:xxx means a command. Right ?
3/ So, for passing the "V+" command, should i write: 4:sendh1:V1:+ ?
why if do:

Code: Select all

msg2="4:sendh1:V1:+s"
UDPSock.sendto(msg2, (ip,p))
(test, (ip, p)) = UDPSock.recvfrom(2048)
i get an error message please ?
4/ Last: You wrote this is an "example" for switching on Arctech switch: S$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$kk$$kk$$kk$$}+ What are for example the others commands to switch on Rising sun switches or the commands to send for reading sensors info

Sorry, but hard for me to understand.

5/ How could i revert to telldu Live! firmware plz ?
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tellnet local network ansd compilation

Post by micke.prag »

philarete wrote:1/ in yout pythonexample for rebooting "A:disconnect" ---> what is "A:" ?
http://developer.telldus.com/doxygen/TellStickNet.html
philarete wrote:2/ in your send messages examples : 4:sendh1:S32:$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$kk$$kk$$k$k$ks
If i read well i should read [4:send] is "send" command and hXXXXXXXs is the message itslef with "1:S", one character letter message and 32:xxx means a command. Right ?
"send" is the command but the message is a dictionary with the content:
'S' = '$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$kk$$kk$$kk$$k'
philarete wrote:3/ So, for passing the "V+" command, should i write: 4:sendh1:V1:+ ?
TellStick Net does not support the V-command
philarete wrote:4/ Last: You wrote this is an "example" for switching on Arctech switch: S$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$k$kk$$kk$$kk$$}+ What are for example the others commands to switch on Rising sun switches or the commands to send for reading sensors info
You can use the code from telldus-core for algoritms how to encode other protocols.
http://developer.telldus.com/browser/te ... ingSun.cpp
philarete wrote:5/ How could i revert to telldu Live! firmware plz ?
http://developer.telldus.com/wiki/Firmware
Micke Prag
Software
Telldus Technologies
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tellnet local network ansd compilation

Post by micke.prag »

philarete wrote:I do not understand if i can find a list of the commands
http://developer.telldus.com/browser/Te ... sticknet.c
Please see the function handleMessage(), only "send" and "reboot" is implemented.
Micke Prag
Software
Telldus Technologies
philarete
Posts: 54
Joined: Fri Mar 17, 2023 9:45 am

Re: tellnet local network ansd compilation

Post by philarete »

ok, ty, i can see the light.
1/Except for "A:disconnect". I read your page link before writing, but what i get is "you have to pick a letter (could be A or J), it doesn't matter, it's a code activation".

2/Edit: Gotcha: " else if (strcmp(name, "disconnect") == 0) "
Pfewwww

3/ When you say "use RisingSun.cpp", you mean:
const char code_on[][7] = {

Code: Select all

30	                "110110", "001110", "100110", "010110",
31	                "111001", "000101", "101001", "011001",
32	                "110000", "001000", "100000", "010000",
33	                "111100", "000010", "101100", "011100"
34	        };
35	        const char code_off[][7] = {
36	                "111110", "000001", "101110", "011110",
37	                "110101", "001101", "100101", "010101",
38	                "111000", "000100", "101000", "011000",
39	                "110010", "001010", "100010", "010010"
40	        };
I can't find a "protocolArcep.cpp" to check your translation. So, i i take the first one:
110110, it becomes: "$k$kk$k$kk" right ? So i can use:

Code: Select all

msg = "4:sendh1:S10:$k$kk$k$kks"
If i send this to Tellnet, should it blink or do something ?
Last edited by philarete on Fri Oct 05, 2012 9:41 am, edited 1 time in total.
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tellnet local network ansd compilation

Post by micke.prag »

Where do we write this?
philarete wrote:you have to pick a letter (could be A or J), it doesn't matter, it's a code activation
I cannot find this anywhere.
Micke Prag
Software
Telldus Technologies
philarete
Posts: 54
Joined: Fri Mar 17, 2023 9:45 am

Re: tellnet local network ansd compilation

Post by philarete »

Sorry for being so dummy:
product:mac address:activation code:firmware


Code for activation: ABCDEFGHIJ
Is "A" a length ?
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tellnet local network ansd compilation

Post by micke.prag »

philarete wrote:I can't find a "protocolArcep.cpp" to check your translation.
In telldus-core ArcTech is called Nexa. You can find the code here:
http://developer.telldus.com/browser/te ... olNexa.cpp
philarete wrote:msg = "4:sendh1:S10:$k$kk$k$kks"
The length for your S-parameter doesn't seem correct. You only have 10 characters in the argument but send 0x10 (16). TellStick Net will not be able to parse the message.
Micke Prag
Software
Telldus Technologies
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tellnet local network ansd compilation

Post by micke.prag »

philarete wrote:Sorry for being so dummy:
product:mac address:activation code:firmware

Code for activation: ABCDEFGHIJ
Is "A" a length ?
No, this is the activation code written on the label of the device. The one above is just an example. Your device will report something different.
Micke Prag
Software
Telldus Technologies
philarete
Posts: 54
Joined: Fri Mar 17, 2023 9:45 am

Re: tellnet local network ansd compilation

Post by philarete »

Ok, ty. So what is "A:disconnect". Is (0x10) -> 16 in hex so "A" ?
micke.prag
Site Admin
Posts: 2243
Joined: Fri Mar 17, 2023 9:45 am
Location: Lund
Contact:

Re: tellnet local network ansd compilation

Post by micke.prag »

From the documentation:
Strings are length-prefixed base sixteen (upper case) followed by a colon and the string. For example 6:FooBar corresponds to 'FooBar'.
The length of the string "disconnect" is 10 characters. 10 in hex is 0xA.
Micke Prag
Software
Telldus Technologies
philarete
Posts: 54
Joined: Fri Mar 17, 2023 9:45 am

Re: tellnet local network ansd compilation

Post by philarete »

ok, that's clear.
ty
Post Reply