Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legth of ./codesend #43

Open
git-wessel opened this issue Sep 9, 2017 · 4 comments
Open

Legth of ./codesend #43

git-wessel opened this issue Sep 9, 2017 · 4 comments

Comments

@git-wessel
Copy link

Hi,
I want to a particularly set of numbers to my ' power socket switch device'
but it sent something other then what i asked for.

I’ll explain it:

I’ve two terminals open one for sending and one for monitoring what is send (with RFSniffer)

if it sent this:
5 2 4 6 9 9 7
i see exactly that pair of numbers in RFSniffer

But if is send this:
4 1 0 0 1 4 3 0
I come's out like this:
7 4 4 6 9 9 8
and as you see that totally different and one character shorter.

but if i send
4 1 0 0 1 4 3
i see exactly the same as what is sended

5246997 (working pair)
41001430 (Pair with sending problems)
4100143 (one character shorter, and its working)

So if I send 7 characters it's good but if go over that it does something weird.

has this problem something to do with the maximum length of characters?
Or has it something to do with my adapter?
I hope you can help me out, because my home automation project is still on this moment.

i can try many things for you if its needed.

@Martin-Laclaustra
Copy link

You are sending an integer longer than 24 bits (the default bit-length sent... see line 54 in codesend.cpp).

41001430 = 10 01110001 10100001 11010110
7446998 =     01110001 10100001 11010110
4100143 =     00111110 10010000 00101111

Longer number will not be received either unless you change parameters (or even type of variables) in rcswitch.

@git-wessel
Copy link
Author

git-wessel commented Sep 24, 2017

@Martin-Laclaustra So if I change line 54 in codesend.cpp it should be fine? or do i also need to change someting in rcswitch.h file (because codesend imports this file)?

@Martin-Laclaustra
Copy link

Martin-Laclaustra commented Sep 25, 2017

Please try it and report back where the hurdles are.
You may get in trouble in the following items:

  • Transmitting: size of the variable that holds the code in rcswitch (32 bits).
  • Receiving: size of the buffer that waits for the codes, which is specified as max-changes in a macro definition in rcswitch... and size of the variable that holds the received code.
    Good luck.

@SiberaIndustries
Copy link
Contributor

Check this fix #81 or check it out here. Let me know if it solves your issue. Cheers

Also related to #66 or #80 or #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants