Bs1usb
Brandon_L
Posts: 37
I just got my new bs1USB yesterday.· Here is the challange.· How can I access the USB com port via my programs on the BS1.· IE I want when I plug it in to send a text string via the USB-comport.· IE[noparse]:p[/noparse]assword=Joe smith 1009939393497
Thanks
Brandon
Thanks
Brandon
Comments
Brandon
If you can put your information into the normal variables then you can send them up the USB port and intercept them as I've shown in my projects in the Project forum.· You don't have a lot of variables to work with, so you might have to do some trickery.· You could do something like this:
Start:
· PAUSE 1000
· B0 = "P"
· B1 = "w"
· B2 = "d"
· W2 =·0001
· W3 = 0099
· W4 = 3939
· W5 = 3497
· DEBUG B0········' actually sends everything
· GOTO Main······ ' repeat
By putting "Pwd" in B0..B2 you have something to use as an indicator, the ID number is sent as four Words because there's not enough RAM left to send them as individual characters.· The PAUSE and GOTO allow the string to continue so that the software can re-verify the presence of the BS1-USB "dongle."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I tested this code and for me it will not work. I renamed MAIM to Start, but all it does is send "P=80" to debug. I altered the debug line to B0,B1,B2 ect. IS there a caleaner way to make this work?
Thanks
Brandon
So, to send a "string" to an app that wants to use the BS1USB as a dongle you have to load the characters into variables.· Note that I said when the BS1 debugs anything, it actually debugs everything.· Let me show you.· The first image attached is the debug window which responds to the program as we expect.· The second is a separate application that is capturing the output from that Stamp.· Have a look at the value of B0 -- it corresponds to the ASCII code for 'p.'· Look at the W1-W5 registers -- there are the values we put into the program, even though they're not called out in our DEBUG statement.
I hope this shows you that to send a string with the BS1 DEBUG to a non-editor application, you have to sneak it in.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Thank You I think I've seen the light as it were. I will go back and re work my application.
Brandon