Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Virtual USB-port for AVR
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 20, 21, 22  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
Petr_

Bascom Member



Joined: 24 Mar 2010
Posts: 66

blank.gif
PostPosted: Tue Jan 18, 2011 12:25 pm    Post subject: Reply with quote

ollopa wrote:
One thing to check is that if you're sending exactly 8 bytes then you need to follow that up with a 0-length packet to signal the end of a data session.
Transmission of data packet carries HID driver PC and it will most likely send after 8 bytes, the packet is 0-length.
Controller clearly identifies when it comes to the 8-byte packet, but sometimes hangs for some unknown reason to me.
Back to top
View user's profile
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Tue Jan 18, 2011 1:10 pm    Post subject: Reply with quote

@Petr_
from PC to Device i'm sending one more Byte than needed! ($55)
got this Problem also in first Version and that additional Byte helped me!

regards, Michael

_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
Petr_

Bascom Member



Joined: 24 Mar 2010
Posts: 66

blank.gif
PostPosted: Tue Jan 18, 2011 5:08 pm    Post subject: Reply with quote

If you send the device only zero bytes, then the error is almost there. In the image can be seen that the error occurred after sending a packet № 15500.
And it's not the fault of the transmission or reception, and there was distortion of the transmitted or received data.
Code:
15500  ERROR    Bug compare memory  Send: 00 00 00 00 00 00 00 00 ;    Read: 80 06 02 03 09 04 FF 00


If the device does not send the zero data, a arbitrary, then a transmission error in the first package and the device hangs and never responds to data transfer.
Back to top
View user's profile
Petr_

Bascom Member



Joined: 24 Mar 2010
Posts: 66

blank.gif
PostPosted: Tue Jan 18, 2011 10:33 pm    Post subject: Reply with quote

If you send more than one byte (2 or more bytes) in the packet, then the errors occur not only during transmission through 1 endpoint, but also through feature (&B00100001 --> SET_REPORT --> Feature).
If you send only one byte in the packet, then everything is OK.
Perhaps it is incorrect to processed long data packets that contain 2 or more bytes.
But why is error-free system messages are handled 0 endpoint, because they contain more than 1 byte?
Back to top
View user's profile
AndersL

Bascom Member



Joined: 25 Jan 2010
Posts: 93
Location: Kragerø,Norway

norway.gif
PostPosted: Thu Jan 20, 2011 2:48 pm    Post subject: Reply with quote

Petr_,
My Symantec endpoint reports trojans in your *.rar file.
Have you checked it?

_________________
Anders
Back to top
View user's profile
Petr_

Bascom Member



Joined: 24 Mar 2010
Posts: 66

blank.gif
PostPosted: Thu Jan 20, 2011 3:06 pm    Post subject: Reply with quote

Here is the result of verification rar-archive 41 anti-virus http://www.virustotal.com/file-scan/report.html?id=0a0a50d1fca4e2692b93d1dd2a2baf425a0cd75af0b0084e3e8392fd98ab9290-1295531996

PC-software does not contain malicious code. I'm sure 100% because, i compiled the program.
In the archive is the source code (extension PB).
Back to top
View user's profile
radan

Bascom Member



Joined: 06 Jan 2007
Posts: 35

ukraine.gif
PostPosted: Fri Jan 21, 2011 9:40 am    Post subject: Reply with quote

six1 wrote:
@Petr_
from PC to Device i'm sending one more Byte than needed! ($55)
got this Problem also in first Version and that additional Byte helped me!
regards, Michael


Show area code, please.
Back to top
View user's profile Visit poster's website
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Fri Jan 21, 2011 10:43 am    Post subject: Reply with quote

Hi Radan,

Part of my Delphi Code:
Code:

....
      if Assigned(CurrentDevice) then begin
         ToWrite := 5;//CurrentDevice.Caps.OutputReportByteLength;
         Buf[0] := 0;
         Buf[1] := 1;
         Buf[2] := data1;
         Buf[3] := data2;
         Buf[4] := $55;
....
 


so, Buf[4] := $55; is the additional Byte i will send. I got Problems, if buf[3] was zero! but because of buf[4]=$55 the problem was solved.

At the Micro Side i never use the $55 Byte! it's not in the langth and range of Caps_inputreportbytelength!

this is a workaround, i know, but it's running perfect.

regards, Michael

_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
radan

