Just trying my hands on FreeRTOS. Following are my setup -
Micro-controller - AT32UC3A0512
Board - EVK1105
Using FreeRTOS
Environment - AVR Studio 5 with ASF latest 2.3 framework
I just created a new project from Example project FreeRTOS. I am checking the USART currently.
When run the example project, I am able to transmit characters from my development board to PC through USART but when I type or input something on my PC usart terminal program(using Putty), I am not able to see anything. Can anybody suggest what may be wrong? Or do I need to change the code in the current example code to get input and display on my terminal program for USART?
Thanks...
Off the top of my head, I'm thinking:
Is your putty character ending set right? Like probably utf-8 to send to your MCU?
Is your MCU receiving anything in its receive buffer?
Hope it helps (:
I figured out my problem too. It seemed that the task had an stackoverflow.
It didn't freeze but went into an infinite loop in the applicationstackoverflowhook function.
Giving the task more stack solved the problem.
I got the problem solved. I removed the ISR based code. Just I initialized the gpio module and then initialized the rs_232 mode for usart , rest I used the existing USART.h and usart.c file API to send or receive data in a FreeRTOS task. That solved my problem...
Related
right now I am trying to program on the STM32G0-Disco-board with the program stm32cubeide on WIN10.
This worked fine until it didn't.
My problem right now is that I can't debug/run it anymore. This is the first day I used this program, which doesn't mean it didn't worked at the beginning. Building, Debugging and Running worked just fine.
But now I get this error message:
Error in final launch sequence:
Failed to start GDB server
Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (4) No device found on target.
I already tried multiple usb-ports, the jumper on the board. I even looked in this Batchfile:
C:\ST\STM32CubeIDE_1.3.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_1.3.0.202002181050\tools\bin
ST_LINK_gdbserver because it was mentioned in other threads and i just got this:
ERROR: Couldn't locate STM32CubeProgrammer in '..\STM32CubeProgrammer\bin\', use -cp
GDB server exited.
And oh yeah i already looked into the device manager and everything looks good to me.
Help is much appreciated!
I had the same problem and i managed to solve it . It turns out that my antivirus software (avast) was preventing the debugger from starting by removing the file ST_LINK_gdb.exe from its place and putting it in the antivirus chest.
The solution was to open the virus chest and and restore the file and also add an exception. And this solved the problem.
Short BOOT0 (see the pinout of your board) to the 3.3 V, then power cycle, and program it
I had the same problem, thank you Chris for your suggestions!
To be clear, these are the steps I followed:
short BOOT0 to +3.3V (BOOT0 and 1 are pulled low via 1K on my board)
cycle power with the short in place
remove the short
cycle power again
good to go!
I have a website that recieves WEBRTC from my mobileApp very well.
A new C++ module that I develop that should send video using WEBRTC to the same website is not working and I failed to know why.
NOT WORKING FILES:
https://drive.google.com/open?id=1-6ZsfcQztexAspYWB4Nzvgf2e0-0C8vC
WORKING FILE:
https://drive.google.com/open?id=1bL_WOW6L1mGCXQC6HT6a14Sa58hOIcAh
kindly advise. I am stuck.
SOLVED AT LAST:
the issue mainly was due mDNS that is activated on chrome but gives "network unreachable" from my code.
the main problem was due to mDNS that chrome activates by default while webrtc need a lib called libnice v>0.1.14 which is the current stable release to resolve local addresses.
second peerConnectionFactory init:
I had to pass threads parameter. not this but also I had to init the network thread differently.
g_worker_thread = rtc::Thread::Create();
g_worker_thread->Start();
g_signaling_thread = rtc::Thread::Create();
g_signaling_thread->Start();
g_networking_thread = **rtc::Thread::CreateWithSocketServer();**
g_networking_thread->Start();
I am not sure what is the reason of the second point but maybe because I initiate webrtc from my main function in c and not through a thread.
Anyway I hope this helps someone... I was stuck for two weeks to solve it.
Qt "Terminal Example" is not working as expected with RS232.
I am using this as a boilerplate for my serial GUI application but cannot get it to send data to my device. Using the same settings in PUTTY I get a perfect output. I have narrowed it down to the issue that it will only send a single message and then no more. Is there some loop in there? I've already put debug statements all over to check unknown actions with no luck.
I checked what functions are outputting but I cannot see anywhere that it closes the port.
I also thought that maybe it was just me not sending the \r command but even this did nothing. I simply send the first message and then it does nothing.
I have tried sending it manually, with commands like these:
m_serial->write("command");
m_serial->write("command\r");
I have also tried following a solution here: How to make QSerialPort from Qt5.13.1 work?
I tried to update to the newest version and the maintenance tool did not find repository so I just did a clean install with 5.12.5 and same problem persists.
In my image, the first set of open-close is the terminal example. The second set is Putty working. I am definitely connecting because the error checking and serial port info I get from Qt is correct.
EDIT
My port settings are:
Baud: 9600
Data bits: 8
Stop Bits: 1
Parity: None
Flow Control: None
Qt Version: 5.13.1, 5.12.5
I am trying to develop an application that would interface with a Smart Card Reader and read information from the smart card.
Let me give you the development environment and the hardware used.
OS: Red Hat Enterprise Linux 6
IDE: Eclipse Juno CDT
Language: C/C++
Hardware:
Smart Card Reader: Omnikey 5321 (https://www.hidglobal.com/products/readers/omnikey/5321)
I have installed the driver and can find the following directories / files:
/usr/lib64/pcsc/drivers/ifd-ccid.bundle
/usr/lib64/pcsc/drivers/ifdokrfid_lnx_x64-2.10.0.1.bundle/Contents
/usr/lib64/pcsc/drivers/ifdokrfid_lnx_x64-2.10.0.1.bundle/Contents/info.plist
/usr/lib64/pcsc/drivers/ifdokrfid_lnx_x64-2.10.0.1.bundle/Contents/Linux
Contents of info.plist clearly show the "OMNIKEY CardMan 5x21" string under "ifdFriendlyName" key.
I want to use the PC/SC standard. Hence I have downloaded and installed the PCSC-lite and I have the checked that the daemon (pcscd) is running and the service status is ok.
Now comes the interesting part...
In my code, I used the following APIs in sequence.
SCARDCONTEXT oSCardContext;
SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, & SCardContext);
SCardEstablishContext() returns SCARD_S_SUCCESS. Great!
SCARDCONTEXT oSCardContext;
DWORD dwReaders = SCARD_AUTOALLOCATE;
LPSTR mszReaders;
SCardListReaders(oSCardContext, NULL, (LPSTR) & mszReaders, & dwReaders);
SCardListReaders() returns SCARD_E_NO_READERS_AVAILABLE. Not good.
At this point I go and check that the reader is properly connected. Yes it is.
I verify if I can see any reader entries in the /etc/reader.conf but I find no readers listed in here.
I then go to /etc/reader.conf.d but find no files in here as well.
So the smart card context is empty, I presume and hence no readers are listed.
So the issue right now is that pcsc-lite cannot detect(?) my reader attached and for which driver has been installed?
Just to check I wrote a simple program using the udev library to read all the "usb" subsystem entries and am able to find the following info from udev about the card reader connected:
Device Node Path:(null)
Vendor ID:076b
Product ID:5321
Manufacturer:OMNIKEY
Product:Smart Card Reader USB
serial:(null)
So am sure the device is detectable. But why is it that PC/SC Resource Manager cannot create this context?
So, How do I resolve this?
I am new to Linux, and have been trying to solve this issue myself without asking for help. But then I see that when there is time constraint it is indeed wise to better seek help from experts and people who have worked and / or encountered such an issue.
I have been googling too much but have not seen any that have my issue. So I presume I am missing something really basic perhaps.
If there is something I need to provide, please let me know. I will do so ASAP.
I appreciate your time to read.
Regards.
EDIT :
I have updates...
I did the following:
1. I got a new card reader (SCM Microsystems) and still it was not detected.
2. The pcscd daemon was started at boot time by default. I stopped the service after I logged in, and then run in foreground mode using the command "pcscd -a -f -d" and the SCM reader was detected successfully.
3. I tried to plugin the reader in my question above, the OMNIKIEY 5321, and it was not detected.
Apprently, I arrived at the following conclusion:
1. For some reason until pcscd was stopped and run in foreground mode manually after I logged in, the readers were not detected.
2. The OMNIKEY reader / driver has a problem.
Regards.
I'm trying to read variables from memory. Variables, that doesn't belong to my own program. For instance, let's say I have this Adobe Shockwave (.dcr) application running in browser and I want to read different variables from it. How it's being done? Do I need to hook the process? But it's running under virtual machine, so I don't know how to do it.
This task is pretty much trivial in normal w32 applications (as it is mainly just
CBT-hooking / subclassing), but as I mentioned before, I've got no idea how it's being
done with flash / shockwave.
I'm using C++ (VS9) as my development-environment, in case you wish to know.
Any hints would be highly appreciated, so thank you in advance.
Best regards,
nhaa123
If you're trying to do it manually just for one or two experiments, it's easy.
Try a tool like Cheat engine which is like a free and quick and simple process peeker. Basically it scans the process's memory space for given key values. You can then filter those initial search hits later as well. You can also change those values you do find, live. The link above shows a quick example of using it to find a score or money value in a game, and editing it live as the game runs.
without having debug Binaries/DLLs of the Apps, your only chance is asking some hackers.
Normally you can connect to a process with a debugger, but without the debugging symbols of the binaries you don't see any variable names - just memory addresses.
Further the Flash/Shockwave code runs inside a sandbox inside the browser to prevent security holes by manipulated Flash code. So you don't have a real chance to get access to the running Flash code / to the plugin executing the Flash code - except you have a manipulated version of such a plugin.
So your task is quite hard to solve without using less legal methods. The next hard thing is the virtual machine - this could be solved by implementing your app as a client/server solution, where the "inspector" / watchdog runs as server inside the virtual machine and the client requesting the variable status/content running on your normal host. The communication could be done as simple socket connection.
If you have the chance to write your own Flash/Shockwave plugin, you maybe could be able to see contents of variables.
Sorry, that I cannot help you any further.
ciao,
3DH