I'm pretty much a total idiot when it comes to writing hardware drivers, however I'm fairly decent at C/C++.
I have a for fun project I want to work on that is attempting to use a device as a network tether proxy.
What I would like to do is create a driver that appears to be a network driver to windows, but actually sends/receives through a USB port connected to another device.
I have a pretty good idea of what needs to be implemented, but I don't know quite where to start looking for research info.
Any pointers?
Get the DDK It has lots of documentation and sample drivers to start from.
This article from codeproject is a tutorial on creating a WDM driver. I can't vouch for its correctness, but a quick skim showed a lot of information. It should be a good starting point for research.
I haven't gone through it thoroughly yet, but this article seems like a good introduction to programming device drivers in Windows.
EDIT:
Read it. It gives a good introduction to device drivers, briefly introducing related concepts and common pitfalls with good external links. Worth reading if you know nothing about drivers.
Apart from the DDK documention, a commonly recommended book is Oney's Programming the Microsoft Windows Driver Model (WDM). Though these days you might be able to just only develop for the newer windows driver foundation (WDF), which greatly reduces efforts in making your driver PnP and power aware.
Then the resources at OSR are great, both for beginners and advanced discussions, including essays, tutorials and mailing lists. OSR also has demo hardware kits to help you get started developing drivers for real devices.
Avoid codeproject (not professional at all)
Download the MS DDK with the dozens of samples (professional)
Related
I've received a dk 3200 kit recently. I know it's old but I would like to start using it to have more of a challenge than just arduino. It came with the board, an st flashlink FL-101B and some cables. I do not have the install disc, but I found the software for psd soft express online. It doesn't work with current windows 7 64bit. If I could use my arduino to program it, that would be great! Or maybe just do it through USB or the parallel ports? I've read that st provides a stm32 library used to help make code. If that works for my mcu, I'll use that.
Thanks
ST is a company that loves to re-organize their website and break links, but a data sheet for a part of what seems to be the same family as on your board is available from a toolchain vendor at:
http://www.keil.com/dd/docs/datashts/st/upsd321x_ds.pdf
On page 118 this seems to indicate that programs can be loaded using JTAG In System Configuration commands, which may be somewhat standardized though quick searching isn't producing a lot of leads. A reference is also made to ST's AN1153 which would be worth trying to locate a copy of, however it's not entirely clear if that will say anything about the programming, or if it only covers the additional two optional signals which have been added for hardware acceleration of the interface.
In theory, if you can find sufficient information about this device (looking at related devices may provide clues) then you should be able to craft a programming from an Arduino or anything else that can be adapted to twiddle bits at the appropriate voltage/threshold levels.
In practice, you may be better off trying to find an old Windows XP box, or even trying to run that software on a virtual/emulated environment and trap the I/O access either to proxy or to figure out what it is doing and reverse engineer your own programmer.
But unless you have a large installed base of boards using these chips, or particular need some unusual feature of them (I thought I saw something about a built-in CPLD?) it's really not going to be worth the effort.
What are some resources for Linux developers learning OpenAL Effects Extension (EFX)? Creative's site and google did not seem to offer much in the way of documentation or tutorials. Any pointers to references are greatly appreciated.
The only kind of good source that I know is the "Effects Extension Guide" which comes as a PDF with the SDK (no official documentation is available on the internet otherwise, many attempts to find something have been futile, you also cannot download the Effects Extension Guide separately, it's only available with the SDK).
The SDK also comes with some mildly helpful EFX examples about how to query and initialize EFX, and a reverb example (which cynically needs OpenAL Soft on my computer, since it doesn't run properly with the Creative implementation).
While rather detailled, the Effects Extension Guide is unluckily (at least partly) written in a way that is not immediately comprehensive for someone not being an audio engineer.
Other than that, there exist about half a dozen master thesis papers (some in German) which contain a lot of blah blah but don't tell you much, and there are a few very basic usage examples on the net, such as this one.
Most of it, you'll sadly have figure yourself from the Effects Extension Guide.
I got an assignment at work to create a system which will be able to direct sound to different output channels of our sound card. We are using M-Audio ProFire 610, which has 8 channel output and connects through FireWire. We are also using a Mac Mini as our host server and I'm gonna be working in Xcode.
This is the diagram of what I am building:
diagram http://img121.imageshack.us/img121/7865/diagramy.png
At first I thought that Java will be enough for this project, however later on I discovered that Java is not able to push sound to other than default output channels of the sound card so I decided to switch to C++. The problem is that I am a web developer and I don't have any experience in this language whatsoever - that is why I am looking for help from more experienced developers.
I found a Core Audio Primer for ios4 but not sure how much of it I can use for my project. I find it a bit confusing, too.
What steps should I take to complete this assignment? What frameworks should I use? Any code examples? I am looking for any help, hints, tips - well anything that will help me complete this project.
If you're just looking for audio pass-through, you might want to look at something that's already been built, like Jack which creates a software audio device that looks and works just like a real one (you can set it as default output for your app) and then allows you to route each channel anywhere you want (including to other applications).
If you want/need to make your own, definitely go with C++, for which there are many many tutorials (I learned from cplusplus.com). CoreAudio is the low-level C/C++ interface as Justin mentioned, but it's really hard to learn and use. A much simpler API is provided by PortAudio, for which I've worked a bit on the Mac implementation. Look at the tutorials there, make something similar for default input and output, and then to do the channel mapping use PaMacCore_SetupChannelMap, which is described here. You'll need to call it twice, once for the input stream and once for the output stream. Join the mailing list for PortAudio if you need more advice! Good luck!
the primary APIs are at CoreAudio/AudioHardware.h
most of the samples/supporting code provided by apple is in C++. however, the APIs are totally C (don't know if that helps you or not).
you'll want to access the Hardware Abstraction Layer (aka HAL), more details in this doc:
http://developer.apple.com/documentation/MusicAudio/Conceptual/CoreAudioOverview/CoreAudioOverview.pdf
for (a rather significant amount of) additional samples/usage, see $DEVELOPER_DIR/Extras/CoreAudio/
I was just thrust into Linux programming (Red Hat) after several years of C++ on Win32. So I am not looking for the basics of programming. Rather I am looking to get up to speed with things unique to the Linux programming world, such as packages, etc. In other words, I need to know everything in https://www.redhat.com/courses/rhd251_red_hat_linux_programming/details/ without spending 3K. Any ideas of how I can acquire that knowledge quickly (and relatively cheaply)?
Update: The things that I am used to doing on Windows like building .exe and dlls using VC++,
creating install scripts etc are just done differently on Linux. They use things like yum, make and make install, etc.
Things like dependency walker that I take for granted in the windows world constantly send me to google while doing linux. Is there a 'set' of new skills somewhere that I can browse or is this more of a learn as you go?
The primary problem is this: As a very experienced programmer in Windows,I am having to ask simple questions like what's the difference between usr\bin and usr\local\bin and I would like to be prepared.
Edited because I had to leave a meeting when I originally submitted this, but wanted to complete the information
Half of that material is learning about development in a Unix-like environment, and for that, I'd recommend a book since it's tougher to filter out useful information from the start.
I'd urge you to go to a bookstore and browse through these books:
Advanced Programming in the Unix Environment by Stevens and Rago - this book covers threads, networking, IPC, signals, files, process management
Unix Network Programming, Volume 1 by Stevens - This book is focused on network programming techniques, design - you might not need this until much later
Unix/Linux System Administration - This book covers the more system administrator side of stuff, like directory structure of most Unix and Linux file systems (Linux distributions are more diverse than their Unix-named counterparts in how they might structure their file system)
Other information accessible online:
GCC Online Manual - the comprehensive GNU GCC documentation
Beej's network programming guide - A really well written tutorial to network programming with the use of the BSD API. If you have done work with winsock, this should be mostly familiar to you.
Red Hat Enterprise Linux 5's Deployment Guide - talks specifically about Red Hat EL 5's basic administrative/deployment, like installing with package manager, a Red Hat system's directory structure...
make - Wikipedia article that will have links to the various make documentation out there
binutils - These are the Linux tools used for manipulating object/binaries.
GNU Build System - Wikipedia article about the traditional build system of GNU software, using autoconf/automake/autogen
Additionally, you will want to learn about ldd, which is like dependency walker in Windows. It lists a target binary's dependencies, if it has any.
And for Debugging, check out this StackOverflow thread which talks about a well written GDB tutorial and also links to an IBM guide.
Happy reading.
that is quite a large and diverse topic list. for the programming part i think the C++ library should be portable, things that are not should be documented. for the linux-admin part, i suggest you try to use linux as your main desktop system, as many notions are absorbed via day to day work, there is no magic tutorial
Thats a bit broad.
What kind of programs are you going to be doing?
If you stick to standard c++ you're good to go... and just man everything else.
The single most important thing you'll need is a 99 cent notebook titled "Sys Admin" kept next to your computer. Keep track of everything you install/update including directory location, date, and method.
For POSIX and such I can recommend Advanced Programming in the UNIX Environment
and having a bookmark to The single UNIX Specification.
For GCC/GDB and those tools I'm afraid I can't give you any good recommendation.
Hope that helps anyway.
Edit: Duck was slightly faster.
A good source is the Advanced Linux Programming book.
It's free and covers a lot of you are looking for
Building a touch-screen app for a mobile device, around the size of a book. What C++ toolkit should I use? I was thinking about Qt, or gtkmm with hildon.
Thanks!
Use the frameworks that are supported/recommended by the OS on the mobile device.
After that, if you get more than one answer to the above question, check to see which one features the features you want for your application.
After that, pick the one done in the programming language you are most used to.
Good luck.
M.
+1 Qt. Qt's framework is great. and it goes LGPL now.
It might be worth looking into easyGUI. It it can be used with just about any OS and supports just about any device. The only downside is that it costs money.
What I really think you're saying is that you're porting Linux to a completely new device, e.g. one of these electric book things.
I'd suggest you port Android (which is Linux down deep so that part of porting is much the same) and use Java for your UI.