Bascom Member



Joined: 06 Jan 2007
Posts: 35

ukraine.gif
PostPosted: Fri Jan 21, 2011 11:12 am    Post subject: usb Reply with quote

Thanks, I'll experiment Smile
Back to top
View user's profile Visit poster's website
Petr_

Bascom Member



Joined: 24 Mar 2010
Posts: 66

blank.gif
PostPosted: Fri Jan 21, 2011 11:46 am    Post subject: Reply with quote

six1 wrote:
so, Buf[4] := $55; is the additional Byte i will send. I got Problems, if buf[3] was zero! but because of buf[4]=$55 the problem was solved.

At the Micro Side i never use the $55 Byte! it's not in the langth and range of Caps_inputreportbytelength!

this is a workaround, i know, but it's running perfect.

regards, Michael
Still have bugs! Sad
Code:
     1  OK    Send: 01 14 7B 55
     2  OK    Send: 01 FD 10 55
     3  OK    Send: 01 5B 2B 55
     4  OK    Send: 01 36 60 55
     5  OK    Send: 01 74 CA 55
     6  OK    Send: 01 52 F5 55
     7  OK    Send: 01 23 5E 55
     8  OK    Send: 01 16 7D 55
     9  OK    Send: 01 94 D4 55
    10  OK    Send: 01 75 9C 55
    11  OK    Send: 01 1A 95 55
    12  OK    Send: 01 39 D6 55
    13  OK    Send: 01 68 3A 55
    14  OK    Send: 01 C7 86 55
    15  OK    Send: 01 18 2E 55
    16  OK    Send: 01 73 0E 55
    17  OK    Send: 01 18 F7 55
    18  OK    Send: 01 60 2C 55
    19  OK    Send: 01 31 08 55
    20  OK    Send: 01 29 45 55
    21  OK    Send: 01 DB 25 55
    22  OK    Send: 01 07 CA 55
    23  OK    Send: 01 67 B7 55
    24  OK    Send: 01 EA D9 55
    25  OK    Send: 01 E2 87 55
    26  OK    Send: 01 00 53 55
    27  OK    Send: 01 DF A8 55
    28  OK    Send: 01 AB 10 55
    29  OK    Send: 01 F4 F6 55
    30  OK    Send: 01 5F 52 55
    31  OK    Send: 01 2A 8D 55
    32  OK    Send: 01 2B 6D 55
    33  OK    Send: 01 6D 6A 55
    34  OK    Send: 01 68 4D 55
    35  OK    Send: 01 AD 1B 55
    36  OK    Send: 01 70 4A 55
    37  ERROR    Bug write device (send 0 bytes).

After that, the device stops responding. Sad
Back to top
View user's profile
compurap

Bascom Member



Joined: 23 Oct 2007
Posts: 43

blank.gif
PostPosted: Tue Feb 15, 2011 8:48 pm    Post subject: Reply with quote

any new experiment?
Back to top
View user's profile
Petr_

Bascom Member



Joined: 24 Mar 2010
Posts: 66

blank.gif
PostPosted: Tue Feb 15, 2011 11:30 pm    Post subject: Reply with quote

compurap wrote:
any new experiment?
We are waiting for Mr. ollopa.
Maybe he'll have any ideas.
Back to top
View user's profile
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Wed Feb 16, 2011 8:42 am    Post subject: Reply with quote

just an idea Petr_:
try it without any Hub's between... connect to a root Port on PC Side...

_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
radan

Bascom Member



Joined: 06 Jan 2007
Posts: 35

ukraine.gif
PostPosted: Sat Feb 19, 2011 7:55 pm    Post subject: Reply with quote

HID KEYBOARD - http://bascom.at.ua/publ/atomnaja_klaviatura_vinduksoida_hid_usb/1-1-0-54
MIDI KEYBOARD - http://bascom.at.ua/publ/usb_midi_didzhejskij_pult_dlja_virtual_dj/1-1-0-52
Back to top
View user's profile Visit poster's website
compurap

Bascom Member



Joined: 23 Oct 2007
Posts: 43

blank.gif
PostPosted: Tue Feb 22, 2011 2:08 pm    Post subject: Reply with quote

Thanks, Radan...I will experiment with your HID Keyboard

May be yo can make a Serial to HID keyboard.... Wink
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 20, 21, 22  Next
Page 12 of 22

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum