IRC #olimex 2015-07-14

[09:18:19] <superguest> hey >_<
[09:19:48] <superguest> https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/
[09:19:59] <superguest> Getting started with Windows 7 Start here
[09:20:14] <superguest> these links point to dead links >.<
[09:20:22] <superguest> http://www.killertechtips.com/2009/05/06/disable-driver-signing-in-windows-7-using-group-policy-editor/
[09:21:21] <lukas2511> http://wiki.leaflabs.com/Maple_IDE_Windows_8_Installation
[09:23:23] <superguest> hey lukas <(^_^<)
[09:23:48] <superguest> i am trying this guide
[09:23:49] <superguest> https://sha7rour.wordpress.com/2011/03/31/disable-driver-signing-in-windows-7-using-group-policy-editor/
[09:23:51] <superguest> but how save is this?
[09:24:06] <superguest> do i put it back to original settings once i have finished installing driver in unsigned mode?
[09:24:32] <lukas2511> i don't know
[09:25:28] <superguest> O:
[09:25:38] <superguest> ill try it
[09:25:48] <superguest> u think my guide works, or try the leaflabs one
[09:26:12] <lukas2511> if you have win7 use that, if win8+ use the leaflabs wiki guide
[09:26:17] <lukas2511> i guess
[09:27:37] <superguest> i have 8.1
[09:27:38] <superguest> but
[09:27:43] <superguest> this change pc settins
[09:27:48] <superguest> this tab i disabled it or something
[09:27:58] <superguest> do u know hotkey to bring this side menu up ;'( ?
[09:28:09] <superguest> i hated that side menu it pop up randomly
[09:28:14] <superguest> now i need it -.-
[09:28:19] <lukas2511> http://www.howtogeek.com/167723/how-to-disable-driver-signature-verification-on-64-bit-windows-8.1-so-that-you-can-install-unsigned-drivers/ here
[09:29:10] <superguest> also with sidepannel ;'(?
[09:30:32] <superguest> i am so hopeless
[09:30:50] <superguest> http://cdn3.howtogeek.com/wp-content/uploads/2013/07/656x307ximage44.png.pagespeed.ic.eyDjrkHjYF.png
[09:30:54] <superguest> this pannel how do i open it
[09:30:57] <superguest> i have seen it sometimes
[09:31:03] <superguest> but i think i disabled it @_____@
[09:32:58] <lukas2511> move your mouse to bottom right corner?
[09:33:19] <superguest> no
[09:33:21] <superguest> i disabled that
[09:33:32] <superguest> cause that would make it come up when i was not in the mood for it
[09:33:49] <lukas2511> if you have something like this classic shell stuff running i think you can press shift+win to get to the windows 8 experience ui™, and it should work there
[09:34:14] <superguest> ill try to figure it out
[09:34:18] <superguest> shift win is not doin anything
[09:34:41] <lukas2511> kay, you'll have to figure that one out yourself then
[09:35:02] <superguest> windows +q works
[09:37:13] <superguest> ok
[09:37:24] <superguest> this will take a while probally sicne my pc takes 10 min to boot
[09:37:58] <superguest> thank u lukas (>^_^)>
[09:38:42] <superguest> wonder what would have happen if i did it win 7 way
[09:38:54] <superguest> probally better since no restart
[09:52:23] <superguest> lukas how do u know all this stuff ;x?
[09:52:33] <lukas2511> google
[09:53:15] <superguest> i am confused now
[09:53:20] <superguest> there are 2 ways i can go
[09:53:31] <superguest> http://leaflabs.com/docs/maple-ide-install.html#windows
[09:53:35] <superguest> this says install dfu first
[09:53:46] <superguest> another guide said use libusb 32 and install some .inf
[09:53:55] <superguest> how do i know which one to do
[09:54:24] <lukas2511> "Windows XP (Legacy Only)"
[09:54:46] <superguest> http://forums.leaflabs.com/topic.php?id=73
[09:54:47] <superguest> i mean
[09:54:55] <superguest> this forum says use libusb
[09:55:51] <lukas2511> why don't you follow the official wiki page i linked earlier?
[09:55:57] <superguest> ill go with the legacy only method
[09:56:12] <lukas2511> legacy only means it's legacy only
[09:56:16] <lukas2511> it doesn't work on newer systems
[09:56:44] <lukas2511> http://wiki.leaflabs.com/Maple_IDE_Windows_8_Installation follow this guide
[10:00:20] <superguest> hmm
[10:00:25] <superguest> i selected the other way
[10:00:31] <superguest> -.-
[10:00:46] <superguest> now its trying to install the legacy driver
[10:00:53] <superguest> which is loading forever
[10:00:55] <superguest> o god
[10:01:24] <lukas2511> you know, legacy only means it is not supported
[10:01:30] <lukas2511> that is the meaning of legacy only
[10:01:46] <superguest> i didnt know
[10:02:05] <superguest> hmm
[10:02:10] <superguest> it does say somethig funny now
[10:02:22] <superguest> it is recognized as lib usb win
[10:02:56] <superguest> but i cant uninstall it
[10:02:59] <superguest> to do it the correct way
[10:03:08] <superguest> or wait i can now o.O?
[10:04:36] <superguest> hmm
[10:05:02] <superguest> i uninstalled it but now it gets recognized as lib usb when in bootloader mode
[10:07:53] <superguest> -.-
[10:08:04] <superguest> i uninstalled it correctly now removed the driver
[10:08:13] <superguest> but now when i try to install the .inf
[10:08:15] <superguest> it doesnt accept
[10:08:31] <superguest> maybe need to go bavck to disable signed thingy
[10:08:35] <superguest> maybe it works only 1 time
[10:13:01] <superguest> >___<
[10:20:02] <superguest> ok
[10:20:05] <superguest> i have it i think
[10:20:15] <superguest> alot of work but worth it i hope ;D
[10:25:12] <superguest> not working -.-
[10:31:06] <superguest> why
[10:31:08] <superguest> why wont it work
[10:33:23] <superguest> tell me please
[10:33:33] <lukas2511> i don't know :D
[10:34:00] <superguest> i have it installed
[10:34:46] <superguest> trying the example blinkwithoutdelay
[10:34:53] <superguest> still the error no dfu
[10:35:09] <lukas2511> did you follow the guide in the wiki?
[10:38:29] <superguest> which one
[10:38:39] <superguest> http://wiki.leaflabs.com/Maple_IDE_Windows_8_Installation
[10:38:40] <superguest> this
[10:38:41] <superguest> i did this
[10:39:36] <lukas2511> ok, well maybe look into device manager if you see it popping up now, and if it appears as working or if it has errors
[10:40:23] <superguest> i have one in com6
[10:40:39] <superguest> and depending on the bootmode of the stm32 olimexino i can see it also in the libusb 32
[10:40:39] <lukas2511> and if you reset the board?
[10:40:48] <lukas2511> ah, mh
[10:41:01] <superguest> if i do reset+ but
[10:41:09] <superguest> to get in the other mode
[10:41:11] <lukas2511> that sounds about right
[10:41:18] <superguest> then it doesnt show in lib usb 32
[10:41:37] <superguest> under ports
[10:41:42] <superguest> it has com 5
[10:41:47] <superguest> but also shows yellow !
[10:41:59] <superguest> as it might not be set up correctly
[10:42:03] <lukas2511> yea
[10:42:06] <superguest> but i followed the guide
[10:42:10] <superguest> there isnt any more to set up
[10:42:24] <lukas2511> well, i'm out of ideas here, sorry
[10:42:35] <superguest> why
[10:42:37] <superguest> @_____@
[10:43:50] <superguest> i hate this
[10:45:29] <superguest> cant select the serial port also
[10:48:01] <superguest> o my fucking god
[10:48:19] <superguest> i got the serial port showing ;D
[10:48:37] <superguest> uinstalled the lib usb 32
[10:48:49] <superguest> and other rage like chance com ports
[10:48:59] <superguest> and now it apears non yellow in com 7 ;D
[10:49:08] <superguest> as no fault what so ever
[10:49:14] <superguest> to afraid to load up tho ;x
[10:50:31] <superguest> no dfu still refusing
[10:50:44] <superguest> serial port gone
[10:52:03] <superguest> because press reset
[10:52:03] <superguest> -.-
[10:52:09] <superguest> probally got one of the modes working
[10:52:13] <superguest> the worng one -.-
[10:57:49] <superguest> lukas o.O?
[10:57:54] <lukas2511> mh
[10:57:57] <superguest> i uploaded succesfully
[10:58:02] <lukas2511> that is great
[10:58:10] <superguest> but the code is not blinkingwithout delay -.-
[10:58:26] <superguest> ill try another example
[10:58:29] <superguest> or do i reset?
[10:58:34] <superguest> or something for it to start blinkwithoutdelay?
[10:58:49] <lukas2511> no it should start automatically, and blink the led
[11:00:32] <superguest> ok other blink buttton is working
[11:00:38] <superguest> i got it working
[11:00:43] <superguest> demo running
[11:01:05] <superguest> i intsalled both modes to serial or dunno
[11:01:09] <superguest> did alot of things
[11:01:12] <superguest> have i registerd to 3 coms now
[11:01:29] <superguest> dont need to press reset button it automatically finds dfu finally
[11:01:31] <superguest> sees com also
[11:01:35] <superguest> 1 com
[11:01:58] <superguest> i think perhaps this guide needs to be updated?
[11:01:59] <lukas2511> the thing is, with this bootloader
[11:02:11] <lukas2511> it comes up as dfu device for a few seconds, then continues booting to your program
[11:02:32] <lukas2511> and the maple ide integrates a virtual com port, that is used to reset the board from within the IDE when you press upload
[11:02:42] <superguest> had to install it 5 times or so 2 times in 1 mode, 2 times in another mode
[11:02:43] <lukas2511> so it cycles through a few devices
[11:03:00] <superguest> yes
[11:03:02] <superguest> why does it do that -.-
[11:03:12] <lukas2511> because of what i just said.
[11:03:24] <superguest> well the arduino doesnt have this issue i assume
[11:03:31] <superguest> it probally uses a bootloader also
[11:03:39] <lukas2511> this is just how the bootloader works. works very similar on arduino due or whatever the usb models name is
[11:03:56] <superguest> i have an arduino
[11:04:01] <lukas2511> but arduino uses different drivers, and probably signed ones
[11:04:03] <superguest> no hassle with pressing buttons
[11:04:07] <superguest> ye signed for sure
[11:04:27] <superguest> but the guide is missleading
[11:04:45] <superguest> probally works in 1 go when ur in the correct mode
[11:04:52] <superguest> but it never states which mode that is in that guide
[11:04:56] <lukas2511> arduino leonardo is the one i meant, that one works very similar
[11:05:12] <superguest> i have that one ye ;3
[11:05:17] <superguest> with the small chip
[11:05:21] <superguest> instead of dip
[11:05:26] <lukas2511> also with the same problems, like if program hangs you need to reset board to upload again and stuff
[11:05:45] <superguest> sounds like i a bad choosing my development boards -.-
[11:05:59] <superguest> now finaly i can use it
[11:06:13] <superguest> does this stm32
[11:06:13] <lukas2511> i mean, it's not bad, you just have to get used to it
[11:06:23] <superguest> accept arduino syntax?
[11:06:32] <superguest> as far as i see it does
[11:06:37] <superguest> both setup()
[11:06:41] <lukas2511> well, the maple ide is arduino-like
[11:06:41] <superguest> but if i want to use serial library?
[11:07:04] <lukas2511> you probably can't install any own libraries, and some (like serial) work a bit different
[11:07:19] <lukas2511> but otherwise it should be pretty similar
[11:07:26] <superguest> does this maple have other libraries or something?
[11:07:39] <superguest> hmm
[11:07:44] <superguest> gotta set this up also i guess
[11:07:54] <lukas2511> the libraries are already in the ide
[11:08:17] <lukas2511> one major different is that you do not need to Serial.begin
[11:08:27] <superguest> ??
[11:08:29] <lukas2511> and you should use SerialUSB.println instead of Serial.println
[11:08:32] <superguest> the libraries are not in the ide
[11:08:41] <superguest> how do u know all this
[11:08:45] <superguest> where is this documented
[11:08:53] <superguest> i know by a fact i wont remember this when i actually will need this
[11:09:05] <lukas2511> i used it before, and is has a great documentation http://leaflabs.com/docs/lang/api/serialusb.html
[11:09:32] <superguest> thank u lukas <(^_^<)
[11:10:03] <superguest> i didnt bring my potentio meter
[11:10:07] <superguest> hmm
[11:10:14] <superguest> then i would have tested read analog
[11:10:31] <superguest> everything works
[11:10:35] <superguest> and ur link also shows a library tab
[11:10:41] <superguest> so i can figure stuff out on my own now
[11:10:51] <superguest> i am a happy beaver now ;D
[11:11:14] <superguest> another free hugg for u lukas (>^_^)>
[11:11:50] <superguest> tho i heard serial monitor might also have issues D:
[11:11:59] <superguest> but it does show com so it probally works
[11:12:25] <superguest> http://static.leaflabs.com/pub/leaflabs/maple-docs/latest/libraries.html
[11:12:33] <superguest> see there are only 3 libraries standard in maple ide
[11:12:43] <superguest> where as in arduino i can scroll all the way to the bottom of my screen
[11:13:57] <superguest> it finally works tho what a great day ;D
[11:14:37] <superguest> noticed the board doesnt have any rx and tx
[11:14:48] <lukas2511> thing is
[11:15:04] <lukas2511> it uses usb as serial port, so there is no "default" rx and tx pins
[11:15:17] <lukas2511> but: it does have serial ports that you can use for other devices
[11:15:55] <superguest> which serial ports?
[11:16:00] <superguest> u mean i can define some digital pins
[11:16:01] <superguest> like this
[11:16:01] <superguest> https://www.arduino.cc/en/Reference/SoftwareSerial
[11:16:13] <lukas2511> you don't need to use softwareserial
[11:16:17] <lukas2511> it has real serial ports
[11:16:51] <superguest> which one o.O?
[11:16:59] <superguest> u mean the uext
[11:17:00] <superguest> or something
[11:17:11] <lukas2511> http://static.leaflabs.com/pub/leaflabs/maple-docs/latest/lang/api/serial.html
[11:18:18] <superguest> no
[11:18:30] <lukas2511> what?
[11:18:44] <superguest> maybe
[11:18:55] <superguest> i cant see rx tx in silkscreen
[11:19:02] <superguest> but i have an ext connector which has 8 x 2 pins
[11:19:05] <lukas2511> and this should be the pinmapping for Serial1-3: http://static.leaflabs.com/pub/leaflabs/maple-docs/latest/hardware/maple.html#maple-usart-map
[11:19:18] <lukas2511> it doesn't need to have it written there to have the feature
[11:19:32] <lukas2511> the uext port does probably also have on of the three serial ports on it
[11:19:40] <superguest> ye the board u show
[11:19:42] <superguest> is not the one i have
[11:19:52] <superguest> https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/
[11:20:40] <lukas2511> should be the same
[11:21:01] <lukas2511> the olimexino stm32 is basically a improved version of the maple board
[11:21:29] <superguest> then i should have 2 of the 3 uarts
[11:21:35] <superguest> since my d port only goes from 0 to 14
[11:22:02] <lukas2511> the other pins are on this bigger socket
[11:22:19] <superguest> the ext?
[11:22:23] <lukas2511> no, on the other side
[11:22:35] <lukas2511> the thing with 16 holes or so
[11:23:07] <lukas2511> oh yea
[11:23:09] <lukas2511> the ext
[11:23:15] <superguest> ;p
[11:23:20] <lukas2511> sorry, didn't know it was titled that, thought you meant the uext
[11:23:24] <superguest> thank u so much for ur help u know
[11:23:37] <lukas2511> pinouts should also be in the user manual
[11:23:43] <superguest> O:
[11:24:14] <lukas2511> yea it states D7/D8 (Serial1 iirc) on the uext, those should also be available as normal arduino-like pins
[11:24:37] <lukas2511> D0 and D1 are Serial2, so that would normally be "Serial" on arduino
[11:25:37] <superguest> yep
[11:25:49] <superguest> the usermanual and the maple link on ext connector dont match tho
[11:26:01] <superguest> if u compare them side by side
[11:26:19] <superguest> the 16 pin ext on usermanual looks more like spi with miso mosi
[11:26:35] <superguest> mmc or somethin for sd cards
[11:26:36] <superguest> also psi
[11:26:41] <superguest> spi*
[11:26:46] <superguest> but thats all good
[11:27:05] <superguest> im ok i wont bother u anymore lukas ;p
[11:27:11] <lukas2511> the thing is
[11:27:26] <lukas2511> pins on the stm32 can have multiple functions
[11:27:37] <lukas2511> and you as the user decide which ones you want
[11:27:52] <lukas2511> if you want to use Serial3 you can't use the second I2C port
[11:28:28] <superguest> true true
[11:28:31] <superguest> alternate function pins
[11:31:24] <superguest> now i can use the stm32-discovery board to program my uart function
[11:31:45] <superguest> and receive it with my olimexino-stm32 and send it over usb to serial monitor
[11:31:59] <superguest> without expensive usb-to-serial wires ;D
[11:32:11] <superguest> which cost as much as a arduino or olimexino ;DD
[11:32:44] <lukas2511> uh
[11:32:50] <lukas2511> no?
[11:32:52] <lukas2511> :D
[11:32:54] <superguest> why not o.O?
[11:33:06] <lukas2511> i mean the "cost as much" part
[11:33:15] <superguest> serial wire costs more ;D?
[11:33:31] <lukas2511> i think the cheapest one i bought was 2€ including delivery
[11:33:34] <superguest> WUD
[11:33:37] <superguest> no no
[11:33:53] <superguest> here in holland if u can manage to find it in a hardware store it is minimal 30 euro
[11:33:59] <lukas2511> and a simple search for "usb usart" brings up adapters for 4,70€ and 4,50€
[11:34:00] <superguest> online its 20
[11:34:05] <superguest> o.O
[11:34:11] <superguest> wud
[11:35:01] <superguest> maybe i have done it wrong then but now u say this price
[11:35:04] <superguest> i am very interrested
[11:35:09] <superguest> what delivery site did u use ;x?
[11:35:49] <lukas2511> i normally use ebay.de for stuff like that, but you can also get stuff for like 4-8€ with amazon prime
[11:36:25] <superguest> whad
[11:36:36] <superguest> ebay free shipping takes 4 weeks to deliver
[11:36:48] <lukas2511> yea if you order from a chinese supplier
[11:36:56] <superguest> o.O?
[11:37:03] <superguest> how did u get so smart ;D
[11:37:04] <lukas2511> but if it comes from europe it's normally under a week
[11:37:19] <superguest> ur amazing <(^_^<)
[11:38:38] <lukas2511> but sure, now you can use your olimexino for that
[11:39:04] <lukas2511> i did that a few times too, because it has some benefits over a small ftdi board/cable or similar
[11:39:43] <superguest> if it costs 4 euro ill order now
[11:39:49] <superguest> or when i am home ;x
[11:40:29] <lukas2511> i used it while working with esp8266 boards, because the ftdi breakout boards i had didn't supply enough power, and i didn't want to have too much stuff with me only to experiment with those boards
[11:40:50] <lukas2511> set up my olimexino as simple usb serial adapter and used that, worked perfectly
[11:40:58] <superguest> cool stuff ;3
[11:41:03] <superguest> and the code is probally very easy also
[11:41:09] <superguest> just read to write
[11:41:12] <superguest> and other way
[11:41:30] <lukas2511> yea i was experimenting with freertos at that time, so it was a bit more fancy than it would have need to be
[11:41:53] <lukas2511> but it should be as simple as if(SerialUSB.available()) Serial2.write(SerialUSB.read()); and the other way round
[11:43:10] <superguest> i am also workin with a free rtos ;D
[11:43:13] <superguest> chibiOS
[11:43:28] <superguest> cant filter ebay for non chinees
[11:43:41] <lukas2511> http://www.ebay.de/itm/little-ftdi-board-thingy/391154200125
[11:44:06] <lukas2511> i'm having troubles navigating ebay.nl, but this one on ebay.de comes from germany for 3.38€+0.99€
[11:44:41] <superguest> o.O
[11:45:41] <superguest> i like the cable verions more
[11:45:46] <superguest> but ill figure it out
[11:45:47] <superguest> thank u man ;x
[11:45:54] <superguest> i assume u are german ;D?
[11:46:04] <superguest> i been to hamburg haven city once
[11:46:06] <superguest> so amazing ;x
[11:48:15] <lukas2511> i'm from germany, yea, near cologne. hamburg is a nice city, but i'm only there in december, and it's a bit cold and wet around there that time of the year.
[11:49:03] <lukas2511> those usb serial cable thingies seem to be a bit more expensive, guess they aren't as easy to mass-produce
[11:49:14] <superguest> they are just as cheap
[11:49:24] <superguest> http://www.ebay.nl/itm/Serielles-Adapter-USB-auf-TTL-RS232-UART-Konverter-Kabel-PC-PL2303HX-/151539506023?pt=LH_DefaultDomain_77&hash=item2348755b67
[11:49:25] <superguest> ONLY
[11:49:32] <superguest> if i use this usb uart??
[11:49:41] <superguest> does it get recognized as serial com port?
[11:49:43] <superguest> so i can tty?
[11:49:57] <superguest> u used one right ;x?
[11:49:58] <lukas2511> yes it should appear as com port
[11:50:05] <superguest> u sure?
[11:50:13] <lukas2511> yea, you might want to check that there are windows drivers for the pl2303hx
[11:50:13] <superguest> i think the price difference is probally in that aspect
[11:50:42] <superguest> oh
[11:50:43] <superguest> so smart ;x
[11:50:45] <lukas2511> i don't have to deal with such stuff because i'm (currently) a mac person and do my usb dev stuff in a linux vm
[11:50:58] <superguest> i have linux mint vm
[11:51:04] <superguest> but i have had issues on it
[11:51:11] <superguest> probally cause i am not so smart as u ;(
[11:51:36] <lukas2511> yea well, experience comes with the time, i guess
[11:52:05] <superguest> ;p
[11:52:30] <lukas2511> i basically learned nearly everything i know by just doing
[11:55:00] <superguest> ur german country and cities are really big man ;x
[11:55:09] <superguest> i would like to live there maybe
[11:55:12] <superguest> better than holland
[11:55:28] <superguest> only afraid of skinheads or rasicsm ;x
[11:57:48] <superguest> u develop usb stuff o.O
[11:57:55] <superguest> still afraid of usb
[11:58:04] <superguest> so much settings i assume
[11:58:05] <lukas2511> i think you have to be more afraid of usb than skinheads
[11:58:38] <superguest> i did a hmi thing once
[11:58:39] <superguest> on usb
[11:58:42] <lukas2511> yea, from time to time it is necessary to build a custom usb device
[11:59:04] <superguest> changed a old tv remote infra red signal to keyboard
[11:59:13] <superguest> to use it as a pointer
[11:59:15] <lukas2511> or, most of the time not really necessary, but it makes things so much easier after getting it up running
[11:59:28] <superguest> need to get in that sometimes
[11:59:38] <superguest> but for now i skip usb to much work ;p
[12:00:36] <lukas2511> like you can just throw a bunch of bytes in there, and work on those. with serial you have to look for a way to encode and decode your bytes, and try to look for ways to realign data segments on errors, and whatever
[12:01:19] <superguest> are u talking about packets and frames ;p
[12:01:51] <lukas2511> yea more or less
[12:03:07] <lukas2511> on serial you mostly have to do that on your own, for your data. on usb you define it, hardware does most of the stuff for you, and libraries you can use do the rest of the work, and you just get your bytes as you want them
[12:03:39] <superguest> hmm
[12:03:42] <superguest> that does sound nice
[12:03:52] <superguest> cause now i have made like a giant file called messages.h
[12:03:58] <superguest> which i define the different packet types
[12:04:39] <superguest> kind of copying some open source project i found
[12:04:46] <superguest> really new to stuff like this
[12:04:53] <superguest> putting data in data structs
[12:05:31] <lukas2511> yea, and it all wouldn't be that bad if it always works as intended
[12:05:41] <lukas2511> like, did you check what happens if you drop a single byte?
[12:05:48] <superguest> u use the stm32f4 perhaps or any other, general knowledge about arm cortex
[12:06:00] <superguest> drop a single byte?
[12:06:13] <superguest> it works with a preamble
[12:06:28] <superguest> 0x55, or 0xA1 ox0A2
[12:06:36] <superguest> if it found that it takes all data in
[12:06:44] <superguest> then in the end it has a CHECKSUM or crc
[12:06:50] <lukas2511> yea, i mean, you are sending your bytes like: start package, content, checksum, whatever
[12:06:54] <superguest> to see if any bytes are missing, if so it discards the packet
[12:07:02] <lukas2511> right?
[12:07:02] <superguest> yep
[12:07:10] <superguest> the protocol defines to do that
[12:07:14] <superguest> i am trying to implement that
[12:07:26] <lukas2511> so, how do you define how long the content is? probably by setting the length in the start package header
[12:07:42] <superguest> exactly
[12:07:50] <superguest> there is this field called payload length, data length
[12:07:56] <superguest> in the header
[12:07:59] <superguest> which does as u say
[12:08:21] <superguest> u can only send out standard packets
[12:08:22] <lukas2511> so, now what happens if either that byte that defines the length gets corrupted, or one of the bytes in the content field is dropped because the checksum failed already on hardware level, or whatever other reason
[12:08:33] <superguest> then u get one failed message
[12:08:37] <superguest> which is not that bad i guess
[12:08:43] <superguest> i assume there will be no errors
[12:08:51] <superguest> everything works pretty good these days
[12:08:58] <lukas2511> ok, if it works that just this one message is broken that is okay then
[12:09:08] <superguest> yea it sends messages 20x per second
[12:09:15] <lukas2511> i used some libraries that really didn't handle errors well
[12:09:15] <superguest> if it misses that 1/20th message
[12:09:28] <lukas2511> like one package gets broken, and the code basically broke at that point
[12:09:41] <superguest> thats not good ;p
[12:10:01] <superguest> u know how uart works on stm32f4?
[12:10:18] <superguest> the free rtos i use has a few apis
[12:10:27] <superguest> sets up dma for the uart stream
[12:10:40] <superguest> if i say read 12 bytes or send 12 bytes
[12:10:48] <lukas2511> you define the pin functions, set it up the way you want to use it, and use it
[12:10:49] <superguest> it will atomatically send it at the right moment and stuff
[12:11:07] <superguest> its pretty easy i think now that i read alot about it
[12:11:10] <superguest> dma makes it easyer
[12:11:20] <superguest> the uart itself can be installed with baudrate
[12:11:34] <superguest> and will report messages and interrupts if its done sending
[12:11:47] <superguest> so if i want to send a packet it just does that internally by the cpu
[12:12:00] <superguest> i wont need to check interrupts, the api will be configured to check and send
[12:12:12] <superguest> i need to work on this ;x
[12:12:41] <lukas2511> yea the dma stuff on the stm32 chips is really cool
[12:12:48] <superguest> just set the registers correct and everything will work
[12:13:15] <lukas2511> only one minor drawback
[12:13:25] <lukas2511> debugging timing issues with dma is quite a pain
[12:13:37] <superguest> ugh
[12:13:41] <superguest> i hope i wont need to debug
[12:13:53] <lukas2511> on simple serial stuff it shouldn't really come to any problems
[12:14:02] <superguest> yea i hope so
[12:14:22] <superguest> gonna get gps data in over uart, send it away over uart to a modem
[12:14:25] <superguest> also send it over CAN
[12:14:31] <superguest> and save it on SD
[12:14:41] <superguest> o.O
[12:14:47] <superguest> but first just get gps in and send it out over uart
[12:15:50] <superguest> for my graduation assignment ;x
[12:37:52] <superguest> u know lukas o.O?
[12:37:57] <superguest> i tried tty once on linux
[12:38:08] <superguest> to read usb0 or usb*
[12:38:21] <superguest> it kept gettting the message device in use or something
[12:38:37] <superguest> wrong fd
[12:38:41] <lukas2511> yea if you have something like NetworkManager running that sometimes happens
[12:39:09] <lukas2511> i guess it thinks it's a modem
[12:39:26] <superguest> network manager?
[12:39:39] <superguest> i dunno one day i was working on it after 3 hours or so i keept changing my code suddenly it worked
[12:39:48] <superguest> and the next day again it didnt work
[12:39:59] <superguest> so i quit that
[12:40:01] <lukas2511> NetworkManager, piece of sh..software that manages network connections
[12:40:06] <superguest> O;
[12:40:14] <superguest> its standard in linux?
[12:40:19] <lukas2511> on some distros
[12:40:31] <superguest> hmm thanks for the tip
[12:40:40] <superguest> maybe ill give it a go sometime again ;p
[13:16:54] <superguest> so if i read out the uart on my 80mhz stm32..
[13:17:06] <superguest> and the baudrate is like 9600
[13:17:23] <superguest> if i do 2 reads, do i get data inbetween o.O?
[13:17:51] <superguest> or the uart knows it shouldnt do the read right on the moment it gets called, wait untill the right moment, and then read the second part?
[13:27:06] <lukas2511> depends on your setup
[13:27:38] <lukas2511> if you have no buffers at all it is a blocking read, that waits until 1 byte arrives, and returns you that byte
[13:28:27] <lukas2511> if you have read-buffers it always reads incoming bytes (until buffer is full), and the blocking read function will give you the oldest value from the buffer and removes it from the buffer
[13:29:16] <lukas2511> if you have read-buffers and are using a non-blocking read function it normally returns an error value or fills a register with success/fail code that you have to check afterwards
[13:30:38] <lukas2511> in that second scenario if the buffer is empty it will stay there until it has at least 1 byte in the buffer that it can give you, in the third it will just continue but you'll see in the error code or status register that it failed reading a byte
[13:30:53] <superguest> hmm
[13:31:02] <superguest> i think the stm32 dma and stuff has internal buffer
[13:31:10] <lukas2511> arduino does it like scenario two
[13:31:24] <lukas2511> you have this .available() function that tells you that there are bytes in the buffer
[13:31:50] <lukas2511> and .read() will give you the first byte of that buffer, or wait for an incoming byte if none are there
[13:32:03] <superguest> hmm i dont know how i should implement this
[13:32:22] <superguest> should do the test with the olimexino first i guess
[13:33:42] <superguest> maybe in visual studio
[13:34:13] <superguest> the api i have doenst have this availible function
[13:35:03] <superguest> perhaps its declared in the uartdriver struct
[13:35:20] <superguest> but this looks like the best idea i think
[13:35:22] <lukas2511> there probably is something else, or it works like in scenario 3
[13:35:43] <superguest> hmm
[16:20:31] <superguest_> hmmm
[16:26:05] <superguest_> this serial example
[16:26:09] <superguest_> is already there in the library
[16:26:27] <superguest_> SerialPassTrought
[16:27:09] <superguest_> so glad i got this thing working ;D