According to the UNESCO General History of Africa (vol 1),
The ancient authors' information was scanty and fitful, especially in
relation to West Africa. Herodotus, Manethon, the Elder Pliny, Strabo
and some others tell us little more than of occasional journeys or
raids across the Sahara, or of maritime tentatives down the Atlantic
coast, and the authenticity of some of these accounts is often the
subject of lively dispute among modern scholars.
However, we're on firmer ground with Periplus of the Erythraean Sea which dates from around the middle of the 1st century AD and mentions Rhapta, believed to be on the coast of modern-day Tanzania. The author is unknown but the was probably from north Africa. On Rhapta, this source says:
there is ivory in great quantity, and tortoise-shell. Along this coast
live men of piratical habits, very great in stature, and under
separate chiefs for each place.
The UNESCO General History of Africa also mentions
Claudius Ptolemy (c. 150 of our era, though the version that has come
down to us seems to relate more to c. 400) and of Cosmas Indicopleustes (647) are still major sources for the early history of East Africa.
Among Ptolemy's maps was this one below:
Attrib: http://maps.bpl.org [CC BY 2.0 (https://creativecommons.org/licenses/by/2.0)], via Wikimedia Commons
Ptolemy, who was Greco-Roman but lived in Alexandria,
gave to the western coast of Africa, as far as what is now called
Sierra Leone, considerable detail in regard to names and natural
features
Cosmas Indicopleustes was a Greek merchant from Alexandria. He is best known for travelling to India, but he also went to Eritrea (which is sub-Saharan Africa):
He happened to be in Adulis on the Red Sea Coast of modern Eritrea at
the time (c. 525 AD) when the King of Axum was preparing a military
expedition to attack the Jewish king Dhu Nuwas in Yemen, who had
recently been persecuting Christians.
For most of sub-Saharan Africa, though:
There is a huge area where until the fifteenth century the written
source is non-existent; and what is a second-rate Arabic source for,
say, the Maghrib, takes on prime importance for the Niger Basin.
Source: UNESCO General History of Africa (vol 1)