Tekkx Posted October 7, 2015 Share Posted October 7, 2015 (edited) What happens if you connect other ground pin at arduino? Same? Or try to ground poti's housing. Smells like some interference with sth. like PWM or sth else. Just theory! :) Edited October 7, 2015 by Tekkx Manual for my version of RS485-Hardware, contact: tekkx@dresi.de Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You. Link to comment Share on other sites More sharing options...
pappavis Posted October 8, 2015 Share Posted October 8, 2015 (edited) What happens if you connect other ground pin at arduino? Same? Or try to ground poti's housing. Smells like some interference with sth. like PWM or sth else. Just theory! :) I reversed the GND/5v, then the seial transfer stopped even faster. any tips? UPDATE: Solution here --> http://forums.eagle.ru/showpost.php?p=2511167&postcount=4 Edited October 17, 2015 by pappavis met vriendelijke groet, Михель "умный, спортсмен, комсомолетс" [sIGPIC][/sIGPIC] [TABLE]SPECS: i9-9900K 32gigs RAM, Geforce 2070RTX, Creative XFi Fata1ity, TIR5, Valve Index & HP Reverb, HOTAS Warthog, Logitech G933 Headset, 10Tb storage.[/TABLE] Link to comment Share on other sites More sharing options...
Firedawg Posted October 28, 2015 Share Posted October 28, 2015 (edited) Hello, Ian this is great stuff. I am having a problem that I don't know how to fix. I have followed the user guide 100% even going back over it several times. I watched the video on how to add the UHF and Clock onto my 1602A LCD several times. Everything is hooked up correctly but it will not show up when DCS is started. Where am I going wrong? Hello World works perfectly, but DCS-BIOS is not communicating with DCS using Arduino UNO w/at mega 328p with no shield connected via USB 16x2 LCD (1602A) pins connected the same as Hello World sketch the same as yours in the video except the pins you use com port set DCS Bios scripts and export copied and pasted correctly i see in your video when you run the connect-serial-port.cmd it is scrolling with a string of information. mine does not it gives the com port information such as the baud and handshake etc. and that is all. Is there a firewall or windows security control issue blocking this from functioning? Edited October 28, 2015 by Firedawg Link to comment Share on other sites More sharing options...
pappavis Posted October 28, 2015 Share Posted October 28, 2015 mine does not it gives the com port information such as the baud and handshake etc. and that is all. Is there a firewall or windows security control issue blocking this from functioning? for me, it worked first time perfect. No firewall issues. Windows 10. Dunno if this helps; 1. Have u tried an abolute minimal "Hello World" sketch which only sends data via the serial port at example 9600 baud? -- then use the serial Monitor to check if u get Hello World. 2. In your sketch, verify the serial baudrate which is sent from Arduino sketch. it should be 500000. 3. Do u have a codeline.. void setup() { Serial.begin(500000); } void loop() { while (Serial.available()) { parser.processChar(Serial.read()); } // poll inputs DcsBios::PollingInput::pollInputs(); } met vriendelijke groet, Михель "умный, спортсмен, комсомолетс" [sIGPIC][/sIGPIC] [TABLE]SPECS: i9-9900K 32gigs RAM, Geforce 2070RTX, Creative XFi Fata1ity, TIR5, Valve Index & HP Reverb, HOTAS Warthog, Logitech G933 Headset, 10Tb storage.[/TABLE] Link to comment Share on other sites More sharing options...
FSFIan Posted October 28, 2015 Author Share Posted October 28, 2015 Firedawg: Could be a firewall issue. Here are a few things you can try: Check dcs.log for error messages related to DCS-BIOS. See if you can get the to work. Those use TCP instead of UDP. If it works, you know that DCS-BIOS itself is running. You can then use the following connect-to-serial-port.cmd script instead: REM Specify the number of the COM port your Arduino is connected to: set COMPORT=5 set /A TTYNUM=%COMPORT%-1 mode COM%COMPORT% BAUD=500000 PARITY=N DATA=8 STOP=1 TO=off DTR=on socat\socat -v TCP-CONNECT:localhost:7778 /dev/ttyS%TTYNUM% pause 1 DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Firedawg Posted October 28, 2015 Share Posted October 28, 2015 Thx for the quick replies, I am checking on this now. Link to comment Share on other sites More sharing options...
Firedawg Posted October 28, 2015 Share Posted October 28, 2015 (edited) 00032.989 INFO EDTERRAINGRAPHICS3: Force loading pipeline 'lockon'. Radius 65341.000000. Pos=-318033.812500,21.555704,636240.437500! 00034.116 INFO EDTERRAINGRAPHICS3: force loading finished! 00034.116 INFO EDTERRAINGRAPHICS3: Force loading pipeline 'map'. Radius 13068.200195. Pos=-318033.812500,21.555704,636240.437500! 00034.163 INFO EDTERRAINGRAPHICS3: force loading finished! 00036.374 ERROR DXRENDERER: DXRenderer::SetRenderTarget(posteffecttarget5, 0), Unknown 00036.378 INFO DXRENDERER: Creating Resource "Unicode" of type 5 00040.204 ERROR Lua::Config: Call error LuaExportAfterNextFrame:<LUA_TTABLE> stack traceback: [C]: ? [C]: in function 'try' [string "C:\Users\WarriorofGod\Saved Games\DCS\Scripts\DCS-BIOS\lib\ProtocolIO.lua"]:98: in function 'send' [string "C:\Users\WarriorofGod\Saved Games\DCS\Scripts\DCS-BIOS\lib\ProtocolIO.lua"]:170: in function 'flush' [string "C:\Users\WarriorofGod\Saved Games\DCS\Scripts\DCS-BIOS\BIOS.lua"]:76: in function <[string "C:\Users\WarriorofGod\Saved Games\DCS\Scripts\DCS-BIOS\BIOS.lua"]:73>. 00040.897 WARNING LOG: 17 duplicate message(s) skipped. 00040.897 ERROR Lua::Config: Call error LuaExportAfterNextFrame:<LUA_TTABLE> stack traceback: [C]: ? [C]: in function 'try' [string "C:\Users\WarriorofGod\Saved Games\DCS\Scripts\DCS-BIOS\lib\ProtocolIO.lua"]:98: in function 'send' [string "C:\Users\WarriorofGod\Saved Games\DCS\Scripts\DCS-BIOS\lib\ProtocolIO.lua"]:162: in function 'flush' [string "C:\Users\WarriorofGod\Saved Games\DCS\Scripts\DCS-BIOS\BIOS.lua"]:76: in function <[string "C:\Users\WarriorofGod\Saved Games\DCS\Scripts\DCS-BIOS\BIOS.lua"]:73>.This is at the end of my Log File, I got Google Chrome running the interactive control reference and it works fine. LCD still not showing anything. I am still trying you guys advice so bare with me. Edited October 29, 2015 by Firedawg Link to comment Share on other sites More sharing options...
Firedawg Posted October 28, 2015 Share Posted October 28, 2015 (edited) my sketch: #include <DcsBios.h> #include <Servo.h> #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); /**** Make your changes after this line ****/ void onUhfFrequencyChange(char* newValue) { lcd.setCursor(0, 0); lcd.print(newValue); } DcsBios::StringBuffer<7> uhfFrequencyBuffer(0x1180, onUhfFrequencyChange); void onClockHhChange(char* newValue) { lcd.setCursor(0, 1); lcd.print(newValue); } DcsBios::StringBuffer<2> clockHhBuffer(0x10fe, onClockHhChange); void onClockMmChange(char* newValue) { lcd.setCursor(3, 1); lcd.print(newValue); } DcsBios::StringBuffer<2> clockMmBuffer(0x1100, onClockMmChange); void onClockSsChange(char* newValue) { lcd.setCursor(6, 1); lcd.print(newValue); } DcsBios::StringBuffer<2> clockSsBuffer(0x1102, onClockSsChange); void onClockEtcChange(char* newValue) { lcd.setCursor(9, 1); lcd.print(newValue); } DcsBios::StringBuffer<3> clockEtcBuffer(0x1104, onClockEtcChange); /**** In most cases, you do not have to change anything below this line ****/ /* Instantiate a ProtocolParser object to parse the DCS-BIOS export stream */ DcsBios:protocolParser parser; void setup() { Serial.begin(500000); lcd.begin(16, 2); lcd.clear(); } /* Your main loop needs to pass data from the DCS-BIOS export stream to the parser object you instantiated above. It also needs to call DcsBios:pollingInput::pollInputs() to detect changes in the state of connected controls and pass them on to DCS. */ void loop() { // feed incoming data to the parser while (Serial.available()) { parser.processChar(Serial.read()); } // poll inputs DcsBios:pollingInput::pollInputs(); } /* You need to define void sendDcsBiosMessage(const char* msg, const char* arg) so that the string msg, followed by a space, the string arg and a newline gets sent to the DCS-BIOS import stream. In this example we send it to the serial port, so you need to run socat to read the data from the serial port and send it over UDP to DCS-BIOS. If you are using an Ethernet Shield, you would probably want to send a UDP packet from this subroutine. */ void sendDcsBiosMessage(const char* msg, const char* arg) { Serial.write(msg); Serial.write(' '); Serial.write(arg); Serial.write('\n'); } /* This subroutine gets called every time a message is received from the export stream (you need to define it even if it does nothing). Use this to handle outputs which are not covered by the DcsBios Arduino library (e.g. displays). */ void onDcsBiosWrite(unsigned int address, unsigned int value) { } Edited October 29, 2015 by Firedawg Link to comment Share on other sites More sharing options...
Warhog Posted October 28, 2015 Share Posted October 28, 2015 Firedawg, I was Just wondering about a couple of things that might be causing this. I have had it happen as well and what I am referring to is "no data streaming" in the window after socat is started. There should be a flood of info streaming down that window. Some things to consider: 1. On occasion I had forgot to close a socat window that was hiding under DCS and started a new one by accident. 2. I assume you confirmed the com port the Arduino board is using in "Devices and Printers" and changed the socat script accordingly? 3. Did you start socat first and then DCS. Try starting DCS and then tab out and start socat. See if that gets it running. 4. You don't have the game paused or using active pause? Sorry its not a game, its a sim.:doh: 5. I understood that the baud rate was to be set at 250000 and not 500000 as there were issues running that fast. The example DCS-BIOS template should be at 250000... Ian??? 6. Is the board actually connected to the PC? Verify. I have forgot to plug it in and then socat does exactly what you are seeing.:doh: It happens:smilewink: Just recounting some of the things I have done in hopes thats it helps you figure out what the issue is. John Regards John W aka WarHog. My Cockpit Build Pictures... My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram, AIO Water Cooler, M.2 512GB NVMe, 500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals Link to comment Share on other sites More sharing options...
Firedawg Posted October 28, 2015 Share Posted October 28, 2015 Thanks John, I am going to shut my PC down for a few hours and I will come back and go through your list and make sure ive checked all of it correctly. I'm pulling my hair out with this and need to take a small break. I will check back in a bit. It still did not work after turning my firewall off Link to comment Share on other sites More sharing options...
FSFIan Posted October 28, 2015 Author Share Posted October 28, 2015 The error you are seeing happens in the line that tries to send the multicast UDP packet. I suspect the firewall is interfering with that. What I do not understand is why the interactive control reference manages to connect and receive data but the socat script does not. When you say the control reference works fine you do mean that you can see live data and manipulate in-game switches, right? The baud rate in the DCS-BIOS release is still 500000, so that is correct in this case. The issue is not on the Arduino side -- DCS-BIOS cannot send multicast UDP packets and socat is being prevented from connecting to the TCP server. What version of Windows are you using and what firewall are you running? Can you test with the firewall disabled? DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Firedawg Posted October 29, 2015 Share Posted October 29, 2015 (edited) well gents, it finally works!!! I turned off Avast and Firewall, turned on the interactive control reference, then the sim, loaded up the A-10C then alt-tab (like warhog was saying), then started up the socat and baaazing it works ! thumbs up to you guys. I have the CMSP display working but I only have a 16x2 LCD, where do I go to further abbreviate the characters so everything fits without running together? ****added info**** turned avast security back on and the avast firewall. As long as I run the sim first it all still works. Edited October 29, 2015 by Firedawg Link to comment Share on other sites More sharing options...
mblackham Posted October 29, 2015 Share Posted October 29, 2015 Cockpit parts for sale.... I have parts to build A10C CMSP panel.... - Custom made rotary and rocker switches - Tactile switches with caps - All necessary flip switches - Arduino mega - Screens 20x4 LCD displays - Front panel can be cut to order (Black plastic) - Circuit boards for tactile switches built to order - Vinyl cover for panel made to order Please PM me for prices. Link to comment Share on other sites More sharing options...
Deadman Posted October 29, 2015 Share Posted October 29, 2015 HI it may be better if you start a new thread selling your product in the for sale area pictures help a lot as well http://forums.eagle.ru/forumdisplay.php?f=144 https://www.shapeways.com/shops/a-10c-warthog-supplies https://forum.dcs.world/topic/133818-deadmans-cockpit-base-plans/#comment-133824 CNCs and Laser engravers are great but they can't do squat with out a precise set of plans. Link to comment Share on other sites More sharing options...
Patriot Posted November 6, 2015 Share Posted November 6, 2015 Why I sometime get UUU on display?? How it fix? My cockpit A-10C Строю кокпит A-10C i7 7700k, 32Gb RAM, SSD NVMe, GTX 1080, Hotas Warthog, HTC Vive. ----------------- With love from Russia Link to comment Share on other sites More sharing options...
FSFIan Posted November 6, 2015 Author Share Posted November 6, 2015 (edited) The current DCS-BIOS Arduino Library uses the default Serial library that comes with the Arduino IDE. When data comes in, it is written to a receive buffer. Data is read from that buffer in the loop() function. If you have lots of outputs or an output that takes a long time to update (such as a graphical display), the buffer may not be large enough, so data gets corrupted. The "UUU" you are seeing is the beginning of the next DCS-BIOS update packet. As a workaround you can try to decrease the baud rate so the buffer does not fill as fast (change it in the Serial.begin() line and the connect-to-serial-port script, e.g. from 500000 to 115200). You could also increase the receive buffer size (IIRC that requires editing some files in your Arduino IDE install, Google is your friend). Another thing you could do is to ignore the StringBuffer class and instead write to the display in the onDcsBiosWrite function to update it two characters at a time (but that only works if the display library you are using does not update the entire display when you change only a small area). The problem can only be fixed by a significant redesign of the way the Arduino library handles communication. I am working on that as part of implementing RS-485 support, but I have no ETA on it (although I hope to get it working and published before the end of the year). PS: In the future, it might help to include more information when asking for help. This happened to be an already known and easily identifiable problem, but if it had not been, coming up with possible causes would be very difficult with just a screenshot. Edited November 6, 2015 by [FSF]Ian DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Tekkx Posted November 7, 2015 Share Posted November 7, 2015 Ian;2545206']... I am working on that as part of implementing RS-485 support ... So meanwhile we should buy some RS-485-Tranceivers like this? (0,20 Euro pp) This would be a tremendous relief to the USB. I keep my fingers crossed :) Manual for my version of RS485-Hardware, contact: tekkx@dresi.de Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You. Link to comment Share on other sites More sharing options...
OH1CL Posted November 10, 2015 Share Posted November 10, 2015 just boughted couple of those vid series steppers and the driver chip too. This will be very usefull addon for the dcsbios, if you can implement a support for Vidseries steppers. btw, i have a still a problem with a servos. i can´t get them working. :( Link to comment Share on other sites More sharing options...
Tekkx Posted November 10, 2015 Share Posted November 10, 2015 (edited) This is an objection to the hardware section of this exquisite club: :) The Matter: While there are many times I can't neither saw nor drill I do some thinking about the future... To be prepared if the "missing link" called RS-485 is ready to run I want do design a RS-485 Shield with a Transceiver to saddle on a Nano. I like busses and One-Plug-Solutions. So my thinking was to put an Arduino Nano into each module and link them all together. RS-485 says, there are more than 90 posible. For easy connecting and removing I'd prefer RJ45 with standard LAN-Patch cables. Each module would need - Ground / Shield - 5 Volts for Arduino - 12 (or 24) Volts for Backlighting - 2 Wires (or 4 if full duplex is planned) for RS-485 Everything at just one RJ45 (they tolerate up to 1.5 Amps) and I do NOT talk about PoE (Power over Ethernet) That's also the reason for designing a new shield tho' there are millions available. Each shield should provide a second RJ45 as Output to easy (or daisy) chain any amount of modules. Also would be there a jumper to activate a terminal resistor (or two) on the first and last module of the chain. Also a kind of device for adressing.... (??? This is to diskuss later 'cause this is far beyond my knowledges) The Question (I don't want to invent the wheel twice): Is there already a used "Standard", which Pin is used for what? If NOT: Should WE introduce our own DCS-BIOS-Bus-Standard? I am not at that grade of knowledge to be a leader at this workgroup. I just wanted to make YOU think about. ;) Brake a Leg. Edited November 11, 2015 by Tekkx Found some typos. If you find more: Keep it. Manual for my version of RS485-Hardware, contact: tekkx@dresi.de Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You. Link to comment Share on other sites More sharing options...
Warhog Posted November 12, 2015 Share Posted November 12, 2015 You mean one of these? When Ian first started talking with me about how all these Pro minis might connect to the PC, he introduced me to the RS-485 bus. In anticipation of him completing some code to make it all work, I designed this little board to slip over top the Pro mini. It's not been tested yet as Ian's still working on the code which mean rewriting quite a bit of DCS-BIOS. Because he's also going to school this doesn't afford a lot of free time so he is doing what he can with the time he has. When it does become available, l doun't think the RJ-45 will be the way to go. Simple cOmpression type connectors or just solder it together as each wire length will be rather short once all your panels are in place. I'll be posting a more complete design as soon as he has completed the code and we have tested it with a couple of boards.:thumbup: Regards John W aka WarHog. My Cockpit Build Pictures... My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram, AIO Water Cooler, M.2 512GB NVMe, 500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals Link to comment Share on other sites More sharing options...
Tekkx Posted November 12, 2015 Share Posted November 12, 2015 (edited) That's exactly what I mean :) ... Because he's also going to school this doesn't afford a lot of free time ... I know this. And it wasn't my intention to push him (or it). As I wrote: I just want to be prepared :) Right now (means: at my grade of knowledge) I can't share your opinion reg RJ-45. This system is (mis- or ab-)used at many applications. I serv to a broadcast station and see it more and more. 0.1"-connectors ( If you ment that) are circumstantial to use. BTW (not further to diskuss here): To improve my results in soldering SMT I ordered some equipment to do it with some kind of reflow oven. (If you watch my progress at the [thread=146392]Magnetic Actuated Switch Project[/thread] (called: MagicSwitch) you'll know what I mean) Edited November 16, 2015 by Tekkx added declaration to a nickname :) Manual for my version of RS485-Hardware, contact: tekkx@dresi.de Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You. Link to comment Share on other sites More sharing options...
Warhog Posted November 13, 2015 Share Posted November 13, 2015 (edited) That's exactly what I mean :) I know this. And it wasn't my intention to push him (or it).[/i] Not to worry. Thats exactly what I thought you said. :) :thumbup: (If you watch my progress at the MagicSwitch you'll know what I mean)[/i] Not sure I understand "magic Switch"?? I get it now. :doh: Thanks Tekkx. Edited November 15, 2015 by Warhog Regards John W aka WarHog. My Cockpit Build Pictures... My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram, AIO Water Cooler, M.2 512GB NVMe, 500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals Link to comment Share on other sites More sharing options...
weeb Posted November 13, 2015 Share Posted November 13, 2015 I had a look on magicswitch as well John. I see what he is doing but I can't make the connection either. Windows 7 64 Home Premium, i5 3570K (3.4 @ 4.4GHz), Asus P8Z77-V LX, 16GB dual channel 1600 ram, EVGA Nvidia GTX980ti, 240 GB OCZ SSD, 3 TB Raptor, Thrustmaster Warthog Hotas and Throttle, Saitek Pro Combat Rudder pedals. Link to comment Share on other sites More sharing options...
rcmodels Posted November 17, 2015 Share Posted November 17, 2015 Anyone have any code/sketches using DCS BIOS and an I2C connection? I'm using an HT16k33 board to run a LED matrix for a caution panel. Link to comment Share on other sites More sharing options...
BravoYankee4 Posted December 2, 2015 Share Posted December 2, 2015 Ian, any progress regarding the RS-485 support in DCS-Bios? Link to comment Share on other sites More sharing options...
Recommended Posts