I want to write a small proxy as a user-level program for the DD-WRT environment.
The proxy will read/write between a USB HID device (Arduino) attached to the DD-WRT box and a specific web server. The USB device will use an AT-style code. The web server uses HTTP.
I'm new to the DD-WRT environment.
Pointers to useful sample apps, GIT repos, blog posts, etc would be appreciated. Anything about getting started writing a DD-WRT app.
Googling has not been successful.
More Googling and reading has led me to:
Apparently, OpenWRT packages can be loaded onto DD-WRT systems. "Note that you can install any OpenWRT package, using ipkg." -- from a DD-WRT page
An intro to writing an OpenWRT package.
http://www.dd-wrt.com/wiki/index.php/Development
If you want to write a kernel module for DD-WRT, this seems like a good start.
DD-WRT has packages for many useful things. Python and pyserial struck my attention.
It is trivially easy to write a HTTP server in python. It is equally easy to interface with a serial port in python.
Load kernel drivers for the USB serial emulator chip on your Arduino (mine has a FTDI chip). It will manifest itself as /dev/ttyUSB0 or something. Do everything else in python.
Related
I am using the socket module in python to send commands to my raspberry pi to turn GPIO pins on and of.
I am switching to C, where I will use winsock.h and winsock2.h to create the server on my PC and sys/socket.h to create a client on the raspberry pi.
Is it possible to establish a connection between these two different libraries?
I only want to create a socket, bind, send and recv. No other operations.
I recommend you to check this documentation, there are some examples for a Windows Server / Client connection:
https://learn.microsoft.com/en-us/windows/win32/winsock/getting-started-with-winsock
For Linux you need to do some adaptations as you might know or you have already implemented, I did the same for 2 desktop applications to send data from a Linux PC (client) to a Windows PC (server). As mentioned in the comments it doesn't matter the devices while they are in the same network and follow the TCP/IP protocol.
I was able to do this even connected through a VPN. Unfortunatelly I can not share the code. But I developed this communication based on the documentation from the link above.
I hope it helps. Actually if you want to use Python in the raspberry Pi there is also a python built-in package that you could use: https://docs.python.org/3/library/socket.html
And you can use the code from the link above in Windows. It should be straighforward.
I don't know if this is the right place to ask this. Sorry if I'm wrong.
I'd like to know if you can run code in an Xbee module without being connected to the computer or another device like arduino.
For example, I want to have 2-3 Xbee modules that communicate with each other sending information and then take decisions by code dynamically without using the X-CTU software. And I don't want those Xbee modules to be connected to the PC or other devices, they have to run by themselves with a coin cell battery and run some code previously written into their memory. Is this possible? If so, can you provide me some info/documentation to take a look? which language do you have to use to program the code? Which Xbee model do I need?
Thank you!
The XBEE modules can not do such tasks without a host. You can not run your own code on the module.
If you want to run you own code on the same device as the ZigBee stack then you should choose a solution from a silicon/stack provider.
You could achieve your goal using the Texas Instruments ZigBee Home automation SDK from www.ti.com/tool/z-stack which runs the ZigBee stack and your application on one of the TI ZigBee SoC's. But there are likely other similar providers as well.
Regards, TC.
XBees can be configured to initialize themselves with network data, i.e. the PAN ID, so they're aware of how to communicate on start up without requiring external configuration. However, they cannot run headlessly; they must to have some idea of the data that needs to be sent. They're fundamentally designed to act as a transparent serial bridge between computers to aid communications on personal networks. They cannot however be configured to do something bespoke.
It sounds like you're worried about power, so you could try looking for a low-power microcontroller that possesses a USART; this is all you'll need in order to communicate with an XBee via Serial.
It isn't possible to put your own code on a standard XBee module, but Digi does offer a Programmable XBee that includes a Freescale HCS08 co-processor that you can write code for. They offer a development kit with sample programs to get your started.
For a small-scale project where you don't need to be ZigBee certified, that might be easier than getting up to speed with a ZigBee development kit from TI, Freescale or Silicon Labs.
I'm writing a kernel module to send a special packet to every live host on the same network as the host running the module. I'm not totally sure how to discover live hosts on same network using C kernel code. I've looked into ping.c code and think its too much just for discovery of live hosts.
I could use application level utility like nmap to ping and get the data back to kernel module, but it would defeat the purpose of my module. Any ideas are welcomed. Thanks.
I bought a usb otoscope from the internet and I want to create an application that uses it. When I plug it into the computer, it reads the device as a USB Camera, and I can use the very barebones software supplied to communicate with it. I'm very new to the idea of communicating with usb all together. I've tried to look at some sites like this: http://www.jespersaur.com/drupal/book/export/html/21, that tell me how to reverse engineer a device. I don't know if I'm going down the right path with this...
I've downloaded USB Snoopy and I can't seem to get it to sniff the packets correctly. I also have Crunchbang linux installed on a different computer but I don't know how to sniff it on that either (especially because the drivers are native to windows). All I want is some sort of API/Interfacing functions for me to call and use. How do I go about doing such a thing? I'm able to locate the device on the device manager in windows, and it tells me hardware ID's and such. I can supply any information if necessary. Thank you.
EDIT - Small description I found of the otoscope: http://microscopesimgv.blogspot.com/2012/08/oasis-ehev2-usbplus-20mp-handheld-usb.html
would this tool help you any?libusbx is a cross-platform user mode library that provides generic access to USB devices
CHEERS!
I am new to the RTOS world and working on the eval version of vxworks 6.7. I don't know How to turn on the wdb debugging for my bootloader which has troubles loading my network driver. I hope someone can help me with a quick tips.
Thank you
Are you connected via serial for debugging? If not, it may be impossible to debug networking issues. wdb runs on host in eclipse and connects to device (target) via serial or ethernet.
Anyway you turn on wdb support via the project when you build the bootloader.